Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute a DTS package from a Stored Procedure or Trigger

Status
Not open for further replies.

DrSql

Programmer
Jul 16, 2000
615
US
I have a procedure to manipulate some data and at the end I need to out that in to a *.txt and *.csv format.
So I created a DTS package. Now I would like to call the DTS package as a last step of the stored procedure or Trigger.
Any suggestions would be great.
Thanks



Dr. Sql
vpathisseril@yahoo.com
Good Luck.
 
xp_CMDShell 'dtsrun ...'

Not pretty, but effective.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
I wouldn't do it from a trigger. I quote member donutman from SQL Programming forum:

Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil!

And another, freely quoted, don't remember whose:
Cursors are good if you don't know Sql
(meaning use preferably set-based instead of row-based)

Good luck

Cheers


[blue]Backup system is as good as the latest recovery[/blue]
 
I agree that triggers are evil, but sometimes they are needed. Just not as often as most people think.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
Is anyone have any altrenate method to this.
Basicallly I want users to generate this file when ever they needed.
Thanks


Dr. Sql
vpathisseril@yahoo.com
Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top