Thursday, December 5, 2013

Prepare Phase Scenario 3 - R12.2 Online Patching Cycle

Scenario

You have been asked to apply a patch and you start with the first phase “PREPARE”. Your terminal got disconnected when prepare phase was running or there was an outage and server got rebooted.



$ adop phase=prepare

Internal Check 1: This procedure checks if there are any active patches running on the patch file system. If so ADOP will exit that prepare phase cannot be run as there is already a patching going on. So ADOP must be invoked in patch mode to resume the failed patch.

[PROCEDURE] inside checkAciveHotPatchSession
  [STATEMENT] Statement: <    select count(1) from ad_adop_sessions
      where status <> 'C' and prepare_status='X' and cutover_status='X' and
            abort_status='X' and apply_status in ('N','P') and cleanup_status='N'
            and appltop_id=195 and node_name='testserver01'>.
  [STATEMENT] value of incomplete_session: <0>
  [PROCEDURE] leaving checkAciveHotPatchSession


Internal Check 2:  This procedure checks if there are any active session which was running the prepare mode. Here it returns one row which indicates that there was a prepare phase running when the server crashed.

  [STATEMENT] Master Session Id: <6>
  [STATEMENT] Master Node:
  [STATEMENT] SQL statement: <    select count(1)
      from ad_adop_sessions
      where status <> 'C' and
            ((prepare_status in ('N','R')) or apply_status in ('N','P') or
            cutover_status not in ('X','Y') or abort_status in ('N','R'))
            and abort_status <> 'Y' and prepare_status <> 'X'
            and appltop_id=195 and node_name = 'testserver01'
            and adop_session_id=6>
  [STATEMENT] SQL output: <1>
  [STATEMENT] Incomplete Session Id: <1>
  There is already a session which is incomplete.



What happens then?

ADOP will load the previous arguments and starts the prepare session again.

Will continue with previous session
  [STATEMENT] value of user_input:
  [PROCEDURE] [START 2013/11/15 09:16:48] Performing steps to get the previous session inputs
    [STATEMENT] Key: Value:
    [STATEMENT] Key: Value:
    [STATEMENT] Key:    Value:
    [STATEMENT] Key:   Value: <0>
    [STATEMENT] Key:   Value:
    [STATEMENT] Key:   Value: <2>
    [STATEMENT] Key:     Value: <4>
    [STATEMENT] Key: Value: <66>
    [STATEMENT] Key:     Value:
    [STATEMENT] Key:       Value:
    [STATEMENT] Key:   Value:
    [STATEMENT] Key:    Value: <0>
    [STATEMENT] Key:     Value:
    [STATEMENT] Key:    Value: <1>
    [STATEMENT] Key:   Value: <0>
    [STATEMENT] Key: Value:

    [STATEMENT] Key: Value: <6>
    [STATEMENT] Key:      Value:
    [STATEMENT] Key:      Value: <4>
    [STATEMENT] Key:        Value: <60>
    [STATEMENT] Key:      Value:
    [STATEMENT] Key:    Value:
    [STATEMENT] Key:    Value:

    [STATEMENT] Key:       Value:
    [STATEMENT] Key:       Value:
    [STATEMENT] Key: Value: <0>
    [STATEMENT] Key:       Value:
    [STATEMENT] Key:       Value:
    [STATEMENT] Key:      Value:
    [STATEMENT] Key: Value: <0>
    [STATEMENT] Key: Value:
    [STATEMENT] Key:   Value: <1>
    [STATEMENT] Key:   Value: <1>
    [STATEMENT] Key:   Value: <0>
    [STATEMENT] Key: Value: <0>
    [STATEMENT] Key:       Value:
    [STATEMENT] Key:    Value: <0>
    [STATEMENT] Key:     Value:

  [PROCEDURE]
[END   2013/11/15 09:17:20] Performing steps to get the previous session inputs 
Continuing
[PROCEDURE]

Popular Posts