Solved

run a external program from a trigger

Posted on 2001-06-04
3
237 Views
Last Modified: 2012-06-27
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
Comment
Question by:neeraj523
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
nigelrivett earned 50 total points
ID: 6152090
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
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6152297
i agree with nigelrivett
0
 
LVL 22

Author Comment

by:neeraj523
ID: 6155165

Thanx nigelrivett for your valuable suggustion...
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question