troubleshooting Question

Can I use EXEC sp_start_job in a Stored Procedure?

Avatar of Richard Comito
Richard ComitoFlag for United States of America asked on
Microsoft SQL ServerMicrosoft SQL Server 2005
1 Comment1 Solution724 ViewsLast Modified:
I have a stored procedure in a database called Impresario.   What I would like to do is use sp_start_job within this stored procedure.  But because sp_start_job is an object in msdb and not Impresario, I would have to use USE msdb which is not allowed inside a Stored Procedure. So is there another way to execute sp_start_job at the end of my stored procedure in the impresario DB?


Database Consultant
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros