Solved

SP to run DTS's

Posted on 2012-04-05
2
267 Views
Last Modified: 2012-04-16
Team -

I have 5 DTS packages which i am running to upload 5 different csv files to 5 different tables. This is a routine process which i need to run everyday.

can someone help me to write an SP where i call all the 5 dts's pls. so i just have to run 1 SP instead of 5 different dts
0
Comment
Question by:davidi1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
QPR earned 500 total points
ID: 37815262
this requires using  xp_cmdshell.
If you'd prefer not to do this then set up a SQL "job" for the DTS package and then run the job from within your SP by using sp_start_job
Use this for each job you want to start.

http://msdn.microsoft.com/en-us/library/ms186757(v=sql.90).aspx
0
 
LVL 25

Expert Comment

by:jogos
ID: 37815295
How to run dts from sql
http://www.sql-server-performance.com/forum/threads/how-to-run-dts-from-t-sql.19155/

But mind on how to handle errors.

Which sql version? You can also make one SSIS package which handles the 5 files.
http://msdn.microsoft.com/en-us/library/ms141026(v=sql.100).aspx
0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

729 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