I have two tables tableA in databaseA on ServerA and tableB in databaseB on ServerB. I want to perform join to these tables. I written query for this, since I don't have access to these servers. So prior to this I want to establish a connection between two servers.
select * from localdb.dbo.localtable as t1
full outer join
linkedserver.remotedb.dbo.remotetable as t2
on t1.col1 = t2.col1
Jignesh TrivediPosted Sep 6, 2013, 4:00 AM
hi,
you can select data from two different tables from different database on different server using Linked server.
Please refer
http://technet.microsoft.com/en-us/library/ff772782.aspx
http://msdn.microsoft.com/en-us/library/aa560998.aspx
http://www.c-sharpcorner.com/uploadfile/suthish_nair/linked-servers-in-sql-server-2008/
hope this will help you.
Sunny SharmaPosted Sep 6, 2013, 3:23 AM
I would suggest you to check the syntax of connection string that you'll need to try connecting wither of the Servers.
Visit here:
http://www.connectionstrings.com/
It has almost all the syntax required to connect to a DB Server.
Hope you got the point. Try connecting the server ad you'll get to know.
Hope it helps :)