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
 General SQL Server Forums
 New to SQL Server Programming
 Linked Server

Author  Topic 

eugz
Posting Yak Master

210 Posts

Posted - 2012-05-17 : 13:09:31
Hi,

I'm trying to update a table on Server1 linked to Server2 daily. When I execute the stored procedure manually everything works. We I create a job and try to execute the job it fails and I get this error:

Access to the remote server is denied because the current security context is not trusted. [SQLSTATE 42000] (Error 15274

Thanks for your help.

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2012-05-17 : 14:09:54
When the job is run from SQL Server Agent, it will run in the context of the account running SQL Server (if job is owned by a sysadmin account) or the context of the owner of the job (if the owner is not a sysadmin).

The linked server is probably setup to use the current logins security context - which would require the account running SQL Server to be granted access to Server2.
Go to Top of Page
   

- Advertisement -