How to restore a database in DB2

Source: Internet
Author: User

This article mainly describes how to restore a database in DB2. If you are interested in the actual operation steps for restoring a database in DB2, you can click the following article to view the correct operation steps, the following is a detailed description of the article.

(1) manually drop the database to simulate disaster recovery. perform the following operations:

Db2 drop db sample

(2) restore the backup history (each backup, regardless of the type, will back up the history file ). The timestamp here should be the latest:

 
 
  1. db2 restore db sample history file use tsm   
  2. taken at 20030102223107 buffer 100 

(3) Use the db2 recovery help tool:

 
 
  1. db2ckrst -d sample -t 20030101224424 -r database 

Command to return the recommended required recovery operation command.

(4) follow the prompts of the help tool to restore the version first. The recovery command is as follows:

 
 
  1. db2 restore db sample incremental use tsm taken at 20030101224424 buffer 100 

Recover the master node and other nodes.

The above content is an introduction to DB2 database restoration. I hope you will get some benefits.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.