Previous |
Next |
Change cycling means sending a change back to the database where it originated. Typically, change cycling should be avoided because it can result in each database change going through endless loops to the database where it originated. Such loops can result in unintended data in the database and tax the networking and computer resources of an environment. By default, Oracle Streams is designed to avoid change cycling.
A tag is additional information in a change record. Each redo entry that records a database change and each logical change record (LCR) that encapsulates a database change includes a tag. The data type of the tag is RAW
.
By default, change records have the following tag values:
When a user or application generates database changes, the value of the tag is NULL
for each change. This default can be changed for a particular database session.
When an apply process generates database changes by applying them to database objects, the tag value for each change is the hexadecimal equivalent of '00'
(double zero). This default can be changed for a particular apply process.
The tag value in an LCR depends on how the LCR was captured:
An LCR captured by a capture process has the tag value of the redo record that was captured.
An LCR captured by a synchronous capture has the tag value of the database session that made the change.
Rules for Oracle Streams clients can include conditions for tag values. For example, the rules for a capture process can determine whether a change in the redo log is captured based on the tag value of the redo record. In an Oracle Streams replication environment, Oracle Streams clients use tags and rules to avoid change cycling.
The following topics discuss how change cycling is avoided in a particular type of replication environment:
Tutorial: Configuring Two-Database Replication with Local Capture Processes
Tutorial: Configuring Hub-and-Spoke Replication with Local Capture Processes
Tutorial: Configuring Two-Database Replication with Synchronous Captures
Note:
Change cycling is not possible in a replication environment when changes to only one database are captured.
You can also use tags to avoid replicating the changes made by a particular session. Use the DBMS_STREAMS.SET_TAG
procedure to set the tag for a session. See "Correcting Apply Errors in Database Objects" for an example.
Oracle Streams Replication Administrator's Guide for detailed information about tags