How to recover DB2 Database using RECOVER command

db2We might have faced issue while using DB2 database. We all know that DB2 is a Relational Database Management System (RDBMS) created by the most popular company IBM. IBM DB2 is the most used server for every OS IBM has specific DB2 product.  We know that it perform many management related tasks such as to create, retrieve, store, and updating the data. It has many features and a high performance database engine which provide many addition features to user. In this user can store and operate large amount of data by the help this file. The file also provides protection to your data, and avoids the unauthorized entry. But just like other application this is only prone to corruption. Here you will get to know how to recover the database by the help of recover command. If you facing any corruption issue with your DB2 database then learn how to get back the corrupt data in a new healthy form using RECOVER command.

RECOVER command is an in-Built Command in db2 database that can help the user to recover corrupted DB2 database.

How to Use Recover Command:

RECOVER DATABASE db_name TO point_in_time

Benefits of Recover Command:

1.) The best thing about this command is that you need not to tell where to get the backup image. It automatically search in recovery history file to get the backup image to obtain the point in time you give.

2) You can even provide a different recovery history file on the disk if you know that the database doesn’t exist. This makes a simpler restore operation and if you need to restore to make the things simple.

3) The best advantage of this RECOVER command that if it fails it can be restarted from where it was left off.

Few points that you should remember while using Recover Command:

When you are trying to recover the existing database you must have the database connection.

Recover command establish a connection automatically to specified database and release it when the recovery operation gets over.

But in some this recover command fails to retrieve the corrupted db2 database. But no needs to worry you have other way to get back you important database. By the help of third party repair tool you can easily recover the corrupted database. There are many reason behind the corruption of database such as:

  • The database gets corrupt if you have a corrupt file system
  • Sometime due to improper system shut down can also result to database corruption.
  • Virus Attack is the most common reason behind the corruption of any database.
  • Malfunctioning of the hardware also lead to database corruption.
  • Oversized database file is also the reason behind the corruption.
downloadnow buynow learn-more-button-orange

These are few common scenario that play their major role behind the corruption of DB2 database. It is quite hard to recover the database from corruption issue but the help of Db2 File Repair Tool you can easily repair and recover corrupted or inaccessible db2 file without losing the data. This is the most reliable repair tool that performs a deep scan and retrieves the inaccessible or corrupt database back in a new healthy form.

Steps to Recover DB2 Database using RECOVER command:

Step 1:  Download, Install and Run DB2 File Repair software. It will provides two options to repair db2 file, first option is for if the database is attached to DB2, then you can select the option ‘Repair the database stored at default location‘, and if the database is not attached to DB2 then choose the manual selection of database.

1 (3)

Step 2: It will provide you the list of database attached to DB2. Select the particular database you want to repair and recover corresponding database objects.

2 (2)

Step 3: In this step this tool provide the list of recoverable database files. You can see the preview by clicking on it.

3 (2)

Step 4: Give the path location for the recoverable database and its object to be saved. Click on ‘Ok’ button.

4 (2)