How to bind servers in different AD domains?

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.

+7
credentials active-directory windows-authentication sql-server-2008-r2 sql-server-2014
source share

No one has answered this question yet.

See related questions:

24
Cross-Domain SQL Server Accounts Using Windows Authentication
thirteen
Cannot Connect to SQL Server in Another Domain Using SSMS and Windows 7 Credential Manager
2
IIS and SQL Server Windows Authentication in ASP.NET Application
one
Firewall Rules for Remotely Connecting to SQL Server in Another Domain
one
How to connect from WinAuth to SQL Server without logging in?
0
How to check Windows credentials in a UWP application
0
Connect to SQL Server remotely through Java from an untrusted domain using Windows Authentication
0
SQL Server 2014 cannot connect to the local database server
0
Logging on to SQL Server with a different domain (Intellij Idea)

All Articles