Jim Horn
asked on
Better way to handle 'auditing' columns such as created_by, created_dt, last_updated_by, last_updated_dt
Hi guys
In a previous question I made the below comment, which resulted in feedback that there are better ways to handle these values, to include splitting them into a separate table.
Points for advice on a better way to handle this.
Thanks.
Jim
In a previous question I made the below comment, which resulted in feedback that there are better ways to handle these values, to include splitting them into a separate table.
As a general rule any table I design that has data entry, I'll add four 'auditing' columns to it that populate via INSERT and UPDATE triggers:
created_dt - datetime - of the entry
created_by_id - varchar(30) - SUSER_NAME() of the person creating it
last_updated_dt - datetime - of any insert-update
last_updated_by_id - varchar(30) - SUSER_NAME() of the person updating it.
Points for advice on a better way to handle this.
Thanks.
Jim
Have you tried CDC feature yet ?
ASKER
No. Have you implemented CDC, and if so how did you do it, and what were the benefits?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.