Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


share|improve this question
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 Apr 18 '13 at 10:43
Sorry to sound naive, how would i go about doing that? Just to make sure we are on the same track. – CatchingMonkey Apr 18 '13 at 10:47
In SSMS, if you go to the properties of the Linked Server (Server Objects>Linked Servers) and then the Security tab... – RoKa Apr 18 '13 at 10:55
Cool, was looking at the right thing. It uses a specific context. – CatchingMonkey Apr 18 '13 at 10:56
@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 May 6 '13 at 13:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.