Pulling data from tables on different servers
70 pts.
0
Q:
Pulling data from tables on different servers
I have a join between a table on my local database and a table on a different database on the same server. I reference the non-local database with DatabaseName.TableName. Now I find that the non-local database might be on a different server. I tried ServerName.DatabaseName.TableName, but I got this error: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Any idea how I can do this? Thanks.

COBill

ASKED: Oct 8 2009  5:53 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
46735 pts.
0
A:
 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0
  • AddThis Social Bookmark Button
Your DBA of the remote server will need to setup a SQL login on the remote server, and setup a specific mapping for you (or for all users) so that when you try and connect to the remote server the connection logs into the remote server using the mapped SQL Account not your Windows account.

Using your Windows account to access a linked doesn't work unless you are running the code from the first server's console.
Last Answered: Oct 10 2009  7:33 AM GMT by Mrdenny   46735 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

CO Bill   70 pts.  |   Oct 12 2009  7:58PM GMT

Thanks. I contacted my DBA and am learning more about linked servers than I want to :-)

CO Bill

 
0