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
 SQL Server Development (2000)
 Call Job from SP

Author  Topic 

murrayb3024
Yak Posting Veteran

79 Posts

Posted - 2005-05-12 : 09:54:20
I finally have given up hope on calling a DTS package from a VB app on a machine without Enterprise manager on it. So now I want to try to create a job and then call that job from a stored procedure. How do i call TestJob from a stored procedure?

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2005-05-12 : 09:59:26
Will this help?
sp_add_job, sp_add_jobstep, sp_add_jobschedule

________________________________________________

Beer is a privilege of the working man.

In the fridge: Edil Pils.

Go to Top of Page

murrayb3024
Yak Posting Veteran

79 Posts

Posted - 2005-05-12 : 10:15:58
I am looking for the command to call TestJob from within a Stored Procedure.
Go to Top of Page

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2005-05-12 : 10:21:14
quote:
Originally posted by murrayb3024

I am looking for the command to call TestJob from within a Stored Procedure.



Well, I have never seen anything...
perhaps doing...
sp_add_jobschedule

and just having it run at that moment in time.

________________________________________________

Beer is a privilege of the working man.

In the fridge: Edil Pils.

Go to Top of Page

murrayb3024
Yak Posting Veteran

79 Posts

Posted - 2005-05-12 : 10:27:01
I had a post from mfemenel yesterday that said you could call a job from a stored procedure, hoping someone knew the sytax for it.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-05-12 : 23:06:52
execute sp_start_job, check BOL for more details

--------------------
keeping it simple...
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-05-13 : 00:57:54
We use it all the time. Just use what Jen told you.

EXEC sp_start_job @job_name = 'boo'



MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -