Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Other SQL Server 2012 Topics
 Run a job in SQL Server Management Studio
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kev8279
Starting Member

United Kingdom
6 Posts

Posted - 07/25/2013 :  03:15:57  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

Germany
8781 Posts

Posted - 07/25/2013 :  03:38:33  Show Profile  Visit webfred's Homepage  Reply with Quote
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

United Kingdom
6 Posts

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

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 07/25/2013 :  04:43:03  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

Germany
8781 Posts

Posted - 07/25/2013 :  05:36:12  Show Profile  Visit webfred's Homepage  Reply with Quote
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 - 08/08/2013 :  23:05:55  Show Profile  Reply with Quote
unspammed
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000