Juan;
This might be a starting point for you.
CREATE TRIGGER [LineCallCopy] ON [dbo].[LineCall]
FOR INSERT, UPDATE
AS
BEGIN
INSERT INTO LineCallAudit
SELECT * FROM Inserted
END
Tom
>Hi,
>
>We need to implement an audit log to keep trace of data changes at database level by using triggers FOR INSERT, UPDATE, DELETE. It must keep user info. datetime, action (New, Delete, Update), old value, new value, etc.
>
>Is there any generic code or SQL tool to implement this trigger ?
>
>Since audit logs grow very fast and must be reduced often, is it a good practice to use a different database to keep the log table?
>
>Thanks
>Juan C.