Avatar of Richard Comito
Richard Comito
Flag for United States of America asked on

Can I use EXEC sp_start_job in a Stored Procedure?

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?

Thanks,

GabicusC
Microsoft SQL ServerMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
Aneesh

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Aneesh

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck