SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SQL Database Move
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Harsh06
Starting Member

5 Posts

Posted - 06/14/2013 :  11:29:20  Show Profile  Reply with Quote
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 - 06/14/2013 :  11:29:50  Show Profile  Reply with Quote
This is SQL server 2008 R2
Go to Top of Page

Peter99
Constraint Violating Yak Guru

491 Posts

Posted - 06/14/2013 :  18:19:14  Show Profile  Reply with Quote
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 - 06/15/2013 :  10:10:16  Show Profile  Reply with Quote
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 - 06/15/2013 :  10:10:16  Show Profile  Reply with Quote
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

USA
5072 Posts

Posted - 06/15/2013 :  10:42:34  Show Profile  Visit russell's Homepage  Reply with Quote
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 - 06/17/2013 :  11:19:23  Show Profile  Reply with Quote
Thanks Peter99 and russell for your reply...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000