Hi everyone!
I need a query to retrieve data from a server and insert them into another server. I was thinking to create a stored procedure, but how can I pass the server name as parameter from C# and how can I concatenate it to the command?
The query I need is something like the following:
INSERT INTO Server1.Table SELECT * FROM Server2.Table
Thank you in advance

Posted Nov 2, 2008, 11:48 PM EST
If you want to make the connection of to database of different server then you have to first link those server then you can use transfer the data between those server database.
For established the link between the servers you have to use "sp_addlinkedserver"
Ryan AlfordRank #1,411 · 1.2K reputationPosted Nov 19, 2008, 6:49 AM EST