OceanBase Database supports auditing specified database objects and recording only specific operations performed on these objects. The auditable database objects include tables, sequences, and views.
Limitations
Currently, only the Oracle mode of OceanBase Database supports the security audit feature.
Audit a single user's operations on specified database objects
Here is an example.
To audit the aud user's insert operations on the tab1 table, log in to the database as the ORAAUDITOR user and enable the security audit feature.
obclient> AUDIT INSERT ON tab1 BY aud;
Audit all users' operations on specified database objects
Here is an example.
To audit all users' failed DML operations on the tab1 table, log in to the database as the ORAAUDITOR user and enable the security audit feature.
obclient> AUDIT INSERT, UPDATE, DELETE ON tab1 WHENEVER NOT SUCCESSFUL;
References
For more information about audit operations, see the following topics: