我有SQL数据库专用服务器,其中AA数据库是300GB(20 GB mdf和280 GB ldf)文件。我在本地系统上创建了具有相同名称的数据库。我只想从服务器数据库中获取具有外键关系的数据。我怎样才能做到这一点。我已尝试使用SQL服务器中的导入/导出选项,因为外键关系无法插入行。 我尝试使用导入数据库选项,但没有标识值就成功了。 我不想让我的数据库中表格的任何标识值不匹配。 有没有办法做到这一点? 请帮我解决这个问题。 先谢谢
解决方案SQL Server表模式和数据来自一个数据库到另一个数据库 为此请参阅以下文章 将表格模式和数据从一个数据库复制到SQL Server中的另一个数据库 [ ^ ] web.synametrics/IDataExpWiz.htm [ ^ ]
身份确实有点棘手(这是不使用身份的原因),但这并不困难。 这是一次性的努力吗?在哪种情况下SSMS可以做到这一点。 或定期努力?在这种情况下,你可能想要使用SSIS。 两者都可以被告知要复制身份。
我推荐SSIS 。 浏览链接并执行此操作 HTTP:// awesomesql .wordpress / 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[^] web.synametrics/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 awesomesql.wordpress/2009/08/18/copy-all-objects-from-one-database-to-another-in-ssis-using-transfer-sql-server-objects-task/[^] Hope this will help you更多推荐
如何将数据从一个数据库传输到另一个数据库?
发布评论