The following steps detail the process for enabling a database for auditing. Ensuring the security of your audit data requires that the audit data tables be empty when you enable auditing. When you enable your database for auditing, your database can be in one of two possible states: auditing is disabled (or has never been previously enabled) or auditing is deactivated.
To enable a database for auditing that was not previously enabled:
1. Create a structure file (.st) defining an area for your audit tables, and optionally an area for your audit indexes.
2. Add the areas to your database using PROSTRCT ADD. For more information on creating a structure file, and using PROSTRCT, see MaintainingDatabase Structure.
3. Enable your database with PROUTIL ENABLEAUDITING. The following command enables auditing for a database named sample-db, and places the auditing tables in an area named "Audit Area", the auditing indexes in an area named "Audit Indexes", and deactivates the non-primary indexes:
Successfully enabling the database results in the following message:
Auditing has been enabled for database sample-db. (12479)
Once you have enabled a database for auditing, you must define and activate an auditing policy to begin generating an audit trail. For information on auditing policies, see the Audit Policy Maintenance online Help.