• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

run a external program from a trigger

Hi all...

I m trying to run an external program through a trigger on data modification... But it is not perofrming the required function.. even it is not giving any error..

'''''''''''''''''''''
CREATE TRIGGER try1_trigger
ON try1
FOR INSERT, UPDATE, DELETE
AS
 DECLARE @sCmd varchar(256)
 EXEC master.dbo.xp_cmdshell  'C:\winnt.sbs\notepad.exe'
''''''''''''''''


please let me know where i m wrong...

thanx
0
neeraj523
Asked:
neeraj523
1 Solution
 
nigelrivettCommented:
notepad opens a window and requires user interaction to close it so it will be waiting for that.

try something like a make directory command to test.
(not keen on running exe's from triggers, good way of crashing a system).
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
i agree with nigelrivett
0
 
neeraj523Author Commented:

Thanx nigelrivett for your valuable suggustion...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now