var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Server To Server
Please provide me T-SQL script which will transfer table data from one SQL Sever to another SQL Server ?
Note : Database and table on both server are exactly same in all aspects.
I assume that the servers can communicate with each other. What you want is either:
sp_addlinkedserver and then insert into ... select. (Both documented fairly well in Books Online)
Import and Export Wizard in SSIS (or similar feature in DTS if you are using SQL Server 2000).
I want T-SQL Script. You have just guven an overview. If you can explain in brief will be nice.
In brief yes:
sp_addlinkedserver 'TargetServer','SQL Server'
to set up connection to the other server. Then we transfer the data:
insert into TargetServer.owner.table select * from owner.table;
If you are having identity values or other columns that cannot be inserted to you'll have to omit those columns, of course.
if you have lots of data, you'll be better off using bcp rather than linked servers.
I had never tried BCP will you give bit of idea.
Thanks a lot.