Sunday, August 21, 2011

DB2 Backup and Recovery (BAR) - Part 02 - Introduction to DB2 Log Manger



Introduction

DB2 Log manager is the central component in the DB2 Log file management. It is used when the database is enable for archival logging and allows moving DB2 log files from Primary location (Active Log Location) to Archive location.

In this artical I will discuss the DB2 log manger.

Details

  • DB2 log manager is integrated with DB2 kernel.
  • It is responsible for archiving log files and retrieving log files during rollforward recovery
  • It is started when the database is enable for archival logging.
  • The DB2 log manager process/thread is called “db2logmgr"
  • It supports following archiving media
    • DISK - Log file are archived to DISK location
    • TSM - DB2 is closely integrated with IBM TSM and allow archiving log to TSM storage
    • USEREXIT - Avaiable for backward compatibility.
    • VENDOR - Support for third party storage to store the archive log files    
  • It can be configured using DB CFG parameters. Click hear for more details on DB2 Logging Parameters.
  • Following command can be used to find the DB2 log manager process
    db2pd -edus | grep -i db2log
     
  • When DB2 Log Manager retrieves the log files from archive storage, it puts the archive log to DB2 Active Log Path needed for recovery process. The “Active Log Path” is identified by “logpath” DB CFG parameter.
  • If OVERFLOWLOGPATH parameter is set then the Archive Log files are moved to OVERFLOWLOGPATH during the Rollforward recovery instead of Active Log path
  • LOGARCHMETH1 DB CFG parameter tell DB2 log manager where to move the offline archive log
  • When the Primary log archive is unavailable, then FAILARCHPATH DB CFG can be defined which tell the temporary local directory where the archive log file will be stored.
  • FAILARCHPATH help to avoid the log full condition when the Active Log path is full
  • When the connectivity to Primary log archive destination is established, DB2 log manager moves the archive log files from FAILARCHPATH to LOGARCHMETH1 destination.
     

No comments: