 |
|
Streams log miner dictionary
Oracle Tips by Burleson |
Oracle Streams
Capture
and Propagate Configuration
LogMiner Data Dictionary
The Capture process makes use of a data
dictionary, which is different from the source database data
dictionary. This special data dictionary is called the LogMiner
Data Dictionary. The Capture process requires a LogMiner data
dictionary because the information in the primary data
dictionary may not match the changes being captured from the
redo log. These changes may have occurred minutes, hours, or
even days before they are captured by a Capture process. This is
important in the sense that when the actual capture takes place,
it needs to have the right dictionary information. Since the
timing of the Capture process and timing of the actual database
table change can be different, the maintenance of the log
dictionary, which can provide time sensitive dictionary
information, becomes significant.
The first time a Capture process is started
at the database, Oracle uses the extracted data dictionary
information in the redo log to create a LogMiner data
dictionary. This dictionary is separate from the primary data
dictionary for the source database. Additional Capture processes
may use this existing LogMiner data dictionary, or they may
create new LogMiner data dictionaries.
Since the Capture process can have its own
timing, when it does extract and create the LCRs, the object’s
structure in the primary dictionary may not match. The Capture
process cannot depend on the primary data dictionary, especially
when it is stopped for some time. This is the reason that the
LogMiner Data Dictionary is maintained.
LogMiner Data Dictionary
The dbms_capture_adm.build procedure
extracts data dictionary information to the redo log. The
extracted data dictionary information in the redo log is
consistent with the primary data dictionary at the time when the
dbms_capture_adm.build procedure is run. The build
procedure is automatically run when the Capture process is
created.
The amount of information extracted to a
redo log, when the dbms_capture_adm.build procedure is
run, depends on the number of database objects in the database.
The dbms_capture_adm.build procedure generates a
corresponding valid first SCN value that can be specified when
the new Capture process is created. A First SCN generated by the
dbms_capture_adm.build procedure can be found by running
the following query:
SELECT DISTINCT FIRST_CHANGE#, NAME FROM
V$ARCHIVED_LOG WHERE DICTIONARY_BEGIN = 'YES';
Propagation and Apply processes use a
Streams data dictionary to keep track of the database objects
from a particular source database. A Streams data dictionary is
populated whenever one or more database objects are prepared for
instantiation at a source database. When a database object is
prepared for instantiation, it is recorded in the redo log. When
a Capture process scans the redo log, it uses this information
to populate the local Streams data dictionary for the source
database. After an object has been prepared for instantiation,
the local Streams data dictionary is updated whenever a DDL
statement on the object is processed by a Capture Process.
The above text is
an excerpt from:
Oracle Streams
High Speed Replication and Data
Sharing
ISBN 0-9745993-5-2
by Madhu Tumma
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|