Solved

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

Posted on 2012-04-13
3
535 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

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

856 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