SQL Trigger dont works...
- by Gabotron
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?