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)
 DTS execution from a trigger

Author  Topic 

sjpaq@rogers.com
Starting Member

18 Posts

Posted - 2007-11-12 : 12:23:38
1. I have to interface some SQL Server information to a mainframe.
2. I have created a stored procedure that builds the required interface data into a table and builds the FTP commands (userid password, etc.) for mainframe into another table.
3. I have created a DTS package that writes the FTP commands to a text and another DTS package that writes the data to a text file and runs the FTP commands to upload to the mainframe.
4. I can succesfully the 2 DTS packages from EM on my PC and from EM on the sever that runs SQL server.

5. However when I run the package from a trigger it just hangs and never returns.

Anybody know what is happening?
Any ideas on how to get this to work. Any ideas on how to troubleshoot this?
I have czeated process to run

sjpaq@rogers.com
Starting Member

18 Posts

Posted - 2007-11-12 : 12:26:09
I meant to add that the commands that I am executing from the trigger for the DTS packages are the following:

exec master..xp_cmdshell 'dtsrun /S OHxxxSDB_TEST /U xxx /P xxx /N CCSFTPCommandsOutput /L c:\testDTS\DTSlog.txt'
and
exec master..xp_cmdshell 'dtsrun /S OHxxxSDB_TEST /U xxx /P xxx /N CCSInterfaceOutput /L c:\testDTS\DTSlog.txt'
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-12 : 12:27:46
Never, ever, ever run commands from a trigger! This is absolutely a bad idea.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-12 : 12:34:40
Was that the cause of this as well?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=92507



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-12 : 12:38:42
quote:
Originally posted by dataguru1971

Was that the cause of this as well?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=92507



Poor planning on your part does not constitute an emergency on my part.





Infinite loop! (You posted the same link as this thread)

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-12 : 13:04:40
quote:
Originally posted by tkizer

quote:
Originally posted by dataguru1971

Was that the cause of this as well?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=92507



Poor planning on your part does not constitute an emergency on my part.





Infinite loop! (You posted the same link as this thread)

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/



Isn't that the problem with the trigger?



meant this one:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=92426



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

sjpaq@rogers.com
Starting Member

18 Posts

Posted - 2007-11-12 : 13:04:48
Thanks for the advice tkizer!!
What do you recommend to execute a DTS package from a trigger. Is there a way to execute DTS through TSQL?

dataguru1971
I suspect that you were trying to point the thread that I started Saturday with locks. I suspect that this was the cause of the locks.

Any advice is appreciated.


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-12 : 13:10:30
There is no recommendation to execute a DTS package via a trigger. A trigger should not perform this type of work.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-12 : 13:23:45
quote:
Originally posted by sjpaq@rogers.com

Thanks for the advice tkizer!!
What do you recommend to execute a DTS package from a trigger. Is there a way to execute DTS through TSQL?

dataguru1971
I suspect that you were trying to point the thread that I started Saturday with locks. I suspect that this was the cause of the locks.

Any advice is appreciated.






Precisely. I recalled the issue, and thought THIS issue might have a hand it in.



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page
   

- Advertisement -