Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!netcom!amdcad!sun!exodus!jethro!backnine.Corp.Sun.COM!gerardt From: gerardt@backnine.Corp.Sun.COM (Gerard Tynen) Newsgroups: comp.databases Subject: Audit trails -- any ideas? Message-ID: <3759@jethro.Corp.Sun.COM> Date: 4 Apr 91 01:23:57 GMT Sender: news@jethro.Corp.Sun.COM Reply-To: gerardt@backnine.Corp.Sun.COM (Gerard Tynen) Distribution: usa Organization: Sun Microsystems, Inc. Mt. View, Ca. Lines: 23 I would like to implement an audit trail mechanism in a Sybase database I am designing. It calls for tracking, on a user level, who did what to what when. I want to turn it off and on, on a table by table basis. I want to keep all the audits in one table if I can. So for example, we could have a table like so: Audit_Trail -- table_id user_id operation timestamp what_happened -------- ------- --------- --------- --------------- EMP BIFF CREATE 10am added new emp# 2345 DEPT BIFF UPDATE 11am changed dept ABC to DEF EMP MUFFY DELETE 1pm removed emp# 1234 What I am at a loss to figure out is how do I keep track of "what_happened". It's really different for each table. I don't know. Maybe some kind of cryptic code or something. Anyway, has anyone out there ever tried this kind of thing? GT