Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SQL Database Move

Author  Topic 

Harsh06
Starting Member

5 Posts

Posted - 2013-06-14 : 11:29:20
Server Name - XYZ
Three database on xyz server which are Dabase A,B,C
each database has around 50 table, SP, Idex ect....

I have to move Database A and B data (All table, Index, SP ect) in Database C
Goal- keep only Database C on server XYZ
Which is the best way i can perform this task....

Harsh06
Starting Member

5 Posts

Posted - 2013-06-14 : 11:29:50
This is SQL server 2008 R2
Go to Top of Page

Peter99
Constraint Violating Yak Guru

498 Posts

Posted - 2013-06-14 : 18:19:14
Move all databases related object i.e. tables, sp, users from A and B to C. Make sure on C permission are properly setup.
Go to Top of Page

Harsh06
Starting Member

5 Posts

Posted - 2013-06-15 : 10:10:16
Does I have to move each table by script or I can make one script for all?
Go to Top of Page

Harsh06
Starting Member

5 Posts

Posted - 2013-06-15 : 10:10:16
Does I have to move each table by script or I can make one script for all?
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-06-15 : 10:42:34
Right-click database A (and B) in SSMS, then Tasks, then Generate Scripts.

Choose script all objects in database.

On the script options page, unselect SCRIPT USE DATABASE, select SCRIPT DATA.

Look at all of the options on that page too make sure they are suitable. Don't use the DROP. Do make sure no objects in database C have the same name as those in A and B.
Go to Top of Page

Harsh06
Starting Member

5 Posts

Posted - 2013-06-17 : 11:19:23
Thanks Peter99 and russell for your reply...
Go to Top of Page
   

- Advertisement -