Solved

Executing a DTS package from a stored Procedure

Posted on 2001-06-04
6
412 Views
Last Modified: 2013-11-30
Hi All

How can I execute a DTS package stored on my SQL Server from a stored procedure.

Many Thanks

0
Comment
Question by:demmick
6 Comments
 
LVL 18

Expert Comment

by:nigelrivett
ID: 6153391
look at dts_run and xp_cmdshell.
Or you could set the job to run under the scheduler then use sp_startjob.
0
 
LVL 18

Expert Comment

by:nigelrivett
ID: 6153396
oops dtsrun
0
 

Author Comment

by:demmick
ID: 6155430
I know of the dtsrun comand but I can't use it in the Query analyser.  I am assuming that it will work in the stored procedure if it works in the query analyser.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 2

Expert Comment

by:niklausj
ID: 6157470
you can't use dtsrun directly from qa or sp, since it's a DOS command, you need to run it via xp_cmdshell (blocking) or add a job and use sp_startjob in your sp.
0
 
LVL 8

Expert Comment

by:chigrik
ID: 6158367
Read about "How can I run a DTS package from within SQL Server - e.g. a stored-procedure?"
http://www.ntfaq.com/Articles/Index.cfm?ArticleID=14230

Hope this helps
0
 
LVL 2

Accepted Solution

by:
iamari earned 15 total points
ID: 6754390
in the stored proc is like:

exec master..xp_cmdshell 'DTSRun /S (local) /U sa /P  /N myPackageName', NO_OUTPUT

where User id (sa) and Password (if existing) should be provided
no_output prevents the server from sending back the "Loading... " message to user
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Clone table from one server.database to another server.database 24 32
tempdb log keep growing 7 32
Parse this column 6 23
SQL - Simple Pivot query 8 10
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

791 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