CREATE SECURITY_ALARM
Valid in: SQL, ESQL
The CREATE SECURITY_ALARM statement specifies, for tables, databases, or the current installation, the events to be written to the security log.
This statement has the following format:
[EXEC SQL] CREATE SECURITY_ALARM [alarm_name] ON
[TABLE | DATABASE] [schema.]object_name {, [schema.]object_name} |
CURRENT INSTALLATION
[IF SUCCESS | FAILURE | SUCCESS, FAILURE]
[WHEN SELECT | DELETE | INSERT | UPDATE | CONNECT | DISCONNECT]
[BY [USER | GROUP | ROLE] auth_id{, auth_id} | PUBLIC;]
[RAISE DBEVENT [dbevent_owner.]dbevent_name [dbevent_text]]
object_name
Specifies the table or database for which security events are logged.
IF SUCCESS | FAILURE | SUCCESS, FAILURE
Specifies when logging occurs:
SUCCESS
Creates a log record when a user succeeds in performing the specified type of access.
FAILURE
Creates a log record when a user attempts to perform the specified type of access and fails (the query is aborted). Users can fail to gain access to a table because they lack the required permissions.
SUCCESS, FAILURE
Logs all attempts to access the tables.
WHEN clause
Specifies the types of access to be logged. Any combination of the access types shown in the syntax diagram can be specified, in a comma-separated list.
BY clause
Specifies the user names of the users for whom logging is performed.
To log access attempts for all users, specify PUBLIC.
Default: PUBLIC
Permissions
You must own the table.
Related Statements
Help Security_Alarm