Hi,
1. Enable the execution of xp_cmdshell feature
2. Create trigger that execute selected exe file
hope that help,
Béchir.
USE [TEST]
GO
DROP TABLE [dbo].[table1]
GO
-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1;
GO
-- To update the currently configured value for advanced options.
RECONFIGURE;
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1;
GO
-- To update the currently configured value for this feature.
RECONFIGURE;
GO
--Create table1
CREATE TABLE dbo.table1(
table_id int IDENTITY(1,1) NOT NULL,
table_desc nvarchar(50) NULL,
)
GO
CREATE TRIGGER after_insertData
ON TEST..table1
AFTER INSERT
AS
BEGIN
declare @strcmdshell nvarchar(200)= N'C:\Windows\notepad.exe';
exec master..xp_cmdshell @strcmdshell
END
GO