I have a local database server which has an associated sa account and on a cloud instance where we have another server I have added it to the local database server as a linked object. When I attempt to query on the database using the [LinkedServerName].[DatabaseName].dbo.[TableName] it is giving me an sa user login password. How can I join tables using tables from both databases if the sa accounts are different for each server
Asked
Active
Viewed 40 times
0
-
It's a really bad idea to use `sa` for a lined server. You should use a less privileged account. Maybe even just a read only account. Can you expand in "giving me an sa user login password"? does something pop up? – Nick.Mc Nov 01 '15 at 22:44
1 Answers
0
Assuming SQLServer, you can specify the user that the linked server is using. In SSMS, in the properties window for the linked server object, on the security page there is a checkbox for 'be made using this security context:' with a login and password box.
Put your remote server credentials in there and give that a try!

LordBaconPants
- 1,404
- 1
- 19
- 22