Enable or Disable Unified Auditing in Oracle 19c

Enable or Disable Unified Auditing in Oracle 19c: In this Article we will discuss about how to Enable or Disable Unified Auditing in Oracle 19c.

What is Unified Auditing?

After installing and starting up your oracle 19c database, check that the “Unified Auditing” status by default it should be “FALSE”.

When you create a new database, by default the database uses mixed mode auditing, which enables both traditional (that is, the audit facility from releases earlier than Release 12c) and the new audit facilities (unified auditing). This chapter describes how to use pure unified auditing only.

You can enable the database in either of these two modes, The mixed mode auditing or pure unified auditing mode. In mixed mode, you can use the new unified audit facility alongside the traditional auditing facility. In pure unified auditing, you only use the unified audit facility.

How to enable Unified Auditing?

Firstly, Check the Unified Auditing status and set the audit_trail value:

You need to check the Unified Auditing value is FALSE it means Unified Auditing status is disabled and the audit_trail parameter value is must be set to NONE. Here audit_trail parameter was set DB so, we changed it’s value to NONE. For changing the audit_trail parameter value you should take a restart of database.

SQL> set lines 400 pages 400
SQL> col value for a30
SQL> col parameter for a50
SQL> select parameter, value from v$option where parameter='Unified Auditing';

PARAMETER                                          VALUE
-------------------------------------------------- ------------------------------
Unified Auditing                                   FALSE

SQL>
SQL> show parameter audit_trail

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
audit_trail                          string      DB
SQL>
SQL> alter system set audit_trail=none scope=spfile;

System altered.

SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup;
ORACLE instance started.

Total System Global Area  805303360 bytes
Fixed Size                  8901696 bytes
Variable Size             239075328 bytes
Database Buffers          549453824 bytes
Redo Buffers                7872512 bytes
Database mounted.
Database opened.
SQL>
SQL> show parameter audit_trail

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
audit_trail                          string      NONE
SQL>

Shutdown the Database and Stop all services related to Oracle Binary:

Required to shutdown the database, listener and all services related to Oracle Binary.

[oracle@test ~]$ ps -ef | grep pmon
oracle   30663     1  0 23:13 ?        00:00:00 ora_pmon_ORCL
oracle   30996 26167  0 23:14 pts/1    00:00:00 grep --color=auto pmon
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep tns
root        23     2  0 16:00 ?        00:00:00 [netns]
oracle   30638     1  0 23:13 ?        00:00:00 /u01/app/oracle/product/19c/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle   31003 26167  0 23:14 pts/1    00:00:00 grep --color=auto tns
[oracle@test ~]$
[oracle@test ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Feb 17 23:14:20 2024
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@test ~]$
[oracle@test ~]$ lsnrctl stop LISTENER

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 17-FEB-2024 23:16:46

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
The command completed successfully
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep pmon
oracle   31157 26167  0 23:16 pts/1    00:00:00 grep --color=auto pmon
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep tns
root        23     2  0 16:00 ?        00:00:00 [netns]
oracle   31163 26167  0 23:16 pts/1    00:00:00 grep --color=auto tns
[oracle@test ~]$

Now, Enable the Unified Auditing:

Go to the $ORACLE_HOME/rdbms/lib location, copy ins_rdbms.mk file for backup purpose and execute below command to enable the Unified Auditing.

[oracle@test ~]$ cd $ORACLE_HOME/rdbms/lib
[oracle@test lib]$
oracle@test lib]$ pwd
/u01/app/oracle/product/19c/dbhome_1/rdbms/lib
[oracle@test lib]$
[oracle@test lib]$ ls -ltr ins_rdbms.mk
-rw-r--r--. 1 oracle oinstall 43434 Apr 17  2019 ins_rdbms.mk
[oracle@test lib]$
[oracle@test lib]$ cp ins_rdbms.mk ins_rdbms.mk_backup
[oracle@test lib]$
[oracle@test lib]$ ls -ltr ins_rdbms.mk*
-rw-r--r--. 1 oracle oinstall 43434 Apr 17  2019 ins_rdbms.mk
-rw-r--r--. 1 oracle oinstall 43434 Feb 17 23:45 ins_rdbms.mk_backup
[oracle@test lib]$
[oracle@test lib]$ make -f ins_rdbms.mk uniaud_on ioracle
/usr/bin/ar d /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/libknlopt.a kzanang.o
/usr/bin/ar cr /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/kzaiang.o
chmod 755 /u01/app/oracle/product/19c/dbhome_1/bin

 - Linking Oracle
rm -f /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/oracle
/u01/app/oracle/product/19c/dbhome_1/bin/orald  -o /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/19c/dbhome_1/rdbms/lib/ -L/u01/app/oracle/product/19c/dbhome_1/lib/ -L/u01/app/oracle/product/19c/dbhome_1/lib/stubs/   -Wl,-E /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/opimai.o /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv19 -Wl,--no-whole-archive /u01/app/oracle/product/19c/dbhome_1/lib/nautab.o /u01/app/oracle/product/19c/dbhome_1/lib/naeet.o /u01/app/oracle/product/19c/dbhome_1/lib/naect.o /u01/app/oracle/product/19c/dbhome_1/lib/naedhs.o /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/config.o  -ldmext -lserver19 -lodm19 -lofs -lcell19 -lnnet19 -lskgxp19 -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lclient19  -lvsnst19 -lcommon19 -lgeneric19 -lknlopt -loraolap19 -lskjcx19 -lslax19 -lpls19  -lrt -lplp19 -ldmext -lserver19 -lclient19  -lvsnst19 -lcommon19 -lgeneric19 `if [ -f /u01/app/oracle/product/19c/dbhome_1/lib/libavserver19.a ] ; then echo "-lavserver19" ; else echo "-lavstub19"; fi` `if [ -f /u01/app/oracle/product/19c/dbhome_1/lib/libavclient19.a ] ; then echo "-lavclient19" ; fi` -lknlopt -lslax19 -lpls19  -lrt -lplp19 -ljavavm19 -lserver19  -lwwg  `cat /u01/app/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnro19 `cat /u01/app/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnnzst19 -lzt19 -lztkg19 -lmm -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lztkg19 `cat /u01/app/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnro19 `cat /u01/app/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnnzst19 -lzt19 -lztkg19   -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 `if /usr/bin/ar tv /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo19 -lserver19"; fi` -L/u01/app/oracle/product/19c/dbhome_1/ctx/lib/ -lctxc19 -lctx19 -lzx19 -lgx19 -lctx19 -lzx19 -lgx19 -lclscest19 -loevm -lclsra19 -ldbcfg19 -lhasgen19 -lskgxn2 -lnnzst19 -lzt19 -lxml19 -lgeneric19 -locr19 -locrb19 -locrutl19 -lhasgen19 -lskgxn2 -lnnzst19 -lzt19 -lxml19 -lgeneric19  -lgeneric19 -lorazip -loraz -llzopro5 -lorabz2 -lorazstd -loralz4 -lipp_z -lipp_bz2 -lippdc -lipps -lippcore  -lippcp -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lsnls19 -lunls19  -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lasmclnt19 -lcommon19 -lcore19  -ledtn19 -laio -lons  -lmql1 -lipc1 -lfthread19    `cat /u01/app/oracle/product/19c/dbhome_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/19c/dbhome_1/lib -lm    `cat /u01/app/oracle/product/19c/dbhome_1/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/19c/dbhome_1/lib `test -x /usr/bin/hugeedit -a -r /usr/lib64/libhugetlbfs.so && test -r /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/shugetlbfs.o && echo -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -lhugetlbfs`
rm -f /u01/app/oracle/product/19c/dbhome_1/bin/oracle
mv /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/oracle /u01/app/oracle/product/19c/dbhome_1/bin/oracle
chmod 6751 /u01/app/oracle/product/19c/dbhome_1/bin/oracle
(if [ ! -f /u01/app/oracle/product/19c/dbhome_1/bin/crsd.bin ]; then \
    getcrshome="/u01/app/oracle/product/19c/dbhome_1/srvm/admin/getcrshome" ; \
    if [ -f "$getcrshome" ]; then \
        crshome="`$getcrshome`"; \
        if [ -n "$crshome" ]; then \
            if [ $crshome != /u01/app/oracle/product/19c/dbhome_1 ]; then \
                oracle="/u01/app/oracle/product/19c/dbhome_1/bin/oracle"; \
                $crshome/bin/setasmgidwrap oracle_binary_path=$oracle; \
            fi \
        fi \
    fi \
fi\
);
[oracle@test lib]$

Start the Database and all services related to Oracle Binary:

SQL> startup;
ORACLE instance started.

Total System Global Area  805303360 bytes
Fixed Size                  8901696 bytes
Variable Size             239075328 bytes
Database Buffers          549453824 bytes
Redo Buffers                7872512 bytes
Database mounted.
Database opened.
SQL>
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@test ~]$
[oracle@test ~]$ lsnrctl start LISTENER

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-FEB-2024 00:03:31

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /u01/app/oracle/product/19c/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                18-FEB-2024 00:03:31
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully

[oracle@test ~]$
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep pmon
oracle    2068     1  0 00:01 ?        00:00:00 ora_pmon_ORCL
oracle    2559  1831  0 00:04 pts/1    00:00:00 grep --color=auto pmon
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep tns
root        23     2  0 Feb17 ?        00:00:00 [netns]
oracle    2515     1  0 00:03 ?        00:00:00 /u01/app/oracle/product/19c/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle    2564  1831  0 00:04 pts/1    00:00:00 grep --color=auto tns
[oracle@test ~]$

Check the Unified Auditing status:

SQL> select parameter, value from v$option where parameter='Unified Auditing';

PARAMETER                                          VALUE
-------------------------------------------------- ------------------------------
Unified Auditing                                   TRUE

SQL>

Change the default tablespace for Unified Auditing:

***  Oracle recommends that you configure a different tablespace for the unified audit trail, which you can do by using the DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION procedure. By default all audit records by "Unified Auditing" are stored in SYSAUX tablespace until a new partition is created. The new partition will then be in the tablespace specified with set_audit_trail_location. The default is one month for the partition interval.


SQL> create tablespace audit_data datafile '/u01/app/oracle/oradata/ORCL/audit_data_01.dbf' size 100m autoextend on;

Tablespace created.

SQL>
SQL> begin
  2  dbms_audit_mgmt.set_audit_trail_location(
  3   audit_trail_type => dbms_audit_mgmt.audit_trail_unified,
  4   audit_trail_location_value => 'AUDIT_DATA');
  5  end;
  6  /

PL/SQL procedure successfully completed.

SQL>
SQL> select owner,table_name,interval,partitioning_type,partition_count,def_tablespace_name from dba_part_Tables where owner='AUDSYS';

OWNER      TABLE_NAME      INTERVAL             PARTITION PARTITION_COUNT DEF_TABLESPACE_NAME
---------- --------------- -------------------- --------- --------------- ------------------------------
AUDSYS     AUD$UNIFIED     INTERVAL '1' MONTH   RANGE             1048575 AUDIT_DATA

SQL>

How to disable Unified Auditing?

Firstly, Check the Unified Auditing status:

Check the Unified Auditing parameter value is TRUE it means Unified Auditing status is enabled.

SQL> select parameter, value from v$option where parameter='Unified Auditing';

PARAMETER                                          VALUE
-------------------------------------------------- ------------------------------
Unified Auditing                                   TRUE

SQL>

Check and Disable all enabled Policies:

Required to check and disable all enabled Ploicies in this database.

SQL> select * from audit_unified_enabled_policies;

POLICY_NAME                    ENABLED_OPTION  ENTITY_NAME                    ENTITY_TYP SUCCESS    FAILURE
------------------------------ --------------- ------------------------------ ---------- ---------- ----------
ORA_LOGON_FAILURES             BY USER         ALL USERS                      USER       YES        YES
POLICY_1                       BY USER         ALL USERS                      USER       YES        YES
ORA_SECURECONFIG               BY USER         ALL USERS                      USER       YES        YES
FOR_CREDENTIALS                BY USER         ALL USERS                      USER       YES        YES

SQL>
SQL> select 'noaudit policy '||policy_name||';' from audit_unified_enabled_policies;

'NOAUDITPOLICY'||POLICY_NAME||';'
--------------------------------------------------
noaudit policy ORA_LOGON_FAILURES;
noaudit policy POLICY_1;
noaudit policy ORA_SECURECONFIG;
noaudit policy FOR_CREDENTIALS;

SQL>
SQL> noaudit policy ORA_LOGON_FAILURES;

Noaudit succeeded.

SQL> noaudit policy POLICY_1;

Noaudit succeeded.

SQL> noaudit policy ORA_SECURECONFIG;

Noaudit succeeded.

SQL> noaudit policy FOR_CREDENTIALS;

Noaudit succeeded.

SQL>
SQL> select * from audit_unified_enabled_policies;

no rows selected

SQL>

Shutdown the Database and Stop all services related to Oracle Binary:

Before disable the Unifed Auditing required to shutdown the database and stop all services related to Oracle Binary.

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep tns
root        23     2  0 Feb17 ?        00:00:00 [netns]
oracle    2515     1  0 00:03 ?        00:00:00 /u01/app/oracle/product/19c/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle   11566  1831  0 02:30 pts/1    00:00:00 grep --color=auto tns
[oracle@test ~]$
[oracle@test ~]$
[oracle@test ~]$ lsnrctl stop LISTENER

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-FEB-2024 02:30:56

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
The command completed successfully
[oracle@test ~]$
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep pmon
oracle   11598  1831  0 02:31 pts/1    00:00:00 grep --color=auto pmon
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep tns
root        23     2  0 Feb17 ?        00:00:00 [netns]
oracle   11602  1831  0 02:31 pts/1    00:00:00 grep --color=auto tns
[oracle@test ~]$

Now, Disable the Unifed Auditing:

[oracle@test ~]$ cd $ORACLE_HOME/rdbms/lib
[oracle@test lib]$
[oracle@test lib]$
[oracle@test lib]$ ls -ltr ins_rdbms.mk
-rw-r--r--. 1 oracle oinstall 43434 Apr 17  2019 ins_rdbms.mk
[oracle@test lib]$
[oracle@test lib]$
[oracle@test lib]$ make -f ins_rdbms.mk uniaud_off ioracle
/usr/bin/ar d /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/libknlopt.a kzaiang.o
/usr/bin/ar cr /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/libknlopt.a /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/kzanang.o
chmod 755 /u01/app/oracle/product/19c/dbhome_1/bin

 - Linking Oracle
rm -f /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/oracle
/u01/app/oracle/product/19c/dbhome_1/bin/orald  -o /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/19c/dbhome_1/rdbms/lib/ -L/u01/app/oracle/product/19c/dbhome_1/lib/ -L/u01/app/oracle/product/19c/dbhome_1/lib/stubs/   -Wl,-E /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/opimai.o /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/ttcsoi.o -Wl,--whole-archive -lperfsrv19 -Wl,--no-whole-archive /u01/app/oracle/product/19c/dbhome_1/lib/nautab.o /u01/app/oracle/product/19c/dbhome_1/lib/naeet.o /u01/app/oracle/product/19c/dbhome_1/lib/naect.o /u01/app/oracle/product/19c/dbhome_1/lib/naedhs.o /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/config.o  -ldmext -lserver19 -lodm19 -lofs -lcell19 -lnnet19 -lskgxp19 -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lclient19  -lvsnst19 -lcommon19 -lgeneric19 -lknlopt -loraolap19 -lskjcx19 -lslax19 -lpls19  -lrt -lplp19 -ldmext -lserver19 -lclient19  -lvsnst19 -lcommon19 -lgeneric19 `if [ -f /u01/app/oracle/product/19c/dbhome_1/lib/libavserver19.a ] ; then echo "-lavserver19" ; else echo "-lavstub19"; fi` `if [ -f /u01/app/oracle/product/19c/dbhome_1/lib/libavclient19.a ] ; then echo "-lavclient19" ; fi` -lknlopt -lslax19 -lpls19  -lrt -lplp19 -ljavavm19 -lserver19  -lwwg  `cat /u01/app/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnro19 `cat /u01/app/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnnzst19 -lzt19 -lztkg19 -lmm -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lztkg19 `cat /u01/app/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnro19 `cat /u01/app/oracle/product/19c/dbhome_1/lib/ldflags`    -lncrypt19 -lnsgr19 -lnzjs19 -ln19 -lnl19 -lngsmshd19 -lnnzst19 -lzt19 -lztkg19   -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 `if /usr/bin/ar tv /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo19 -lserver19"; fi` -L/u01/app/oracle/product/19c/dbhome_1/ctx/lib/ -lctxc19 -lctx19 -lzx19 -lgx19 -lctx19 -lzx19 -lgx19 -lclscest19 -loevm -lclsra19 -ldbcfg19 -lhasgen19 -lskgxn2 -lnnzst19 -lzt19 -lxml19 -lgeneric19 -locr19 -locrb19 -locrutl19 -lhasgen19 -lskgxn2 -lnnzst19 -lzt19 -lxml19 -lgeneric19  -lgeneric19 -lorazip -loraz -llzopro5 -lorabz2 -lorazstd -loralz4 -lipp_z -lipp_bz2 -lippdc -lipps -lippcore  -lippcp -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lsnls19 -lunls19  -lsnls19 -lnls19  -lcore19 -lsnls19 -lnls19 -lcore19 -lsnls19 -lnls19 -lxml19 -lcore19 -lunls19 -lsnls19 -lnls19 -lcore19 -lnls19 -lasmclnt19 -lcommon19 -lcore19  -ledtn19 -laio -lons  -lmql1 -lipc1 -lfthread19    `cat /u01/app/oracle/product/19c/dbhome_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/19c/dbhome_1/lib -lm    `cat /u01/app/oracle/product/19c/dbhome_1/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/19c/dbhome_1/lib `test -x /usr/bin/hugeedit -a -r /usr/lib64/libhugetlbfs.so && test -r /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/shugetlbfs.o && echo -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -lhugetlbfs`
rm -f /u01/app/oracle/product/19c/dbhome_1/bin/oracle
mv /u01/app/oracle/product/19c/dbhome_1/rdbms/lib/oracle /u01/app/oracle/product/19c/dbhome_1/bin/oracle
chmod 6751 /u01/app/oracle/product/19c/dbhome_1/bin/oracle
(if [ ! -f /u01/app/oracle/product/19c/dbhome_1/bin/crsd.bin ]; then \
    getcrshome="/u01/app/oracle/product/19c/dbhome_1/srvm/admin/getcrshome" ; \
    if [ -f "$getcrshome" ]; then \
        crshome="`$getcrshome`"; \
        if [ -n "$crshome" ]; then \
            if [ $crshome != /u01/app/oracle/product/19c/dbhome_1 ]; then \
                oracle="/u01/app/oracle/product/19c/dbhome_1/bin/oracle"; \
                $crshome/bin/setasmgidwrap oracle_binary_path=$oracle; \
            fi \
        fi \
    fi \
fi\
);
[oracle@test lib]$

Start the Database and all services related to Oracle Binary:

SQL> startup;
ORACLE instance started.

Total System Global Area  805303360 bytes
Fixed Size                  8901696 bytes
Variable Size             239075328 bytes
Database Buffers          549453824 bytes
Redo Buffers                7872512 bytes
Database mounted.
Database opened.
SQL>
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@test ~]$
[oracle@test ~]$ lsnrctl start LISTENER

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-FEB-2024 02:37:54

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /u01/app/oracle/product/19c/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                18-FEB-2024 02:37:54
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@test ~]$
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep pmon
oracle   12005     1  0 02:37 ?        00:00:00 ora_pmon_ORCL
oracle   12412  1831  0 02:38 pts/1    00:00:00 grep --color=auto pmon
[oracle@test ~]$
[oracle@test ~]$
[oracle@test ~]$ ps -ef | grep tns
root        23     2  0 Feb17 ?        00:00:00 [netns]
oracle   12349     1  0 02:37 ?        00:00:00 /u01/app/oracle/product/19c/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle   12420  1831  0 02:38 pts/1    00:00:00 grep --color=auto tns
[oracle@test ~]$

Check the Unified Auditing status:

SQL> select parameter, value from v$option where parameter='Unified Auditing';

PARAMETER                      VALUE
------------------------------ ------------------------------
Unified Auditing               FALSE

SQL>

I hope my written content will helped you. Your suggestions/feedback are most welcome from orakldba.com. Keep learning… Have a great day!!!
Please comment here for your any query related to above content. You can write to mail me through my Email.

Email :- orakldba@gmail.com
LinkedIn :- https://linkedin.com/in/prasantakirtaniya
Twitter :- https://twitter.com/prasantadba
Facebook Page :- https://www.facebook.com/orakldba
Website :- https://orakldba.com
ACE Profile :- https://ace.oracle.com/apex/ace/profile/prasantakirtaniya

1 thought on “Enable or Disable Unified Auditing in Oracle 19c”

Leave a Comment