I am trying to connect two SQL servers (2008R2 and 2014) that work in two separate (!) Active Directory domains.
The problem is that I can only log in to the remote server with a Windows account from the remote domain. So the challenge is to pass credentials to the remote server, but I'm stuck here.
- Local domain (LAN infrastructure):
dom8 , Server: dom8\sql2008 , SQL (!) Login: localuser - Remote domain (Microsoft Azure):
dom14 , Server: dom14\sql20148 , Windows (!) Login: dom14\import
The dom8\sql2008 wants to connect to dom14\sql2014 to pull some data.
Here is what I tried on the local server: (registered on dom8\sql2008 as sa ):
-- Create a credential for the remote Windows login: create credential cred_import WITH IDENTITY= 'dom14\user14', SECRET = 'password' ; -- Alter the local SQL login and add the created credential: alter login local_user with credential = cred_import ; -- Create the Linked Server entry: exec sp_addlinkedserver @server='dom14\sql2014', @srvproduct='SQL Server' -- Add the credential to the linked server: exec sp_addlinkedsrvlogin @rmtsrvname ='dom14\sql2014', @useself = 'FALSE', @locallogin=local_user, @rmtuser = [cred_import], -- trying to pass on the credential @rmtpassword = NULL
However, this will not work. Whenever a localuser user tries to connect to a remote server through a local server, he receives a login failed error message.
By the way, I can connect to the remote domain using SQL Server Studio as follows:
runas /netonly /user:dom14\user14 "C:\...\Ssms.exe"
Thus, it is obvious that it can create a remote side account on the local side. The link to the remote server does not work.
credentials active-directory windows-authentication sql-server-2008-r2 sql-server-2014
Georg Scholz
source share