简体   繁体   中英

T-SQL Script to copy data from one server to another?

Is it possible to copy data from one server to another using a T-SQL script? We have a code promotion process that makes using the import wizard less than optimal for our team so I am looking into a script I can simply have someone run in Management Studio that will do the trick.

Yes, First create a Linked Server to other server, then you can access the target server by 4 part Names, for example:

Insert into Server2.Database2.dbo.MapTable1 select * from table1

ps you can add linked server by sp_addLinkedServer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM