SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


sql agent job fails with [SQLSTATE 42000] (Error 2812)


sql agent job fails with [SQLSTATE 42000] (Error 2812)

Author
Message
DavidL
DavidL
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2882 Visits: 780
hi all: I have a user stored procedure that references some tables in a sql2005 database on another server. It uses some of that data to insert records into a table on the server where the job is running. If I run the sproc from within SMS, it runs as expected. When I schedule it in a job, the job fails with the following log entry:

01/06/2009 08:41:13,Update Sales Reporting Table,Error,1,SNBNT3\SQL2000,Update Sales Reporting Table,Update Sales Reporting Table,,Executed as user: NT AUTHORITY\SYSTEM. Could not find stored procedure 'SNBCO.dbo.usp_tblAdmin_GP_SalesReport_Update'. [SQLSTATE 42000] (Error 2812). The step failed.,00:00:00,16,2812,,,,0

I have sa rights on both servers and databases. I have googled this extensively but not found anything that works. Any advice is appreciated. TIA D. Lewis



DavidL
DavidL
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2882 Visits: 780
I changed two things, and that seems to have fixed it: 1) I had been referring to the sproc up until today as dbo.xyz...., then this morning just before I posted the question here I changed it to SNBCO.dbo.xyz.... Both resulted in failures. As it turns out the correct path should be SNBCOReports.dbo.xyz.... At the same time as that mistake was corrected, the sysadmin also changed the settings on the server so that SQL Agent was no longer running in local mode (the sproc relies on a linked server in the query).
Certainly 1) had an effect, and perhaps also 2). D Lewis



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search