How to write an audit trail for a table

1.5k Views Asked by At

I am using vb5 and sybase db. I have different roles of people ( with active directory groups), change the tables. I want to write an audit trail (audit table) for this table, to see...all those who changed with time stamp). How to acheive this?

2

There are 2 best solutions below

0
On BEST ANSWER

Triggers will work, but depending on the level of granularity and security you need, you may also want to look at using the auditing functionality included in Sybase ASE.

Here is the information on the built in auditing options:

Sybase ASE System Admin Guide: Security Administration - Auditing

Sybase ASE System Admin Guide: Auditing

1
On

Try the following:

Create a new table with _log (by copying the original table) with an extra column called audit and force inserts/updates into the table with a trigger or by writing an audit procedure. We applied the same logic to dozens of tables in my last company and it served the purpose.