Sql-server – Linked server issue. Can’t use windows authentication as remote login account

sql serversql-server-2008

I tried to set up linked server. The target server is MS SQL 2008R2.

It works fine if I set Remote login by sa account.

However, if I use a windows account, it will popup an error.

And I get the following message from log.

Attempting to use an NT account name with SQL Server Authentication

Is there anyway to let linked server use windows authentications ?

Best Answer

No you can't specify a Windows account for the remote side of things.

All you can do is check the Impersonate checkbox, but you can't have a SQL Account on your server connect to the remote machine using a Windows domain account. Nor can you have a Windows user on your server connect to the remote machine using a different Windows account.

Now, that said what you can probably do is use EXECUTE AS to impersonate the windows account within a stored procedure (I'm assuming you are using a stored procedure here) then setup the linked server mapping for the account you are impersonating which will pass through correctly assuming that Kerberos is setup correctly on both machines.