Tuesday, April 20, 2010

Encountered SCN That Is Not Greater Than The Highest SCN Already Processed

Encountered SCN That Is Not Greater Than The Highest SCN Already Processed  error  while  Golden Gate  replication .

Issue:

Extract ERROR 180 encountered commit SCN that is not greater than the highest SCN already processed
Solution Overview:

This error occurs shortly after a transaction is written to the idle node but does not yet appear in the redo log when the current transaction is processed. This transaction will have a higher SCN than the previous transaction
Solution Details:

In an Oracle RAC environment, Extract has a coordinator thread. This thread assembles the operations that are generated on each of the RAC nodes into SCN order. Before starting to assemble the transactions, Extract waits for a short time after Oracle writes the transaction to the redo log. If a node has been idle with no transactions, Extract waits the number of milliseconds specified in the Extract parameter THREADOPTIONS MAXCOMMITPROPAGATIONDELAY (default 550 ms).  Waiting ensures that there are no new transactions on the idle node before writing the current transactions to the trail.
Possible Reasons for error:

  • One of the threads is slower than the other.
  • The redo logs are not flushed on time due to latency on Log writes.
  • Network issues between Extract and one of the RAC nodes, if Extract is running on a system separate from RAC nodes.
  • Long log write times due to a standby configuration, if any.
  • Log file I/Os are taking unusually long times to complete.
  • Time imperfections between the cluster nodes. All nodes in the RAC cluster must have synchronized system clocks. If Extract is running on a system other than any of the RAC nodes, that system clock must be in sync
Recommendation
Avoid  to encounter again
  • The MAXCOMMITPROPAGATIONDELAY parameter can be used to set the delay time well above the max_commit_propogation_delay setting in the database, plus the default extra padding that Extract adds (2000 milliseconds).
  • In Oracle RAC, the max_commit_propogation_delay specifies the maximum amount of time allowed before the system change number (SCN) held in the SGA of an instance is refreshed by the log writer process (LGWR). Units are in hundredths of seconds.

    To check Oracle's value:
    SQL> show parameter max_commit
  • To set MAXCOMMITPROPAGATIONDELAY : The value of MAXCOMMITPROPAGATIONDELAY must be greater than zero and less than 90000 milliseconds e.x
    THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 2700
  • Starting from GGS Version 9.x and above, an additional parameter IOLATENCY can be used if Extract abends with 'encountered SCN XXXXX' too often. IOLATENCY adjusts the delta between the database-configured max commit propogation delay and the internal value that Extract uses.

    By default IOLATENCY is set to 1.5 seconds .Valid values for IOLATENCY are between 0 and 180000 milliseconds (3 minutes).

    The combined parameters should look like this
    THREADOPTIONS MAXCOMMITPROPAGATIONDELAY IOLATENCY
  • If the problem happens too often, you can start with high values for IOLATENCY and MAXCOMMITPROPAGATIONDELAY parameters. Once the error stops happening, you can gradually decrease the values to see the SCN number where this error starts appearing again. This would give you an idea of the boundary values specific to that environment.
See also:How to recover from Extract ERROR 180 encountered commit SCN that is not greater than the highest SCN already processed

No comments: