Paul Nielsen has an "AutoAudit.sql" script at
http://www.sqlserverbible.com/

It goes through every table and creates a trigger to insert into the
audit table whenever an add/change/delete occurs.




-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Patrick McElhaney
Sent: Monday, November 19, 2007 11:10 AM
To: [email protected]
Subject: [CFCDEV] Audit Log


I have to put together an audit log for a CMS.

My plan is to store the log in simple un-normalized database table.

- id
- timestamp
- userid
- category (always 'articles' for now)
- key (always articleID for now)
- action (create, update, delete, discard changes, lock, unlock,
restore)
- data (the article serialized)

I have other types of content (not articles) and I may want to include
other state changes down the road. I figure this way I can track
anything with a simple method call: auditLog.log(userid, category,
key, action, data).

It seems deceptively simple. Having never built any kind of audit log,
I thought I would check to see if anyone has advice about what to keep
in mind.

Thanks,

Patrick




-- 
Patrick McElhaney
704.560.9117



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to