Solved

run a external program from a trigger

Posted on 2001-06-04
3
234 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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL query for highest sequence 4 62
SQL Consolidate rows 3 26
query analyser in sql server 2016 express edition 2 25
T-SQL: Stored Procedure Syntax 3 31
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

756 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