将一个数据库导出到另一个数据库 [英] Exporting one database to another database
本文介绍了将一个数据库导出到另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有2个数据库。这两个数据库具有相同的表和相同的结构。我需要从一个数据库导出数据另一个数据库两个数据库都有一个数据只使用过程或ssis pakage插入不同的数据
谢谢
Abhishek
I have got 2 databases. The two databases have same tables and same structure. I need to export data from one database another database both database have a data only insert distinct data using procedure or ssis pakage
Thanks
Abhishek
推荐答案
hiiii
Right click on database which you want to export----> tasks--->export data--->next--->select datasource,server name & database name which you want to export --->next--->select Destination where you want to store,server name & database name--->next---->check the option copy data from one or more tables or views---->next--->select all to export database--->check save SSIS package
--->next----> give name --->next--->finish---->close
this is all about export
To import
Right click on database which you want to import----> tasks--->import data--->next--->select datasource,server name & database name which you want to import --->next--->select Destination where you want to store,server name & database namename--->next---->check the option copy data from one or more tables or views---->next--->select all to import database--->check save SSIS package--->next----> give name --->next--->finish---->close
use <DestinationDatabase>
select * into <DestinationTable> from <SourceDataBase>.dbo.<SourceTable>
1 - Right click on the database you want to copy
Choose 'Tasks' > 'Generate scripts'
'Select specific database objects'
Check 'Tables'
Mark 'Save to new query window'
Click 'Advanced'
Set 'Types of data to script' to 'Schema and data'
Next, Next
You can now run the generated query on the new database.
Option 2
Right click on the database you want to copy
'Tasks' > 'Export Data'
Next, Next
Choose the database to copy the tables to
Mark 'Copy data from one or more tables or views'
Choose the tables you want to copy
Finish
这篇关于将一个数据库导出到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文