SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 executing DTS from stored procedure
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

u2p_inst
Yak Posting Veteran

Indonesia
78 Posts

Posted - 05/01/2003 :  01:37:39  Show Profile  Reply with Quote
Dear all,

How to executing DTS from stored procedure??

thx

oh

Merkin
Funky Drop Bear Fearing SQL Dude!

Australia
4970 Posts

Posted - 05/01/2003 :  03:15:17  Show Profile  Visit Merkin's Homepage  Reply with Quote
Hi

There are two basic ways to do this.

1. Use XP_CmdShell to run the DTSRUN.exe program. I wouldn't recommend that as it means giving SA access.

2. Create a job that runs the DTS package, but don't give it a schedule. Then use the sp_start_job proc from the MSDB database to run the job.


Damian
Go to Top of Page

nr
SQLTeam MVY

United Kingdom
12543 Posts

Posted - 05/01/2003 :  09:59:19  Show Profile  Visit nr's Homepage  Reply with Quote
Can also use sp_oacreate
see
www.nigelrivett.com
sp_oacreate Load DTS

Only really useful if you want to change some properties from the SP before running the package.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000