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 2005 Forums
 Transact-SQL (2005)
 copies of multiple tables

Author  Topic 

foresters.bisc
Starting Member

5 Posts

Posted - 2012-01-23 : 16:32:54
Is there an easy way to make copies of multiple tables from one Server.Database to another Server.Database?
SQL Server 2005 v9.0

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-01-23 : 16:46:15
Do you just need a subset or is ALL fine? If all is fine, then use backup/restore. If you want just some tables, then you can use SSIS, import/export wizard, bcp, T-SQL via OPENQUERY or linked servers.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

foresters.bisc
Starting Member

5 Posts

Posted - 2012-01-25 : 17:18:56
Thanks - we are currently using import/export wizard to create our periodic backups from 'Prod_Server.DatabaseXXX' to 'Test_Server.DatabaseYYY'.
But we're manually selecting which tables to back up (ie. not always all) plus adding a suffix to each target name kind of as a timestamp.
Databases that only have 20 or so tables aren't so bad. It's the databases with 200 or so tables that are trouble.
Given all these criteria, is there a more automated way to do this (currently monthly, might be more frequent later)?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-01-25 : 17:40:33
But is selecting ALL fine? If it is, then this is really easy with backup/restore commands.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

foresters.bisc
Starting Member

5 Posts

Posted - 2012-01-31 : 12:52:17
We can Select-All with most DBs (and delete the few we don't need) - we will explore the Backup/Restore function and find out how to add the required suffix to the target copies - thanks.
Go to Top of Page
   

- Advertisement -