开发者

Best way to move a bunch of SQL Server 2005 tables to another Server?

I've been looking for a way to move a bunch of tables, more than 40, to another server with all the data in them. I've looked around for scripts to generate inserts but so far I'd have to run them once for every table, then copy all the scripts over and then run them on the server. Seems like there is a better way.

--Update-- My strategy for doing this may have been for naught. The end script, using MS SQL Server Publishing Wizard and Red Gates SQL Data Compare (开发者_开发技巧excellent tool, btw) results in a file over 1GB. This makes my system plead for mercy and I'm not willing to risk crashing a clients server just opening the file to run it. I may have to rethink this whole thing and break down to just individual per table scripts. I'm not looking forward to that.


If You're Creating a New DB on your other Server:

Have you tried just doing a Backup and Restore?

On the first Server, Backup the DB to a .bak file.

Copy that file over to your new server.

Do a restore using the .bak file

If You're Updating the DB on the other Server.

Try SQLExaminer, it's one of my must have tools. http://www.sqlaccessories.com/SQL_Examiner/


some options...

  • sql server import export wizard, just right click a database on either server.
  • BCP OUT then IN
  • Linked Server
  • ODBC type solution

for 40 tables i'd use the import/export wizard, it will give you a list of tables to export, very simple.


You could export the tables you want and all of each tables content using the SQL Server Database Publishing Wizard. This would give you a .sql file that you can easily upload and run on the new server.

The link to download and install from MS is over here - http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜