December 16, 2009 at 6:13 am
Hi
I need to connect two different sql servers across different geographical locations (For eg. one server in UK & other in US).
After the servers are connected, the users should be able to join 2 or more tables from those two remote servers for querying.
Kindly let me know the method.
Rgds
Mohan Kumar VS
December 16, 2009 at 7:04 am
You need to setup Linked Server and use 4 part Notation, ex: LinkedServer.Database.Schema.Table in your queries.
Search Google for Linked Server in SQL Server and you will find plenty of example how to setup.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 16, 2009 at 8:28 am
However, joining tables across servers, let alone across oceans, can be very problematic from a performance standpoint. Frequently with linked servers you'll see all the data from the first server moved across to the second as part of the join operation. You might want to reevaluate the solution to determine if you can move the data between the servers in some fashion in order to avoid having to join between them.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 16, 2009 at 9:09 am
Agree with Grant's opinion. Linked Servers tend to slow down the query. But it is the only way where you can connect 2 different SQL Servers across different machines.
Depending on your requirement, you may need to evaluate other ways of moving the data to local system and performing the required task.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 16, 2009 at 10:18 pm
Thanks for the suggestions. I understand that this has to be done through linked servers (sp_addlinkedsrvlogin) . But I'm unable to get exact example for connecting to remote server (at a different location). I searched BOL & Google. Kindly give me an example how to connect it.
Rgds
Mohan Kumar VS
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply