We're here to help!

ERR-3112: Apply waiting on lock on DBVREP user

Follow

Read our docs This article helps in resolving ERR-3112 error in the APPLY. 

Problem Details

Problem Statement

APPLY log has ERR-3112 error.

Applicable Error Code

ERR-3112: Apply waiting on lock on DBVREP user.
This is either an internal deadlock, multiple running appliers using the same data,
or someone manually changing data using this account.

Affected Versions

Generic

Affected Platforms

Generic

 

 Solution

APPLY_POSTPONE_LAST_LCR = YES
APPLY will postpone the last LCR or SQL until the next SQL for the same object is found. By setting to YES it means that APPLY is always one SQL behind. This means APPLY always keeps one SQL in each open transaction un-applied. It processes the changes it gets from MINE, but stops short of the last one available so far.
Increase the INITRANS setting of the table
This is by default 2. Set this to 10. When altering the transaction entry setting INITRANS of a table, note that a new setting for INITRANS applies only to data blocks subsequently allocated for the table. To have the change take effect for all existing rows in this case:
SQL> alter table <table_name> move initrans 100;

For both settings, the APPLY process needs to be restarted. Because the APPLY process is hung, the APPLY process cannot be stopped with the normal shutdown apply command from the console. Stop the process with the kill -9 command or by stopping the service in Windows.

Arjen Visser September 10, 2014 21:18


When altering the transaction entry setting INITRANS of a table, note that a new setting for INITRANS applies only to data blocks subsequently allocated for the table. For example:

SQL> alter table retest move initrans 100;

Donna Zehl

Have more questions? Submit a request

Comments

  • Avatar
    Miguel Placios

    Hi

    1) About note:
    APPLY_POSTPONE_LAST_LCR = YES
    Increase the INITRANS setting of the table

    Do i need to apply both?
    Where to add or configure APPLY_POSTPONE_LAST_LCR = YES?

    2) About alter table

    - How to know which table or tables?
    - Do i need to apply to each table on source or target?
    - This operation could be time consumign because of table size. How to manager that?

    Regards

  • Avatar
    Donna Zehl

    Query the target database & see what tables/object is holding the blocking lock and increase the initrans for that table. with the move command.
    SQL> alter table retest move initrans 100;

    In the console you can set this value
    dbvrep> set APPLY_POSTPONE_LAST_LCR = YES

    APPLY will postpone the last LCR or SQL until the next SQL for the same object is found.

    Yes both are recommended if you hit this message.

    Reminder: For both settings, the APPLY process needs to be restarted. Because the APPLY process is hung, the APPLY process cannot be stopped with the normal shutdown apply command from the console. Stop the process with the kill -9 command or by stopping the service in Windows.
    Check for any dbvrep connection to target & kill them if they are still found to be running before restarting APPLY.