I need to copy specific data from select set of tables in one SQL Server to another SQL Server. Any pointers to this will be really helpful.
- Hi Thanks for the inputs. I created linked servers and using this i was able to move data from one database to other. But now, my team is saying that linked servers are not allowed because of security restrictions. Also i was not able to use openrowset due to policy restrictions. So anyother way to do the same?Srinivas– Srinivas2011-09-14 09:48:12 +00:00Commented Sep 14, 2011 at 9:48
5 Answers
Create a linked server or use Openrowset to create a connection with remote server.
use linked server if you need to perform routine task with remote server else use openrowset.
Comments
There's also the SSIS wizard, aka SQL Server Import/Export Wizard Instead of full table copies, specify the source queries, save to disk (assuming you'll need to re-run the process periodically) and voila, data copy in a box
Comments
You can move data to another table, or you can create a table based on the other table. Your question is a good one that I have heard before so I wrote a quick blog post explaining the options
Comments
you can copy data from one database to another. The mysql query is:
insert into database2.table_name2(field name) select table_name1.field_name from table_name1 where table_name1.field_name = condition The above mysql query is used for copy specific data between databases. Suppose you want to copy whole table datd, then you will use following query:
insert into database2.table_name2(field name) select table_name1.field_name from table_name1