Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Select into from one server into another server

Status
Not open for further replies.

awholtsIT

IS-IT--Management
Aug 18, 2008
27
US
SQL Server 2005 Standard

I need to copy specific records from server 1, table A into
server 2, table A.

(2) physical servers with there own instance. The tables are identical between the servers. I need to copy records from one into the other to recover lost data.


I've been playing with (2) registered servers and also with Linked Servers, however, I can not get it to work.

Appreciate help and "tips" on copying records from a table A on server 1 into the like table A on server 2.

Thanks in advance for your help.

Andrew



 
You must add a linked server then:
Code:
INSERT INTO [LinkedServerName].[DataBaseName].[schema].[TableName] (field list here)
SELECT (field list here) FROM TableName

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
If I needed to include a where clause, would it be added as such;

INSERT INTO [LinkedServerName].[DataBaseName].[schema].[TableName] (field list here)
SELECT (field list here) FROM TableName
WHERE field = 'criteria here'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top