Oracle SCN (System Change Number)
The Oracle SCN (System Change Number) is very important in replication. It is the primary mechanism to determine the start of the replication and to maintain consistency during replication. Dbvisit Replicate uses the SCN to mark the starting point of where to start replicating from. Only changes made from the SCN specified are replicated. Also changes pending in non committed transactions from this SCN will be lost. Each table can have a different SCN to replicate from, or a single SCN can be used to mark the beginning of the replication of all tables.
The setting INSTANTIATE_SCN determines which SCN is used. The values are:
NOW (default) - It uses the SCN as of now at this moment in time.
No Format INSTANTIATE_SCN NOW
RESETLOGS - It uses the SCN of the last resetlogs at the target database. It obtains the value from v$database.resetlogs_change#. This is handy if a standby database is used to create the initial starting point and a resetlogs is used to open the standby database in READ WRITE mode.
No Format INSTANTIATE_SCN RESETLOG
manually entered numeric value - A manually entered SCN can be used. This is done by editing the *.dbvrep script and change the word "RESETLOGS" to the actual SCN number. Then run *all.sh or *all.bat script.
No Format INSTANTIATE_SCN 14382713
...
- When there is an ENGINE LOCK command, it captures the SCN at the start of the LOCK command.
- When there is no ENGINE LOCK command, it captures the SCN at the start of each PREPARE command.
...