How to Recover DB2 Database with RESTORE Command
The Restore command recreates a corrupted or a damaged database that has been backed up using the DB2 backup utility. The backup utility can also overwrite a database with a different image or restore the backup copy to a new database. This special command is in the same state that it was in when the backup copy was created. Using this command, you will able to recover the database easily.
The Restore utility can also be used to restore backup images was produced on DB2 Universal Database Version 8. If the database was enabled for Rollforward command during the backup creation then the database can be easily brought back to its earlier version by simply applying the Rollforward command.
In order to perform Restore command, you should keep in mind that the restore process performed on an existing database and existing containers must use the same table space map containers.
Note: The Restore command affects the node on which it is implemented
The Restore operation run over a database that exists and existing containers reuses the same containers as well as table space map. It means that it runs against a new database reacquires all containers and also rebuilds an optimized table space map.
Scope:
The connection required will differ on the type of restore command performed:
As for example, if you are performing the restore to an existing database, database connection will be required. This command used to generate the exclusive connection to the particular database. In order to perform the restore command of existing database then you will require any of the authorization:
sysadm
sysctrl
sysmaint
In order to restore to a new database, you will require one of the authorization:
sysadm
sysctrl
In order to perform the snapshot restore then you will need database as well as instance connection.
Note: When a username is defined then a particular user will need the Connect authority on the database.
Steps to Use Restore Command:
- At first, close all the application and server connected to database.
- Now terminate which backup copy you need to restore by looking at the available backup files. You also need to consider timestamp of the available backup files.
- Now apply the RESTORE DATABASE command. This example refers to the WPSDB database, the default name for the Release database domain. RESTORE DATABSE WPSDB FROM backup_directory_path TAKEN AT timestamp REPLACE EXISTING
- Roll the restored database forward by selecting the same point for the database.
However, if there is no backup or restore command so that you easily recover DB2 database using Restore Command, then you can also recover DB2 database using DB2 File Repair Tool. This tool is very effective and powerful tool and is specially designed to repair and recover all objects and data from DB2 database with an ease.
Post Your Ad Here
Comments