Solved

How to schedule an sql agent job starting a SSIS Package from within a vb.net application?

Posted on 2012-04-13
3
533 Views
Last Modified: 2013-12-24
I have a SSIS package stored on a remote SQL server 2008 database (web).
From a .net web application (running on another web server) I would like to schedule this db stored SSIS package as  a sql agent job to run on a specified point of time.

I have the code for creating the SQL Agent job, and that functios.
It is something like this:
....
Dim jbstp As JobStep
jbstp = New JobStep(jb, strJobb & "_Step1")
jbstp.Command = "?????"

But how do I specify the SSIS package which is stored on the remote in the remote SQL server 2008?
The SSIS package will also need some parameters
0
Comment
Question by:Joar
3 Comments
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 500 total points
ID: 37841826
jbstp.Command = "dtexec /sq pkgOne /ser productionServer"

The following link shows all the parameters for DTSEXEC
http://msdn.microsoft.com/en-us/library/ms162810(v=sql.90).aspx
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 37846467
jbstp.Command = "dbo.sp_start_job 'Your SQL Server Agent Job Name Goes Here'"
0
 

Author Closing Comment

by:Joar
ID: 37856832
Did function! Thank you!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question