Handling Role Changes In an ADG Configuration

In a role change involving a standby database, all sessions in the primary and the standby database are first disconnected including the connections used by Extract. Then both databases are shut down, then the original primary is mounted as a standby database, and the original standby is opened as the primary database.

The procedure for a role change is determined by the initial deployment of Classic Extract and the deployment relation that you want, database or role. The following table outlines the four possible role changes and is predicated on an ADG configuration comprised of two databases, prisys and stansys. The prisys system contains the primary database and the stansys system contains the standby database; prisys has two redo threads active, whereas stansys has four redo threads active.

Initial Deployment Primary (prisys) Initial Deployment ADG (stansys)

Original Deployment:

 
ext1.prm
DBLOGIN USERID userid@prisys, PASSWORD password
ext1.prm
DBLOGIN USERID userid@stansys, PASSWORD password
TRANLOGOPTIONS MINEFROMACTIVEDG

Database Related:

 

After Role Transition: Classic Extract to ADG

  1. Edit the ext1.prm file to add:

    TRANLOGOPTIONS MINEFROMACTIVEDG

    DBLOGREADER option cannot be used in ADG mode. If DBLOGREADER option exists, remove it. If using ASM, add the ASMUSER parameter to connect to the ASM instance.

  2. If a failover, add TRANLOGOPTIONS USEPREVRESETLOGSID.

  3. Start Extract:

    START EXTRACT ext1

    Extract will abend once it reaches the role transition point, then it does an internal BR_RESET and moves both the I/O checkpoint and current checkpoint to SCN s.

  4. If failover, edit the parameter file again and remove:

    TRANLOGOPTIONS USEPREVRESETLOGSID

  5. Execute ALTER EXTRACT ext1 SCN #, where # is the SCN value from role switch message.

  6. Based on the thread counts, do one of the following:

    If the thread counts are same between the databases, then execute the START EXTRACT ext1; command.

    or

    If thread counts are different between the databases, then execute the following commands:

    DROP EXTRACT ext1

    ADD EXTRACT ext1 THREADS t BEGIN SCN s

    START EXTRACT ext1

After Role Transition: ADG to classic Extract

  1. Edit ext1.prm and remove:

    TRANLOGOPTIONS MINEFROMACTIVEDG

  2. If a failover, add TRANLOGOPTIONS USEPREVRESETLOGSID.

  3. Start Extract:

    START EXTRACT ext1

    Extract will abend once it reaches the role transition point, then it does an internal BR_RESET and moves both the I/O checkpoint and current checkpoint to SCN s.

  4. If failover, edit the parameter file again and remove:

    TRANLOGOPTIONS USEPREVRESETLOGSID

  5. Execute ALTER EXTRACT ext1 SCN #, where # is the SCN value from role switch message.

  6. Based on the thread counts, do one of the following:

    If the thread counts are same between the databases, then execute the START EXTRACT ext1; command.

    or

    If thread counts are different between the databases, then execute the following commands:

    DROP EXTRACT ext1

    ADD EXTRACT ext1 THREADS t BEGIN SCN s

    START EXTRACT ext1

Role Related:

 

After Role Transition: Classic Extract to classic Extract

  1. Edit ext1.prm to change the database system to the standby system:

    DBLOGIN USERID userid@stansys, PASSWORD password

  2. If a failover, add TRANLOGOPTIONS USEPREVRESETLOGSID.

  3. Start Extract:

    START EXTRACT ext1

    Extract will abend once it reaches the role transition point, then it does an internal BR_RESET and moves both the I/O checkpoint and current checkpoint to SCN s.

  4. If failover, edit the parameter file again and remove:

    TRANLOGOPTIONS USEPREVRESETLOGSID

  5. Execute ALTER EXTRACT ext1 SCN #, where# is the SCN value from role switch message.

  6. Based on the thread counts, do one of the following:

    If the thread counts are same between the databases, then execute the START EXTRACT ext1; command.

    or

    If thread counts are different between the databases, then execute the following commands:

    DROP EXTRACT ext1

    ADD EXTRACT ext1 THREADS t BEGIN SCN s

    START EXTRACT ext1

After Role Transition: ADG to ADG

  1. Edit ext1.prm to change the database system to the primary system:

    DBLOGIN USERID userid@prisys, PASSWORD password

  2. If a failover, add TRANLOGOPTIONS USEPREVRESETLOGSID.

  3. Start Extract:

    START EXTRACT ext1

    Extract will abend once it reaches the role transition point, then it does an internal BR_RESET and moves both the I/O checkpoint and current checkpoint to SCN s.

  4. If failover, edit the parameter file again and remove:

    TRANLOGOPTIONS USEPREVRESETLOGSID

  5. Execute ALTER EXTRACT ext1 SCN #, where# is the SCN value from role switch message.

  6. Based on the thread counts, do one of the following:

    If the thread counts are same between the databases, then execute the START EXTRACT ext1; command.

    or

    If thread counts are different between the databases, then execute the following commands:

    DROP EXTRACT ext1

    ADD EXTRACT ext1 THREADS t BEGIN SCN s

    START EXTRACT ext1