SP fails when run as job | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SP fails when run as job

On SQL2005 server, we have a stored procedure that runs when run manually, but fails when run as a scheduled job. This SP connects back to a SQL2000 server.
Any help would be greatly appreciated. Message
Executed as user: NT AUTHORITYSYSTEM. Login failed for user ‘NT AUTHORITYANONYMOUS LOGON’. [SQLSTATE 28000] (Error 18456) TCP Provider: An existing connection was forcibly closed by the remote host. [SQLSTATE 42000] (Error 10054) OLE DB provider "SQLNCLI" for linked server "MyTestServer" returned message "Communication link failure". [SQLSTATE 01000] (Error 7412). The step failed.
The proc is trying to execute with the credentials of ‘NT AUTHORITYANONYMOUS LOGON’. Ans looks like the user does not have enough permissions to run cross server queries. Go to the job and change the "Execute as" option to "sa". ***********************
Dinakar Nethi
SQL Server MVP
I agree with Dinakar…it might be access issue… Map the local login with remote login to work… Login to the server using local admin account and then test it…. MohammedU.
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

See this:
http://sqlserver-qa.net/blogs/tools…n-was-forcibly-closed-by-the-remote-host.aspx Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.