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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-01-03 : 09:57:24
|
| Talal writes "i have an insert trigger on a table.i want to run a vb application "xyz.exe" whenever an insert is made in this table. how i can use my SQL trigger based on this table to run that application.what is the command for that." |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2002-01-03 : 18:20:58
|
| xp_cmdshell is what you would use to run a command-line exe, but doing this in a trigger is likely death to performance because your trigger won't finish until your exe finishes. I would encourage you to look into another way of doing this. Perhaps setting a flag in a table from your trigger and having a scheduled job periodically check for the flag and run the executable.--------------------------------------------------------------1000 Posts, Here I come! I wonder what my new title will be... |
 |
|
|
royv
Constraint Violating Yak Guru
455 Posts |
Posted - 2002-01-03 : 18:58:20
|
| To give an example of what Mark is saying, we have Siebel here in our offices, and a seperated Siebel database hooks up to our main production database. We were calling an exe from a trigger that was used to synchronize data between the 2 databases. One day needles to say, the exe, which runs in SQL Server memory space, caused the SQL Server to crash, which cost us alot of money. If you can avoid it, do not call an exe from a trigger.*************************Just trying to get things done |
 |
|
|
|
|
|