Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
cplusplus
Aged Yak Warrior
567 Posts |
Posted - 2011-07-27 : 21:40:02
|
| I have a dts file located at C:\MyJobs\calcPctRpt.DTSWhen i use DTSRUN c:\MyJobs\calcPctRpt.DTSvia Batch program, i am getting an error saying file not found.What is the right way to call a dts file thru a batch (.bat)Thank you very much for the helpful info. |
|
|
lappin
Posting Yak Master
182 Posts |
Posted - 2011-08-02 : 10:36:25
|
| Here is a procedure you can use - not very secure because the password is hardcodedOnce created you can create a SQL job to run a legacy DTS.CREATE procedure [dbo].[s_RunDTS] @DTSName as varchar (250)ASDECLARE @cmd as varchar (1000)SELECT @cmd = 'dtsrun /S "(local)" /U myUser /P myPassword /N "' + @DTSName + '"'EXEC master..xp_cmdshell @cmd |
 |
|
|
|
|
|