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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Stored Procedure Fails When Called From a Job

Author  Topic 

gogetter
Starting Member

18 Posts

Posted - 2008-06-05 : 10:55:59
I have written a stored procedure that collects data from several linked servers in stores that data in a local table. It runs great when it is executed from within Query Analyzer but when run as a scheduled job it fails with the following error message:

[SQLSTATE 01000] (Message 0) Login failed for user 'sa'. [SQLSTATE 28000] (Error 18456). The step failed.

When I run it from QA I have tested it under both my own security context as well as sa and it works in both cases. I have tried changing the job owner to sa as well as a domain account that is a domain admin and it still fails with the same error message. Is this a bug or am I just missing something? Thanks!

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-05 : 11:02:18
Does SQL server agent account has permission?
Go to Top of Page

gogetter
Starting Member

18 Posts

Posted - 2008-06-05 : 17:29:06
quote:
Originally posted by sodeep

Does SQL server agent account has permission?



Yes, SQL Agent is running under a domain admin account for testing purposes.
Go to Top of Page
   

- Advertisement -