Valid in: SQL, ESQL
The Alter Security_Audit statement allows the current security audit log to be switched and for security auditing to be suspended or resumed in the current installation. This statement takes effect immediately and cannot be issued within a multi-statement transaction. It is available in dynamic SQL.
The Alter Security_Audit statement has the following format:
[EXEC SQL] ALTER SECURITY_AUDIT [SUSPEND|RESUME|RESTART|STOP] [WITH AUDIT_LOG = 'audit_filename']
Allows auditing to be suspended and later resumed. This allows maintenance on security audit logs to take place as required. When auditing is suspended any sessions that attempt to generate security audit records are stalled until auditing is resumed. Auditing is suspended immediately after the audit record logging the alter security_audit statement is written.
Auditing can only be suspended when it is active, and resumed when it is suspended.
On installation restart, auditing is resumed automatically.
To allow the audit system to be resumed, users with maintain_audit privilege can continue to access Ingres even when auditing is suspended. In this case any audit events generated are written to the audit log.
Restarts auditing.
Stops auditing on request. This statement cannot be used to start security logging for servers that were not started with logging enabled. Auditing can only be stopped when it is active, and restarted when it is stopped.
Security auditing can be stopped, either by issuing an alter security_audit stop statement, or as the result of an audit system condition such as logfull or on-error.
Sets the current installation security log. The security audit log can be changed whenever auditing is active (that is, when it is not stopped or suspended), or when restarting or resuming auditing. The audit log file specified must actually exist in the Ingres audit configuration.
Audit_filename can be specified using a string hostname variable in an embedded Alter Security_Audit statement.
Alter Security_Audit requires the maintain_audit privilege and can only be issued while connected to the iidbdb database.
The following examples allow the current security audit log to be switched and for security auditing to be suspended or resumed in the current installation:
alter security_audit resume;
Windows:
alter security_audit restart
with audit_log = 'd:\oping\ingres\files\audit.log'
UNIX:
alter security_audit restart
with audit_log = /install/ingres/files/audit.3
VMS:
alter security_audit restart
with audit_log = disk$7:[ingres.files]audit.3
alter security_audit
with audit_log = '/auditdisk/auditlog.7';