SQL Trigger dont works...
Posted
by
Gabotron
on Stack Overflow
See other posts from Stack Overflow
or by Gabotron
Published on 2011-02-28T15:23:31Z
Indexed on
2011/02/28
15:24 UTC
Read the original article
Hit count: 222
Is there a way in which a Trigger is not fired?
We have this situation:
We have a table and there are rows that are been deleted. We need to know who and/or when these row are deleted.
We create this trigger:
ALTER TRIGGER [dbo].[AUDITdel_nit] ON [dbo].[Client]
FOR DELETE
AS
Insert into AUDIT select 'Delete', getdate(), 'Row Deleted', SYSTEM_USER, host_name(),
(select 'ID Client: ' + convert(varchar(12),Id) from deleted), 'Client' ,APP_NAME()
We made somte test: deleting rows vis stored procedures and the deleted rows appears in our AUDIT table.
But suddenly today we found a row deleted that dont appears in the AUDIT table...
Any idea how it can be done?
© Stack Overflow or respective owner