dbTalk Databases Forums  

Start Sql Agent Job

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Start Sql Agent Job in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe Pelayo
 
Posts: n/a

Default Start Sql Agent Job - 12-05-2003 , 04:41 PM








Hello,

I currently have a large job created in Sql Server Agent, and I would
like to be able to start the job using either C# or VB.Net. I know I
can start a DTS package with C# but basically this job is very large and
I would like SQl to run it then send a message back when it's finished.

Any help would be appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
Narayana Vyas Kondreddi
 
Posts: n/a

Default Re: Start Sql Agent Job - 12-06-2003 , 04:43 PM






You can start a job using msdb..sp_start_job stored procedure.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm




"Joe Pelayo" <jpelayo (AT) front-line (DOT) com> wrote



Hello,

I currently have a large job created in Sql Server Agent, and I would
like to be able to start the job using either C# or VB.Net. I know I
can start a DTS package with C# but basically this job is very large and
I would like SQl to run it then send a message back when it's finished.

Any help would be appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #3  
Old   
Cindy Gross
 
Posts: n/a

Default Re: Start Sql Agent Job - 12-10-2003 , 11:10 AM



You could use a stored procedure with a return code defined to start the
job and check the status. The return code would tell the calling
application that the DTS package execution has completed.

Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.