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.