logarchmeth1 - Primary log archive method configuration parameter

You can use this parameter to specify the media type of the primary destination for logs that are archived from the current log path.

Configuration type
Database
Applies to
  • Database servers with local and remote clients
  • Clients
  • Database servers with local clients
  • Partitioned database servers with local and remote clients
Parameter type
Configurable Online.1 2
Default [range]
OFF [LOGRETAIN, USEREXIT, DISK, TSM, VENDOR]

The value that you set for the logarchmeth1 configuration parameter depends on your database environment and your database login requirements.

OFF
Specifies that the log archiving method is not used. If you set both the logarchmeth1 and logarchmeth2 configuration parameters to OFF, which is the default, the database is considered to be using circular logging and is not rollforward recoverable.
LOGRETAIN
This value specifies that the user is in charge of archiving and retrieving log files. The user manages log files that are retained in the active log path and has the option of moving them to a different location. Since the database expects to find the required log files in the active log path during rollforward recovery, the user is responsible for moving the log files back into the active log path.
USEREXIT
This value specifies that Db2 manages the archival and retrieval of log files using a program provided by the user, called a user exit program. This program is invoked every time that the database needs to archive or retrieve a log file, and it is responsible for moving the log file to or from the log archive location. For more information, see Automating log file archiving and retrieval with user exit programs.
DISK
You must follow this value with a colon (:) and then a fully qualified existing path name where the log files are archived. For example, if you set the logarchmeth1 configuration parameter to DISK:/u/dbuser/archived_logs, the archive log files are placed in the /u/dbuser/archived_logs/instance/dbname/nodename/logstream/chainid/ directory.
On Windows operating systems, you must format the path name by using UNC disk addressing, such as \\u\dbuser\archived_logs\, or drive letters, such as C:\u\dbuser\archived_logs.
Note: If you are archiving to tape, you can use the db2tapemgr utility to store and retrieve log files.
Note: If you are archiving to NFS, it is recommended to mount the NFS system with the nolock option.
TSM
If specified without any additional configuration parameters, indicates that log files are archived on the local TSM server by using the default management class. If you follow this option with a colon (:) and a TSM management class, the log files are archived by using the specified management class.
When you are archiving logs by using TSM, before you use the management class that is specified by the database configuration parameter, TSM attempts to bind the object to the management class that you specified in the INCLUDE-EXCLUDE list in the TSM client options file. If a match is not found, the default TSM management class that you specified on the TSM server is used. TSM then rebinds the object to the management class that you specified for the database configuration parameter. Thus, the default management class and the management class that you specify for the database configuration parameter must contain an archive copy group, or the archive operation fails. Examples of TSM entries are:
  • With a management class specified - db2 update db cfg for mydb using logarchmeth1 TSM:DB2_LOGS
  • With no management class specified - db2 update db cfg for mydb using logarchmeth1 TSM
VENDOR
Specifies that a vendor library is used to archive the log files. You must follow this value with a colon (:) and the name of the library. The APIs in the library must use the backup and restore APIs for vendor products. An example of a vendor entry is - db2 update db cfg for mydb using logarchmeth1 VENDOR:/home/dbuser/vendorLib/<library name>
Note:
  • Log archiving is complete only when both the logarchmeth1 method and the logarchmeth2 method have run successfully.
  • If you set either the logarchmeth1 or logarchmeth2 configuration parameter to a value other than OFF, the database is configured for rollforward recovery.
  • If you use the userexit or logretain option for the logarchmeth1 configuration parameter, you must set the logarchmeth2 configuration parameter to OFF.
  • To assign an archive path with a space in it, use the db2CfgSet API.
  • The archive log path must not contain log files that do not belong to the current database. If the archive log path was previously used for a database of the same name, these log files must be removed before you use the current archive log path.
1 If logarchmeth2 is OFF, changing logarchmeth1 from OFF to a value other than OFF will only take effect after the database is reactivated, and an offline backup must be taken before the database can be reactivated.
2 If logarchmeth2 is OFF, changing logarchmeth1 from a value other than OFF to OFF will only take effect after the database is reactivated.