SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 join tables on different servers
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

208 Posts

Posted - 09/27/2013 :  16:03:27  Show Profile  Reply with Quote
Hi All.

How to join tables on different servers if one server, for instance, SERVER2 required authentication?


James K
Flowing Fount of Yak Knowledge

3814 Posts

Posted - 09/27/2013 :  16:10:38  Show Profile  Reply with Quote
Set up a linked server connection to the remote server. See this page for how http://technet.microsoft.com/en-us/library/ff772782.aspx If you have never done it before, it might be easier to use the description under "Using SQL Server Management Studio".

When you set up the linked server, the dialogs have places where you can provide the details and authentication information for the remote server.

Once you have the linked server set up correctly, you would refer to the remote table using the four part naming convention - ServerName.DatabaseName.SchemaName.Tablename. See here for how that works: http://www.mssqltips.com/sqlservertip/1095/sql-server-four-part-naming/
Go to Top of Page

Very Important crosS Applying yaK Herder

52325 Posts

Posted - 09/28/2013 :  03:15:32  Show Profile  Reply with Quote
see this which explains all steps in creating a linked server programatically


SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000