Zero Downtime Upgrade Guide for Oracle

Zero Downtime Upgrade Guide for Oracle

Upgrade Steps Controlled from the Passive Environment

Upgrade Steps Controlled from the Passive Environment

To ensure that the systems are synchronized, you must have replication running from the active environment to the passive environment.
Run all the commands in order. Unless otherwise specified, ensure that each process is finished before you run the next command.
  1. MDM Upgrade
    . Stop the application server.
  2. Disable read services to the passive environment.
  3. In the command prompt, to start the upgrade process, enter the following swing command:
    sip_ant swing_start
    The swing command sets the
    ACTIVE_UPGRADE_IND
    to
    1
    , turns off replication replay, and removes all obsolete objects in the schema of the passive environment.
  4. MDM Upgrade
    . Upgrade
    Multidomain MDM
    :
    1. Upgrade the Hub Store.
    2. Upgrade the Hub Server.
    3. Upgrade the Process Server.
    For more information about upgrading Multidomain MDM, see the
    Multidomain MDM Upgrade Guide
    .
    After you finish the upgrade, ensure that the application server runs.
  5. Schema Update
    . Run the Metadata Manager command line utility to apply the change list.
    The utility applies the changes in the change list file to the schema. For example, you can use a change list to add or remove columns in the base object table or to set the trust values on columns.
  6. Run the Generate Match Tokens batch job to update all the match tokens in the tables that use _STRP as suffix.
    You can run the Generate Match Tokens batch job from the Hub Console or by using a service integration framework (SIF) API.
    Run From
    Steps
    Hub Console
    1. In the MDM Hub Console, open the Batch Viewer tool.
    2. From the Batch Viewer navigation pane, expand the base object for which you want to regenerate all the match tokens.
    3. Expand
      Generate Match Tokens
      .
    4. Select the batch job that you want to use to generate match tokens.
    5. Select
      Re-generate All Match Tokens
      .
    6. Click
      Execute Batch
      .
    API
    To run the Generate Match Tokens batch job on all records, use the ExecuteBatchGenerateMatchTokens request with the
    fullRestripInd
    attribute set to
    1
    .
    The following code sample shows an ExecuteBatchGenerateMatchTokens request to create match tokens for all records in the C_PARTY base object:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:siperian.api"> <soapenv:Header/> <soapenv:Body> <urn:executeBatchGenerateMatchTokens> <urn:username>admin</urn:username> <urn:password> <urn:password>admin</urn:password> <urn:encrypted>false</urn:encrypted> </urn:password> <urn:orsId>localhost-orclsnl-UTSOURCE</urn:orsId> <urn:asynchronousOptions> <urn:isAsynchronous>false</urn:isAsynchronous> <urn:jmsReplyTo></urn:jmsReplyTo> <urn:jmsCorrelationId></urn:jmsCorrelationId> </urn:asynchronousOptions> <urn:tableName>C_PARTY</urn:tableName> <urn:fullRestripInd>
    1
    </urn:fullRestripInd> </urn:executeBatchGenerateMatchTokens> </soapenv:Body> </soapenv:Envelope>
  7. MDM Upgrade
    and
    Schema Update
    . Populate the backfill table C_REPOS_ZDT_BACKFILL_TASK to indicate that trust backfill is required on base object tables.
    Use the
    sip_ant add_backfill_task
    method:
    sip_ant -Dnoprompt=true -noinput add_backfill_task -DprocedureName=<backfill type> -DtableName=<base object name> -DusageType=<api> -Dsequence=1
    where:
    • backfill type
      is the type of backfill. Use one of the following backfill types:
      • TRUST_BACKFILL
        .
        Recommended
        . Use when you add new trusted columns. This option runs the same processes that the
        REVALIDATE
        and
        RECALCULATE
        types run.
      • REVALIDATE
        . Use when you change or add validation rules.
      • RECALCULATE
        . Use when you change trust rules.
      • TOKENIZE
        . Use when you need to run the tokenize process on dirty records, but you are unable to run batch jobs.
    • base object name
      is the table name of a base object. Run the command on all base objects tables for which you want to recalculate the best version of the truth (BVT). If you are not sure which tables are affected by the schema update, run the command on all base object tables in the schema.
    • api
      specifies which API runs the backfill task.
      R
      is Read API,
      W
      is Write API, and
      B
      is both Read and Write APIs. Use
      B
      .
    • sequence
      is the order to run the backfill task in relationship to other tasks. If you are not sure, use
      1
      to run the backfill task first.
    For example, the following command applies trust backfill for the C_CUSTOMER base object:
    sip_ant -Dnoprompt=true -noinput add_backfill_task -DprocedureName=TRUST_BACKFILL -DtableName=C_CUSTOMER -DusageType=B -Dsequence=1
  8. Run the backfill batch job for each base object.
    You can run the batch backfill job from the Hub Console or by using a service integration framework (SIF) API.
    Run From
    Steps
    Hub Console
    1. In the MDM Hub Console, open the Batch Viewer tool.
    2. From the Batch Viewer navigation pane, select the base object that you want to backfill.
      If the backfill batch job does not appear in the batch viewer for the base object, select
      Batch Viewer
      Refresh
      .
    3. Run the backfill batch job.
    API
    1. Ensure that the Hub Server is running.
    2. Run one of the following APIs:
      • To backfill all base objects, use the ExecuteBatchBackfillAll API.
        To run the backfill on all records, ensure that the
        dirtyOnlyInd
        parameter is
        false
        .
      • To backfill a specified base object, use the ExecuteBatchBackfill API.
      Comment out the rowidObjectTable element in the request.
    The following code sample shows an ExecuteBatchBackfill request to backfill records in the C_BO_TRUST base object:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:siperian.api"> <soapenv:Header/> <soapenv:Body> <urn:ExecuteBatchBackfill> <urn:username>
    <user name>
    </urn:username> <urn:password> <urn:password>
    <password>
    </urn:password> </urn:password> <urn:orsId>localhost-orclsnl-UTSOURCE</urn:orsId> <urn:asynchronousOptions> <urn:isAsynchronous>false</urn:isAsynchronous> </urn:asynchronousOptions> <urn:tableName>C_BO_TRUST</urn:tableName> <!--urn:rowidObjectTable>?</urn:rowidObjectTable--> <urn:dirtyOnlyInd>false</urn:dirtyOnlyInd> </urn:ExecuteBatchBackfill> </soapenv:Body> </soapenv:Envelope>
  9. Schema Update with Data Change
    . Disable the Oracle GoldenGate mapping for the table C_AGREEMENT and change the mapping to table C_AGREEMENT_XREF_NEW_FROM_A.
    1. Turn off mapping for the entire C_AGREEMENT base object and all related tables by using
      sip_ant disable_replication
      command:
      sip_ant -Dnoprompt=true -noinput disable_replication -DtableName=C_AGREEMENT
    2. Create a mapping from C_AGREEMENT_XREF to C_AGREEMENT_XREF_NEW_FROM_A by using the
      sip_ant remap
      command. Data in source and target tables must be the same. The
      sip_ant remap
      command automatically creates the table C_AGREEMENT_XREF_NEW_FROM_A. If the table exists, the command fails. Run the following command:
      sip_ant -Dnoprompt=true -noinput remap -DtableName=C_AGREEMENT_XREF -DmapTableName=C_AGREEMENT_XREF_A
  10. Schema Update with Data Change
    . Start the reload of data to C_AGREEMENT from C_AGREEMENT_XREF. You do not need to wait for the data to reload before you proceed to the next step.
  11. If you conduct user acceptance validation, perform the following steps:
    1. Note the system change number (SCN).
    2. Perform user acceptance validation.
    3. Flash back to the noted SCN.
  12. To continue the upgrade process, enter the following swing command:
    sip_ant swing_continue
    The swing command executes the following processes:
    1. Processes data changes from the passive environment by starting replication replay.
    2. Detects completion of replication catch-up in the passive environment.
    3. Sends a message from the passive environment to the active environment to disallow batch processes in the active environment.
    4. Enables writeable API services in the target system.
    5. Synchronizes sequences. The new sequence values on the target system are higher than on the source system.
    6. Disables writeable SIF services in the active environment.
    7. Complete the replication processing in the passive environment.
  13. Verify that the application server is running in the passive environment, and then redirect services from the active environment to the passive environment.
    The passive environment is live for read and write services.
  14. Schema Update with Data Change
    . Process the delta on the C_AGREEMENT table.
    The implementation resource writes the delta to handle the data that came from the active environment after you reload the passive environment.
  15. MDM Upgrade
    and
    Schema Update
    . Run the backfill job on dirty records for each base object.
    Run From
    Steps
    Hub Console
    1. In the MDM Hub Console, open the Batch Viewer tool.
    2. From the Batch Viewer navigation pane, select the base object that you want to backfill.
      If the backfill batch job does not appear in the batch viewer for the base object, select
      Batch Viewer
      Refresh
      .
    3. To backfill only on the dirty records, select
      For dirty records only
      .
    4. Run the backfill batch job.
    API
    1. Ensure that the MDM Hub Server is running.
    2. Run one of the following APIs.
      • To backfill all base objects, use the ExecuteBatchBackfillAll API.
        To run the backfill only on the dirty records, set the
        dirtyOnlyInd
        parameter to
        true
        .
      • To backfill a specified base object, use the ExecuteBatchBackfill API.
    Comment out the rowidObjectTable element in the request.
    The following code sample shows an ExecuteBatchBackfill request to backfill the dirty records in the C_BO_TRUST base object:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:siperian.api"> <soapenv:Header/> <soapenv:Body> <urn:ExecuteBatchBackfill> <urn:username>
    <user name>
    </urn:username> <urn:password> <urn:password>
    <password>
    </urn:password> </urn:password> <urn:orsId>localhost-orclsnl-UTSOURCE</urn:orsId> <urn:asynchronousOptions> <urn:isAsynchronous>false</urn:isAsynchronous> </urn:asynchronousOptions> <urn:tableName>C_BO_TRUST</urn:tableName> <!--urn:rowidObjectTable>?</urn:rowidObjectTable--> <urn:dirtyOnlyInd>true</urn:dirtyOnlyInd> </urn:ExecuteBatchBackfill> </soapenv:Body> </soapenv:Envelope>
  16. Remove the backfill tasks from the C_REPOS_BACKFILL_TASK table. The table must be empty so that other batch jobs can run.
    Delete from c_repos_zdt_backfill_task; COMMIT;
  17. MDM Upgrade
    and
    Schema Update
    . Run a tokenize batch job on dirty records for each base object.
    Run From
    Steps
    Hub Console
    1. In the MDM Hub Console, open the Batch Viewer tool.
    2. From the Batch Viewer navigation pane, expand the base object for which you want to regenerate all the match tokens.
    3. Expand
      Generate Match Tokens
      .
    4. Select the batch job that you want to use to generate match tokens.
    5. Clear
      Re-generate All Match Tokens
      .
    6. Click
      Execute Batch
      .
    API
    To run the Generate Match Tokens batch job on dirty records only, use the ExecuteBatchGenerateMatchTokens request with the
    fullRestripInd
    attribute set to
    0
    .
    The following code sample shows an ExecuteBatchGenerateMatchTokens request to create match tokens for dirty records in the C_PARTY base object:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:siperian.api"> <soapenv:Header/> <soapenv:Body> <urn:executeBatchGenerateMatchTokens> <urn:username>admin</urn:username> <urn:password> <urn:password>admin</urn:password> <urn:encrypted>false</urn:encrypted> </urn:password> <urn:orsId>localhost-orclsnl-UTSOURCE</urn:orsId> <urn:asynchronousOptions> <urn:isAsynchronous>false</urn:isAsynchronous> <urn:jmsReplyTo></urn:jmsReplyTo> <urn:jmsCorrelationId></urn:jmsCorrelationId> </urn:asynchronousOptions> <urn:tableName>C_PARTY</urn:tableName> <urn:fullRestripInd>
    0
    </urn:fullRestripInd> </urn:executeBatchGenerateMatchTokens> </soapenv:Body> </soapenv:Envelope>
  18. Run the following command to finalize the upgrade process:
    sip_ant swing_finalize
    The swing command executes the following processes:
    1. Enables batch services in the target system.
    2. Removes the ZDT event queue from the following tables:
      • C_REPOS_ZDT_EVENT_QUEUE
      • C_REPOS_ZDT_REPLICAT_EXCEPTION
    3. Updates the following tables and sets their values:
      1. C_REPOS_ZDT_ENV_STATE; set state = NULL, state_ts = NULL, state_desc = NULL, updated_by=NULL, update_date=NULL
      2. C_REPOS_ZDT_STATUS; set REPLICATION_TARGET_IND = 0
      3. C_REPOS_ZDT_STATUS; set ACTIVE_UPGRADE_IND = 0
    4. Configures sequences on the active environment to be even.
    5. Undeploys ZDT.
    6. Configures and starts the extract on the active environment, which is the new source.
  19. Schema Update with Data Change
    . If any user data foreign keys change during the update, run foreign key validation. Run the ExecuteBatchValidateFKRelationships SIF API for each base object.
    Any violations that came from the active environment after the lookup data is updated are detected.
  20. Schema Update
    . If violations are detected, fix the violations.
    If the violations are not severe, you can fix the violations after you complete the upgrade. If you cannot fix some violations, contact Informatica Global Customer Support.
  21. Get the current SCN from the passive environment:
    SQL-CMX_ORS_B> select current_scn from v$database; CURRENT_SCN ----------- 2880593
  22. Export the passive environment using data pump with the SCN:
    c:> <
    ors username
    >/<
    password
    >@<
    tns entry name
    > directory=<
    DATA_PUMP_DIR_OBJECT
    > dumpfile=<
    mrm_backup_envb
    .dmp> logfile=<
    mrm_backup_after_upgrade
    .log> parallel=8 job_name=<
    EXPORT_AFTER_UPGRADE
    > flashback_scn=<
    CURRENT_SCN from the previous step
    >
  23. Resume batch jobs in the passive environment.

0 COMMENTS

We’d like to hear from you!