Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Linked servers cannot be used under impersonation

Author  Topic 

james_wells
Yak Posting Veteran

55 Posts

Posted - 2014-08-07 : 05:03:40
getting

Msg 7437, Level 16, State 1, Line 2
Linked servers cannot be used under impersonation without a mapping for the impersonated login.

what i want to do is for a sql login authorised user on server A to get data from server B in the same domain which only allows windows authentication.

this is to say server A is in mixed mode
server B is windows authentication only mode

so i want userA (on server A) to map to domain\userB (Server B)

i have set up linked servers for server B on server A

i can get data using windows authentication from serverB ok as my windows authentication user credentials are being passed through to server B from server A ok.

when i use "execute as login / tsql code / revert" thats when i get the message above.

my thinking was if i "execute as login" using a SQL Login that the credentials specified in the login would be passed through to server B and work the same as if using a windows authenicated user.

however if i "execure as login" using my windows credentials i get the same error message.

So i am guessing so far when uisng "execute as login" that server B does not get passed the login credentials under this cenario.

i have added the "execute as user" to the linked server mapping with the impersonated flag set to true but i still get the same issues.


   

- Advertisement -