It is not difficult for DB2 to implement logs and full backup files!

Source: Internet
Author: User

The following articles mainly describe the actual database recovery operations of DB2 Based on logs and full backup files, the following is a description of the actual operations performed by DB2 to recover the Database Based on logs and full backup files. We hope this will help you in your future studies.

Databases, logs, file databases, logs, files

Background 1:

A) perform an online full backup of the DB2 database

 
 
  1. DB2 backup db <dbname> online to <dir/dev> include logs; 

B) back up the archive logs generated in the Directory D: \ DB2 \ NODE0000 \ SQL00001 \ SQLOGDIR,

If the database crashes one day, you can recover the database by using all the backup files and the archive logs backed up later,

And restore the database to the time point before the crash.

The procedure is as follows:

 
 
  1. DB2 restore db <dbname> from <dir/dev> taken at <date-time>; 

C) After performing the preceding operations, the database is in the STANDBY state and then copies the archived backup logs to the database log directory,

Roll back the database so that the database can be recovered to the point before the crash.

 
 
  1. DB2 rollforward db <dbname> to end of logs and stop  

The above content is an introduction to the database recovery of DB2 Based on logs and full backup files. I hope you will gain some benefits.

The above content describes how DB2 restores the Database Based on logs and full backup files. We hope to help you in this regard.

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.