I have a front end that logs into the DB as "logInA", and only has permission to "schemaA" stored procs, which use EXECUTE AS "logInB", (I have also tried EXECUTE AS 'DBO'), to handle all the business logic.

I have run into a problem though, where a query tries to access a table on a Linked Server, and returns the error:

Access to the remote server is denied because the current security context is not trusted.

If it helps, the source server is SQL 2008, and the linked server is SQL 2005.

Can any one help me as to how to resolve this?

Thanks in advance


  • 1
    Can you tell if the linked server is set up to be made using the current, a specific, or no security context? Are you connecting to the linked server using LoginA or LoginB and are you doing so via the stored procedure?
    – RoKa
    Commented Apr 18, 2013 at 10:43
  • Sorry to sound naive, how would i go about doing that? Just to make sure we are on the same track. Commented Apr 18, 2013 at 10:47
  • 1
    In SSMS, if you go to the properties of the Linked Server (Server Objects>Linked Servers) and then the Security tab...
    – RoKa
    Commented Apr 18, 2013 at 10:55
  • Cool, was looking at the right thing. It uses a specific context. Commented Apr 18, 2013 at 10:56
  • 2
    @CatchingMonkey was the problem solved? if it was, then how? if not, are there any more details\updates you would like to add?
    – Roi Gavish
    Commented May 6, 2013 at 13:35


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.