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 package from SQL Stored procdure

Status
Not open for further replies.

sjuarez1979

Programmer
Jun 26, 2001
35
US
Is it possible to execute a Data Transformation Package from a sql store procedure? Say the local package name is ImportData, what would the sql syntax be to execute that package. I have seen the use of running a shell that runs dtsrun.exe but I want to know if there is a better way.

Seth
 
You can use sp_cmdshell to execute dtsrun.
Or if you don't want to use that, you can schedule it to SQL Server Agent. Disable the schedule to make it run only when you kick off, then execute the job with a stored procedure.
Andel
andel@barroga.net
 
Check the FAQ area of this forum for DTS resaources. One of those resources is the SQLDTS website. You can find different methods for executing a package at the following link.


You could also create a JOB that executes the package and start teh job from a stored proc. See sp_start_job in SQL BOL. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
can i define my own procs/functions in local package?
if yes, then tell me how this can be done?
 
Infy2000,

I have two recommendations.

1) Read about DTS in SQL Books Online. There is a lot of information including a section titled "Adding Functionality to a DTS Package."

DTS Overview link:

2) Post new questions in a new thread. Many members may not look at this thread because there are several posts and they may assume the question has been answered. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
If a person was doing a lot of DTS work, Wrox has a book called 'Professional SQL Server 2000 DTS' that could be helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top