Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute DTS package from SQL

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
Can you execute a DTS package from transact SQL.

What I am trying to do is send a command via an Access pass through query.

Can I do that?

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Here is a method!

Presuming you have already created your DTS package, create a job by right clicking the package name and scheduling it. It will then create a job in the Jobs section of Enterprise Manager.

Edit the job and disable it. That way it will not run unless you manually execute it ... which we will do in the next step.

Now ... to execute the job we can submit the following command:
Code:
EXEC MSDB..sp_start_job @job_name = 'MyDTSPackageJobName'

Of course, change 'MyDTSPackageJobName' to the name of the job you created from your DTS package.

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top