ADD SUPPLEMENTAL LOG Command in PDB is not reflected to v$database (Doc ID 2198780.1) |
APPLIES TO:
Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
SYMPTOMS
When issuing ADD SUPPLEMENTAL LOG command in PDB, the change is not
reflected to V$DATABASE.
CHANGES
Run following commands inside a PDB.
Using "ALTER PLUGGABLE DATABASE" syntax also yields same result.
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (UNIQUE) COLUMNS;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA FOR PROCEDURAL REPLICATION;
CAUSE
Supplemental Log information of individual PDB cannot be queried from V$DATABASE.
Use CDB_SUPPLEMENTAL_LOGGING dictionary view instead.
SOLUTION
To check supplemental log state of the PDB, query CDB_SUPPLEMENTAL_LOG view as in following example.
SYS@cdb1_pdb1> select * from dba_supplemental_logging ;
MINIMAL PRIMARY_K UNIQUE_IN FOREIGN_K ALL_COLUM PROCEDURA
--------- --------- --------- --------- --------- ---------
NO NO NO NO NO NO
SYS@cdb1_pdb1> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Database altered.
SYS@cdb1_pdb1> select * from dba_supplemental_logging ;
MINIMAL PRIMARY_K UNIQUE_IN FOREIGN_K ALL_COLUM PROCEDURA
--------- --------- --------- --------- --------- ---------
YES NO NO NO NO NO
SYS@cdb1_pdb1> select * from cdb_supplemental_logging ;
MIN PRI UNI FOR ALL PRO CON_ID
--- --- --- --- --- --- ----------
YES YES NO NO NO NO 3
SYS@cdb1_pdb1> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
Database altered.
SYS@cdb1_pdb1> select * from dba_supplemental_logging ;
MINIMAL PRIMARY_K UNIQUE_IN FOREIGN_K ALL_COLUM PROCEDURA
--------- --------- --------- --------- --------- ---------
YES YES NO NO NO NO