August 10, 2012 at 4:48 am
Hi all,
Suppose i want to perform operations on 2 different server. How would i do it. I am just curious to know it.
Definitely over here i am not going to join the tables so what is the alternative to do it.
August 10, 2012 at 4:55 am
Same command, two different servers? I would look at a central management server.
August 10, 2012 at 5:05 am
Maybe you mean, that you want to execute a cross server query?
You may add linked server. After that you may query remote table specifying 4 part name:
select * from MyServer.MyDatabase.MyScheme.MyTable.
You may also create a synonim like
create synonym dbo.remoteTable for MyServer.MyDatabase.MyScheme.MyTable
and after that refer to remote table in your queries just with it like:
select * from dbo.remoteTable
You may alse use OPENQUERY ( linked_server ,'query' )
or OPENROWSET to establish connection and query remote table.
August 10, 2012 at 5:11 am
What do you mean by 'operations'?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
August 12, 2012 at 9:56 pm
Phil Parkin (8/10/2012)
What do you mean by 'operations'?
Over here operation can be just select,update or delete.
August 13, 2012 at 1:23 am
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply