且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将数据从一个数据库传输到另一个数据库?

更新时间:2023-02-02 17:41:19

SQL Server表模式和数据来自一个数据库到另一个数据库

为此请参阅以下文章

将表格模式和数据从一个数据库复制到SQL Server中的另一个数据库 [ ^ ]

http://web.synametrics.com/IDataExpWiz.htm [ ^ ]


身份确实有点棘手(这是不使用身份的原因),但这并不困难。



这是一次性的努力吗?在哪种情况下SSMS可以做到这一点。

或定期努力?在这种情况下,你可能想要使用SSIS。



两者都可以被告知要复制身份。


我推荐SSIS 。



浏览链接并执行此操作



HTTP:// awesomesql .wordpress.com / 2009/08/18 /复制所有的对象从 - 一个数据库到另一个功能于使用传输-SQL服务器对象任务SSIS-/ [ ^ ]





希望这会对你有所帮助

I have SQL database dedicated server on on which "AA" databse is of 300GB (20 GB mdf and 280 GB ldf) files. I have created databse with same name on my local system. I wanted to take only data from Server Database with foreign key relations. How can I do this. I have tried with Import/Export option in SQL server not able to insert rows because of Foreign key relation.
I have tried with import database option it is successful without Identity values.
I don't want to mismatch any Identity value of tables in my database.

Is there any way to do this?

Please help me to solve this.
Thanks In Advance

SQL Server table schema and data from one database to another database.
For this See the following article
Copy Table Schema and Data From One Database to Another Database in SQL Server[^]
http://web.synametrics.com/IDataExpWiz.htm[^]


Identities do make that a little tricky (which is a reason not to use identities), but it's not difficult.

Is this a one-time effort? In which case SSMS can do it.
Or a periodic effort? In which case you may want to use SSIS.

Both can be told to copy the identities.


I would recommend SSIS.

Go through the link and do it

http://awesomesql.wordpress.com/2009/08/18/copy-all-objects-from-one-database-to-another-in-ssis-using-transfer-sql-server-objects-task/[^]


Hope this will help you