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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 How To Calling DTS Package Using SP

Author  Topic 

raman.p123
Starting Member

4 Posts

Posted - 2006-08-01 : 01:41:08
HI..
Please can u help me how to call the DTS package from a stored procedure.
Please help me in this regard.

nr
SQLTeam MVY

12543 Posts

Posted - 2006-08-01 : 06:23:56
Have a look at dtsexec and xp_cmdshell.


==========================================
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

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2006-08-01 : 09:04:51
I have a question regarding this: some time ago I had the same need and I notised (by accident actually)that scheduling a DTS creates a job in the sql server agent. I deleted the schedule and ran the job using sp_start_job...I found this to be quite easy so I stuck with it, but is this a bad approach?

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-08-01 : 09:13:57
If you look at the job it will just be a dtsexec command - it will have an encrypted reference to the package which is a bit of a pain as it is difficult to know what you are running if someone renames the job.

You will get the job history doing it the way you are but otherwise I don't see any use for the job. You can just code the exec in the SP.

==========================================
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

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2006-08-01 : 09:23:30
Ok, thanx alot

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"
Go to Top of Page
   

- Advertisement -