Logging access activity for trusted sessions example

You can change LOG_ACCESS_ONLY functionality by using IGNORE_REQUEST as shown in the following examples.

SR language examples

The following example contains three if statements:
  1. If the initial OS_USER is ORACLE19, then transform the OS user from ORACLE19 to SIRIUS.
  2. Log access only for all sessions where FRED is the database user.
  3. If the OS_USER is SIRIUS, stop logging access if any user runs a statement that contains * FROM.
SR_POLICIES
{
        IF(OS_USER = 'ORACLE19')
        {
                TRANSFORM_OS_USER SEARCH_PREFIX = '?' OUTPUT_FORMAT = 'SIRIUS'
        }
        IF(OS_USER = 'SIRIUS')
        {
                LOG_ACCESS_ONLY SEARCH_PREFIX = 'DB_USER:FRED'
        }
        IF(OS_USER = 'SIRIUS')
        {
                STOP_LOG_ACCESS_ONLY SEARCH_PREFIX = 'STATEMENT:%* FROM%'
        }
}

The following example performs a soft discard, with an option to revert the discard if sysdate is found in the sent statement.

The second action reverts the soft discard if any user runs a statement that contains * FROM.
SR_POLICIES
{
 	IF(*)
 	{
 	SOFT_DISCARD_SESSION SEARCH_PREFIX = 'STATEMENT:%sysdate%'
        STOP_SOFT_DISCARD_SESSION SEARCH_PREFIX = 'STATEMENT:%* FROM%'
 	}