Monday, March 12, 2012

Job Fails on Linked Server

I've got a job running on a SQL2005 box (server07) that modifies data on a SQL2000 box (server05). The databases on the 2005 were imported from an older box running SQL2000. The step that is failing is:

update server05.xtender.sysop.ae_rf4
set field3 = sname
from server05.xtender.sysop.ae_rf4 x inner join allscholarships..studentsindb_table s
on x.field1 = s.ssn
where x.field3 is null or len(field3) = 0

The history shows this for the failed step:

Message
Executed as user: Domain\Administrator. Access to the remote server is denied because the current security context is not trusted. [SQLSTATE 42000] (Error 15274)Unable to open Step output file. The step failed.


Domain\Administrator is a sysadmin on both boxes. This job had been running some time ago, but the SQL2000 box (under a different dba) has somehow changed. Now I need to get the thing running again.

Hi,

The error said its untrusted connection ... have you tried re mapping accounts using sp_addlinkedsrvlogin!!!?

refer this thread http://www.webservertalk.com/archive137-2006-4-1477449.html

Hemantgiri S. Goswami

|||That discussion is the only thing that pops up when I google "Error 15274", I've read the very original and he hasn't gotten an answer yet.

The best I can tell is that the SQL Agent is supplying the security credentials to the linked server and I'm not able to specify which security context for the job to use.

In the Job Step Properties pages, under each step's General page in the middle of the window is a dropdown - Run As. There is nothing in the dropdown list and no way to enter a value. On the Advanced page of each step is a Run As User with a select user button, I've entered every conceivable value on this Advanced page with no success.|||Check services - which account is used for startup of the SQL agent. System account is no good - only local resources are available. Use "This account" with administrative rights on the Windows & SQL server.|||Make sure Domain\Administrator has got required privilges on SQL Server (incl. SQLAgent) in order to complete the job process.|||Also check the linked server setup - security. Check "Be made using the login's current security context".|||

a very weird issue. Was able to resolve it using a new NT Account with Admin rights. Just created it at both servers, then added to both SQL Servers with rights I needed. And also set this account to be used for SQL Agent service.

Oh, also have used the imporsonate setting for linked servers mapping (at both sides)

and just leave "run as user" blank for step settings

|||check the connectivity of your linked server using sp_testlinkedserver

No comments:

Post a Comment