Loading...

DB2 MultiNode Cross Database/Cross Instance/Cross Machine Restore

Requirements:

  1. The source and target DB2 DPF databases must have the same number of nodes.
  2. Commvault must be installed on all target DB2 DPF machines and there must be a configured pseudo client in the CommServe.
  3. In the case of a partial restore, the DB2 DPF NODE0 tables space "SYSCATSPACE" must be part of a partial redirect restore.

Use the following steps to perform a cross-database / cross instance / cross machine restore.

For cross database restores, run all DB2 commands on the target machines for the DB2 instances/DB2 database.

For DB2 DPF

  1. At the Command Prompt, type the restore command.

    For non-automatic storage database:

    export DB2NODE=<n>
    db2 terminate

    db2 restore db <Source DB2 Database Name> \
    load '<software install path>/Base/libDb2Sbt.so' \
    open <n> sessions \
    'options "\
    CvDpfClientName=<Target MultiNode Pseudo Client Name>,\
    CvDpfControlHostName=<Target Client Name>,\
    CvSrcClientName=<Source MultiNode Pseudo Client Name>,\
    CvSrcDB2InstanceName=<Source DB2 Database Name>,\
    CvSrcDbName=<Source DB2 Database Name>"' \
    taken at <Source DB2 Database NODE<n> backup image date> \
    to '<Target DB2 Database Path>' \
    into <Target DB2 Database Name> \
    without prompting

    For automatic storage database:

    export DB2NODE=<n>
    db2 terminate

    db2 restore db <Source DB2 Database Name> \
    load '<software install path>/Base/libDb2Sbt.so' \
    open <n> sessions \
    CvDpfControlHostName=<Target Client Name>,\
    CvSrcClientName=<Source MultiNode Pseudo Client Name>,\
    CvSrcDB2InstanceName=<Source DB2 Database Name>, \
    CvSrcDbName=<Source DB2 Database Name>"' \
    taken at <Source DB2 Database NODE<n> backup image date> \
    ON '</Target DB2 Database Path>' \
    DBPATH ON '</Target DB2 Database Path>' \
    into <Target DB2 Database Name> \
    without prompting

    Where:

    n = DB2 Node Number

    CvDpfClientName = Target MultiNode Pseudo Client Name in Commvault CommServe

    CvDpfControlHostName = Target DB2 Client Name

    CvSrcClientName = Source MultiNode Pseudo Client Name in Commvault CommServe

    CvSrcDB2InstanceName = Source DB2 Database Name

    CvSrcDbName = Source DB2 Database Name

    taken at = Source DB2 Database NODE<n> backup image date

    ON = Target DB2 Database Storage Path

    DBPATH ON = Target DB2 Database Directories Path

    Into = Target DB2 Database Name

  2. Re-update the db2 database configuration parameters LOGARCHOPT1/VENDOROPT since they are overwritten by source database after restore. Set the CvSrcDbName option for the LOGARCHOPT1 parameter to the source database name.
  3. Roll forward the DB2 database.

    export DB2NODE=0
    db2 terminate

    db2 update db cfg for <database name> DBPARTITIONNUM (n) using LOGARCHOPT1 "'\
    CvDpfClientName=<Target_ Db2MultiNode_PesudeoClientName>,\
    CvDpfControlHostName=<Target_DB2_Client_Machine_Name>,\
    CvSrcClientName=<Source_ Db2MultiNode_PesudeoClientName,\
    CvSrcDB2InstanceName=<Source_DB2DPF_Instance_Name>,\
    CvSrcDbName=<Source_DB2_Database_Name>'"
    db2 update db cfg for <database name> DBPARTITIONNUM (n) using VENDOROPT "'\
    CvDpfClientName=<Target_ Db2MultiNode_PesudeoClientName>,\
    CvDpfControlHostName=<Target_DB2_Client_Machine_Name>,\
    CvSrcClientName=<Source_ Db2MultiNode_PesudeoClientName,\
    CvSrcDB2InstanceName=<Source_DB2DPF_Instance_Name>,\
    CvSrcDbName=<Source_DB2_Database_Name>'"
    db2 rollforward db <new_db> to end of logs and stop

For DB2 pureScale

  1. At the Command Prompt, type the restore command.

    db2 restore db <Source DB2 Database Name> \
    load '<software install path>/Base/libDb2Sbt.so' \
    open <n> sessions \
    'options "\
    CvDpfClientName=<Target MultiNode Pseudo Client Name>,\
    CvDpfControlHostName=<Target Client Name>,\
    CvSrcClientName=<Source MultiNode Pseudo Client Name>,\
    CvSrcDB2InstanceName=<Source DB2 Database Name>,\
    CvSrcDbName=<Source DB2 Database Name>"' \
    taken at <Source DB2 Database backup image date> \
    ON '<Target DB2 Database Path>' \
    DBPATH ON '<Target DB2 Database Path>' \
    into <Target DB2 Database Name> \
    without prompting

    Where:

    n = DB2 Node Number

    CvDpfClientName = Target MultiNode Pseudo Client Name in Commvault CommServe

    CvDpfControlHostName = Target DB2 Client Name

    CvSrcClientName = Source MultiNode Pseudo Client Name in Commvault CommServe

    CvSrcDB2InstanceName = Source DB2 Database Name

    CvSrcDbName = Source DB2 Database Name taken at = Source DB2 Database NODE<n> backup image date

    ON = Target DB2 Database Storage Path

    DBPATH ON = Target DB2 Database Directories Path

    Into = Target DB2 Database Name

  2. Re-update the db2 database configuration parameters LOGARCHOPT1/VENDOROPT since they are overwritten by source database after restore. Set the CvSrcDbName option for the LOGARCHOPT1 parameter to the source database name.

    db2 update db cfg for <database name> using LOGARCHOPT1 "'\
    CvDpfClientName=<Target_ Db2MultiNode_PesudeoClientName>,\
    CvSrcClientName=<Source_ Db2MultiNode_PesudeoClientName,\
    CvSrcDB2InstanceName=<Source_DB2DPF_Instance_Name>,\
    CvSrcDbName=<Source_DB2_Database_Name>'"

  3. Roll forward the DB2 database.

    db2 update db cfg for <database name> using VENDOROPT "'\
    CvDpfClientName=<Target_ Db2MultiNode_PesudeoClientName>,\
    CvSrcClientName=<Source_ Db2MultiNode_PesudeoClientName,\
    CvSrcDB2InstanceName=<Source_DB2DPF_Instance_Name>,\
    CvSrcDbName=<Source_DB2_Database_Name>'"
    db2 rollforward db <new_db> to end of logs and stop

Last modified: 7/24/2018 7:11:26 PM