Click here to Skip to main content
16,017,167 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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
Posted
Comments
[no name] 9-Jul-14 7:34am    
Okay.... and? Did you have some sort of a question? Have you actually tried anything? What was the specific problem with what you tried?
nayeem@codeproject 21-Jul-14 5:34am    
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

SQL
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
 
Share this answer
 
SQL
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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900