Backing up, restoring, and recovering databases
You can use PATROL for DB2 UDB to perform maintenance and recovery procedures on your partition servers. These procedures are initiated for a selected node from the PATROL console and performed at the node. A backup or restore operation affects only a single node.
If the partition server is a UNIX host, a Schedule Backup command is available to designate a time for the backup to be performed.
Using the Rollforward and History commands, you can view restore sets and recovery history to restore a database to a current state. Use the Prune History File command to manage the history file.
In the PATROL console, you can also perform crash recovery for a database that was terminated and left in an inconsistent state.
To back up, restore, and recover DB2 databases
- Right-click on the DB2 node icon representing the instance level partition server on which you want to perform a backup or restore operation.
- From the menu, select Database Administration > Database Mgmt.
- Use the following commands to complete your backup and restore tasks:
- Backup Database
- Schedule Backup (available only in UNIX)
- Restore Database
- Rollforward Database
- Display History File
Prune History File
Notes about backing up a database
Backing up a database requires you to select a backup method. Ensure that the location that you specify in the backup method has enough available space to accommodate the backed up database so that the command can complete successfully.
Also, ensure that the database is not in use. The KM detects that the database is in use under the following circumstances:
- An SQL Viewer is active.
- Deadlock detection is enabled.
To recover a DB2 database that has terminated abnormally
- Right-click on the DB2EEE database icon and select Database Administration > Recovery Mgmt.
- select the following commands to restart the database and to process any indoubt transactions that might be pending:
- Restart Database
- Process Indoubt Transactions
- If indoubt transactions exist, you can select the transaction and process the transaction using one of the following options:
To re-create and restore a database
- To re-create a database that was removed because it became corrupted or damaged, right-click on the DB2EEE node icon and select Database Administration > Database Mgmt > Create Database at Node.
- To restore the database to the node, right-click on the DB2EEE node icon menu and select Database Administration > Database Mgmt > Restore Database.