How does the DB2 database deal with logs?

Source: Internet
Author: User

This article describes how to restore a database correctly based on logs and full backup files, if you are interested in the correct recovery steps of the database based on the logs and full backup files of the DB2 database, you can click to view the following articles.

Databases, logs, file databases, logs, files

Background 1:

A) perform an online full backup of the DB2 database

 
 
  1. DB2 backup db   online to   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   from   taken at  ;  

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   to end of logs and stop  

The above content introduces how to recover a database in a DB2 database based on logs and full backup files. I hope you will gain some benefits.

The above content describes how to recover a database in a DB2 database based on logs and full backup files. We hope this will 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.