Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 
 

Inside Oracle supplemental logging

Oracle Database Tips by Donald Burleson

 

Question:  What is supplemental logging, and how does supplemental logging work?

 

Answer:  Database-level supplemental logging must be enabled for any Change Data Capture source database.  You can see if supplemental logging is enabled with these queries:

 

 select
   SUPPLEMENTAL_LOG_DATA_MIN,
   SUPPLEMENTAL_LOG_DATA_PK,
   SUPPLEMENTAL_LOG_DATA_UI
from
   v$database;

Supplemental logging is also a column in dba_tables.

Supplemental logging places additional column data into the redo log file whenever an UPDATE operation is performed. At the least, minimal database-level supplemental logging must be enabled for any Change Data Capture source database:

SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Database altered.

When Supplemental Logging is enabled, either some selected columns or all columns are specified for extra logging. They are called a supplemental log group and consist of nothing but a set of additional columns that are being logged.

 

When the supplemental logging is active on a database, the redo logs contain other columns from tables to uniquely identify a row. If the table has a primary key or unique index defined, the only columns involved in the primary key or unique index will be registered in the redo logs along with the actual column(s) that has changed.

If the table does not have any primary keys or unique index defined, Oracle will write all scalar columns from the table to identify the row. This may significantly increase the size of redo logs and will impact the log apply services on the logical standby site.
 

There are two types of supplemental log groups that determine when columns in the log group are logged:

  • Unconditional Supplemental Log Groups - The before-images of specified columns are logged any time a row is updated, regardless of whether the update affected any of the specified columns. This can be referred to as an ALWAYS log group.
     

  • Conditional Supplemental Log Groups - The before-images of all specified columns are logged only if at least one of the columns in the log group is updated.

Supplemental Logging can be enabled at database level or at the table level. When it is enabled at database level, there are two types, minimal logging and identification key logging.


Streams supplemental logging places additional column data into the redo log file whenever an UPDATE operation is performed. At the least, minimal database-level supplemental logging must be enabled for any Change Data Capture source database:

ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
 

Why is supplemental logging needed? When a particular column is updated at the source database table for a set of rows, the values in the column or columns are logged by default. When these values are moved to the destination side, to which rows does Oracle apply them, or how does Oracle identify the rows to be updated? Supplemental logging provides the answers to these questions.

 

Reference books on supplemental logging

 

For complete information on Streams and Data Guard supplemental logging, see these resources, with working code examples in the code depot:

 

 


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.