I'm sorry to bother you with this question - maybe it is really a newbie issue, but I'm new to the SQL Server Agent.
I've written a script that calls a stored procedure on a linked server. If I execute this script on the local server, all is doing fine.
Then I tried to execute this script periodically using the SQL Server Agent.
Now, every time the script is executed and tries to access the remote server, I get the error:
"Access to the remote server is denied because the current security context is not trusted."
I already did this:
* I advised the job to execute the step with the
database user that has assigned the linked server
login.
* I used SQL Server Configuration Manager to change
the account the SQL Server Agent is running under
to a domain account that has database rights on
both the local and the linked server.
* I marked both databases (the local and the linked
one) as trustworthy.
The error keeps coming, what else could I do? Why is this happening anyway? Sorry, I only know little about SQL Server security.
There is no firewall or whatsoever between the two servers, they are both on the local LAN. The versions are the same on both the local and the linked server:
@@version = "Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)"
Thanks a lot for any suggestion,
Anne
I've written a script that calls a stored procedure on a linked server. If I execute this script on the local server, all is doing fine.
Then I tried to execute this script periodically using the SQL Server Agent.
Now, every time the script is executed and tries to access the remote server, I get the error:
"Access to the remote server is denied because the current security context is not trusted."
I already did this:
* I advised the job to execute the step with the
database user that has assigned the linked server
login.
* I used SQL Server Configuration Manager to change
the account the SQL Server Agent is running under
to a domain account that has database rights on
both the local and the linked server.
* I marked both databases (the local and the linked
one) as trustworthy.
The error keeps coming, what else could I do? Why is this happening anyway? Sorry, I only know little about SQL Server security.
There is no firewall or whatsoever between the two servers, they are both on the local LAN. The versions are the same on both the local and the linked server:
@@version = "Microsoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)"
Thanks a lot for any suggestion,
Anne