Skip to content

DELAUDIT

DELAUDIT#

Syntax#

delaudit ::=#

delaudit

delaudit_user_clause ::=#

delaudit_user_clause

delaudit_object_clause ::=#

delaudit_object_clause

Prerequisites#

Only the SYS user can delete auditing conditions with this statement.

Description#

This statement deletes auditing conditions that have been enabled to perform auditing within the Altibase server.

delaudit_user_clause#

This deletes auditing conditions that have the specified user name among statement auditing and DDL statement auditing conditions that have been enabled with the AUDIT … BY user_name statement.

ALL#

This deletes all statement auditing and DDL statement auditing conditions that have been enabled without the BY user_name clause. Object auditing conditions are not deleted.

delaudit_object_clause#

This deletes auditing conditions that have been enabled for a particular object.

Precautions#

When the DELAUDIT statement is executed, auditing conditions are deleted from SYS_AUDIT_OPTS_.

If auditing has already started, this statement cannot be executed. An error occurs if the user attempts to delete auditing conditions while auditing is being performed. You should first terminate auditing with the ALTER SYSTEM STOP AUDIT statement and then delete auditing conditions.

Example#

<Query 1> Delete auditing conditions for the user user1. After deletion, the user can see that the auditing conditions have been deleted from SYS_AUDIT_OPTS_.

iSQL> DELAUDIT by user1;
Audit success.
iSQL> SELECT * from SYSTEM_.SYS_AUDIT_OPTS_;
No rows selected.

<Query 2> If auditing has already started and DELAUDIT is executed, an error occurs. After terminating auditing, you can delete auditing conditions.

iSQL> alter system start audit;
Alter success.
iSQL> delaudit by user1;
[ERR-313B2 : Audit has already started.]
iSQL> alter system stop audit;
Alter success.
iSQL> delaudit by user1;
Audit success.