Tuesday, May 12, 2009

Copying Data From one table of One Server to another table of second table

Steps

Go To sql server management studio>>select ur Local server >>Expand It>>Then Expand Server Objects section>>Linked Server

>>Right Click On it>>New Linked Server>>

A new Window Will Open

Then in The Right Pane in front of Linked server Label write ur server Name >> Select Server Type(Sql Server As i think for ur case)

Then From the left Pane select Security

On the right side u will see a window which will having following fields Local Login,Impersonate,Remote User,Remote Password,

Click Add and fill following

Local Login:-login name for ur local server

Remote User -:login id of other server

Remote Password :-password for that server.

Then Press Ok.

By Now U Have Created a linked server.

Now How To Access it this statement will help u.

select * from [SERVERNAME].[DATABASENAME].[SCHEMA].[TABLENAME]

SELECT INTO [SERVERNAME].[DATABASENAME].[SCHEMA].[TABLENAME]

No comments: