DB2 Data Links Manager Quick Beginnings

DB2 Data Links Manager Recovery Scenarios

This section lists some of the possible DB2 Data Links Manager failure scenarios and the steps required to recover from them. For a description of recommended procedures for easier recovery, see DB2 Data Links Manager System Setup and Backup Recommendations.

In the following scenarios, we will use the following terms and examples:

DLFS file system
Registered prefix (example: /dlink)

DLFM backup directory
Directory where files are backed up (example: /home/dlfm/dlfm_backup)

DLFM home directory
Home directory of DLFM user ID (example: /home/dlfm)

DLFM DB2 database
DB2 database that contains all meta-data (DLFM_DB)

DB2 database
Registered database that contains DATALINK data type (example: CROWN)

Components that may require recovery

The following components may require recovery after a crash of the DB2 Data Links server:

  1. The DB2 database containing a table which has a DATALINK column.
  2. The DB2 Data Links Manager database (DLFM_DB).
  3. Data Links Filesystem Filter (DLFF).
  4. File systems under the control of the DB2 DLFF which are registered to the Data Links Manager.
  5. The DB2 Data Links Manager backup directory

Recovery scenarios

The following recovery scenarios may require operations to be performed on both the DB2 node and the DB2 File Manager node.

The DB2 database will be referred to as "CROWN" throughout all examples, and the DB2 table containing the DATALINK column will be referred to as "DATALINKTABLE".

DB2 Database is lost or was accidentally dropped, but DB2 backup and log files are available.

In this scenario, the DB2 database has not been dropped from the DLFM server.

Recovery Steps:

  1. On the DB2 server, enter the following commands to place all tables in Datalink_Reconcile_Not_Possible (DRNP) state:
       db2 "restore database CROWN"
       db2 "rollforward database CROWN to end of logs and stop"
     
    
  2. Place all tables with datalinks into Datalink_Reconcile_Pending (DRP) state with the following commands:
       db2 set integrity for <table> datalink reconcile pending
       db2 set integrity for <table> datalink reconcile pending immediate unchecked
       db2 reconcile <table>
    

DB2 database explicitly dropped, but DB2 backup and log files are available.

Recovery Steps:

  1. Ensure that the drop database operation is complete, and that all files associated with that database have been unlinked.
  2. On the Data Links server enter the following commands:
       db2 "connect to dlfm_db"
       db2 "select dbid, dbname, dbinst, hostname from dfm_dbid"
       db2 "update dfm_dbid set action=5 where dbid=x'35B3D7BE0006BF7B'"
     
    

    Set dbid equal to value found in previous step.

  3. On the DB2 server enter the following commands to place all tables in Datalink_Reconcile_Not_Possible (DRNP) state:
       db2 "restore database CROWN"
       db2 "rollforward database CROWN to end of logs and stop"
     
    
  4. For each table placed in DRNP state in step 3, enter the following commands:
       db2 set integrity for <table> datalink reconcile pending
       db2 set integrity for <table> datalink reconcile pending immediate unchecked
       db2 reconcile <table>
    

The DLFM_DB database is lost, but the backup and all log files for the DLFM_DB database are available.

Recovery Steps:

  1. On the Data Links server enter the following commands:
       db2 "restore database dlfm_db"
       db2 "rollforward database dlfm_db to end of logs and stop"
    
  2. On the DB2 server enter the following command:
       db2 "connect to CROWN"
       db2 "reconcile table DATALINKTABLE"
    

The DLFM_DB database is lost, a backup of the DFLM_DB database is available, but the not all of the log files are available.

Recovery Steps:

  1. On the Data Links server enter the following commands:
       db2 "restore database dlfm_db"
       db2 "rollforward database dlfm_db to end of logs and stop"
     
    
  2. On the DB2 server enter the following commands to place all tables in Datalink_Reconcile_Pending (DRP) state:
       db2 "connect to CROWN"
       db2 "restore database dlfm_db"
       db2 "rollforward database dlfm_db to end of logs and stop"
     
    
  3. Place all tables with datalinks into DRP state by entering the following commands:
       db2 set integrity for <table> datalink reconcile pending
       db2 set integrity for <table> datalink reconcile pending immediate unchecked
       db2 reconcile <table>
    

The DLFS file system is lost.

Recovery Steps:

  1. Restore the DLFS file system from your storage manager.
  2. On the DB2 Server enter the following command:
       db2_recon_aid CROWN
    

The DLFM backup directory is lost.

Recovery Step:

The DLFS file system and the DLFM backup directory are lost.

Recovery Steps:

  1. Restore the DLFM backup directory from your storage manager.
  2. Restore the DLFS file system from your storage manager.
  3. On the DB2 Server enter the following command:
       db2_recon_aid CROWN
    

The DLFM_DB database, the DLFM backup directory, and the DLFS file system are lost, but the backup and all log files for the DLFM_DB database are available.

Recovery Steps:

  1. On the Data Links server enter the following commands to place all tables in Datalink_Reconcile_Pending (DRP) state:
       db2 "restore database dlfm_db"
       db2 "rollforward database dlfm_db to end of logs and stop"
     
    
  2. Restore the DLFM backup directory from your storage manager.
  3. Restore the DLFS file system from your storage manager.
  4. On the DB2 Server enter the following command:
       db2_recon_aid CROWN
    

The DLFM_DB, the DLFS file system, and the DLFM backup directory are lost. The backup of the DLFM_DB database is available, but not all log files are available.

Recovery Steps:

  1. On the Data Links server enter the following commands:
       db2 "restore database dlfm_db"
       db2 "rollforward database dlfm_db to end of logs and stop"
    
  2. Restore the DLFM backup directory from your storage manager.
  3. Restore the DLFS file system from your storage manager.
  4. On the DB2 Server enter the following command:
       db2_recon_aid CROWN
    

The DB2 database, the DLFM_DB database, the DLFS file system and DLFM backup directory are lost, but backup, and all log files for the DLFM_DB database are available.

Recovery Steps:

  1. On the Data Links server enter the following commands:
       db2 "restore database dlfm_db"
       db2 "rollforward database dlfm_db to end of logs and stop"
    
  2. Restore the DLFM backup directory from your storage manager.
  3. Restore the DLFS file system from your storage manager.
  4. On the DB2 server enter the following commands to place all tables in Datalink_Reconcile_Not_Possbile (DRNP) state:
       db2 "restore database CROWN"
       db2 "rollforward database CROWN to end of logs and stop"
       db2 "connect to CROWN"
     
    
  5. For each table placed in DRNP state in step 4, enter the following commands to place them in DNP state:
       db2 set integrity for <table> datalink reconcile pending
       db2 set integrity for <table> datalink reconcile pending immediate unchecked
       db2 reconcile <table>
    
Note:Rollforward to a point-in-time may not put tables that have all DATALINK columns defined as recovery = no into Datalink_Reconcile_Pending (DRP) state. For all such tables, run the reconcile utility.


[ Top of Page | Previous Page | Next Page ]