Information
Creating and applying audit policies is crucial for securing and discovering issues within your databases.
Audit policies can help trigger events for changes to data objects, table DML, and user access.
Rationale:
If audit policies are not enabled, issues may go undiscovered, and compromises and other incidents may occur without being quickly detected. It may also not be possible to provide evidence of compliance with security laws, regulations, and other requirements.
Impact:
Auditing all categories within the database can have an impact on the peformance of the database server depending on the workload and number of transactions. If enabling audit as part of the remedation, analysis should be performed on which categories are required to meet business needs.
Solution
Connect to the Db2 database.
db2 => connect to <dbname>
Issue the following command to create an audit policy. This policy audits all categories. An analysis should be performed to determine which categories are required to meet business needs.
db2 => create audit policy AUDITDB CATEGORIES ALL STATUS BOTH ERROR TYPE AUDIT
Audit the database using the policy just created with the following command:
db2 => audit database using policy AUDITDB