Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Procedure Runs fine in QA but not from Job

Status
Not open for further replies.

SajidAttar

Programmer
May 23, 2005
132
IN
Hi All,

Here i have faced a different problem. I have a procedure to grant the execute permission on each procedure of all database to Execute Role.

This procedure is working fine from QA, When scheduled it to run through job it is failing with the below message in job output file.

Msg 913, Sev 16: Could not find database ID 208. Database may not be activated yet or may be in transition. [SQLSTATE 42000]

I have checked the DB, for which this is causing and it is fine. Although the procedure is running as expected thru QA.

If anyone has any idea please suggest.


Regards,


"There are no secrets to success. It is the result of preparation, hard work, and learning from failure." -- Colin Powell
 
I would check the permissions of the acount which runs the SQL Server agent. Maybe it doen't have rights to that database.

Questions about posting. See faq183-874
Click here to help with Hurricane Relief
 
Also, check the database to make sure it is not set to Auto Close (Enterprise Manager, right click on the db, select Properties, go to Options tab).

-SQLBill

Posting advice: FAQ481-4875
 
Thank you SQLSister and SQLBill, for you valuable reply.

Since the job is running with SA user, so Permissions should not matter and per standard Auto Close property of All DBs' is Off.

It seems that my senior has fixed the problem and the job is running fine now.

I will confirm the steps that he followed and will update.


Regards,


"There are no secrets to success. It is the result of preparation, hard work, and learning from failure." -- Colin Powell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top