Two modes of DB2 backup (1)

Source: Internet
Author: User

This article will give you a detailed explanation of the two modes of DB2 backup-non-archive and archive modes, as well as the issues you need to pay attention to during the backup process, for your reference, I hope to help you.

Similar to Oracle, DB2 also has two modes: log loop and archive log, which are non-archive and archive modes. Next, we will give a brief introduction to these two modes.

Log Loop

Log loop is the default mode, which is not the archive mode. This mode only supports backup offline backup, and DB2 needs to stop the service during the backup process.

Note the following when running offline DB2 backup:

1. Stop the application's access to DB2.

2. Run the list appliacations command to view the existing connections, and then run the force appliacation command to end the connections.

3. Run the deactivate database command to ensure that the DATABASE is not active.

4. Use the backup database command to back up the DATABASE in DB2.

Archive logs

Archive logs are not in the default status and will only take effect after configuration. When using the Log Retention mode, DB2 uses a database that can be recovered, and supports online backup, rollback, and crash recovery.

The configuration of the DB2 archive log mode mainly relies on two parameters: Logarchmeth1 and Logarchmeth2 (Note: The Logretain parameter has been replaced by Logarchmeth1 after DB2 v8, so you do not need to worry about it ).

Set Logarchmeth1 to LOGRETAIN

With archive logs, databases are recoverable databases. Enable Rollback Recovery and crash recovery, but not the automatic archiving mode.

After archiving a log file, you must manually delete useless archived logs so that new log files can reuse disk space. Every time the log file is full, DB2 begins to write records to another log file and constantly creates new log files.


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.