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 2012 Forums
 Other SQL Server 2012 Topics
 Run a job in SQL Server Management Studio

Author  Topic 

kev8279
Starting Member

6 Posts

Posted - 2013-07-25 : 03:15:57
Hi There,

I have a job set up which outputs a file to a location on a server. What I'm trying to do it set up a stored procedure to do some other stuff and then start this job. Is there any way of doing it? The only stuff I can find on the net is sp_Start_Job which seems to be for T-SQL and doesn;t work in here.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2013-07-25 : 03:38:33
a job can have multiple steps.
step 1 can be to start your stored procedure
step 2 can be to start "what your current job is doing"


Too old to Rock'n'Roll too young to die.
Go to Top of Page

kev8279
Starting Member

6 Posts

Posted - 2013-07-25 : 04:13:56
So is it not possible to start a job via an SP?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-25 : 04:43:03
quote:
Originally posted by kev8279

So is it not possible to start a job via an SP?


its possible

use
sp_start_job for executing a job from t-sql script inside procedure

http://msdn.microsoft.com/en-us/library/ms186757.aspx



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2013-07-25 : 05:36:12
it is possible (using T-SQL) but that was not your question...


Too old to Rock'n'Roll too young to die.
Go to Top of Page

dgh898
Starting Member

10 Posts

Posted - 2013-08-08 : 23:05:55
unspammed
Go to Top of Page
   

- Advertisement -