Use database logging configuration parameters to specify
data logging options for your database, such as the type of logging
to use, the size of the log files, and the location where log files
should be stored.
Before you begin
To configure database logging options, you must have SYSADM,
SYSCTRL, or SYSMAINT authority.
About this task
You can configure database logging
options by using the UPDATE DATABASE CONFIGURATION command
on the command line processor (CLP), or by calling the db2CfgSet API.
Procedure
- To configure database logging options by using the UPDATE
DATABASE CONFIGURATION command on the command line processor:
- Specify whether you want to use circular logging or
archive logging. If you want to use circular logging, the logarchmeth1 and logarchmeth2 database
configuration parameters must be set to OFF. This
setting is the default. To use archive logging, you must set at least
one of these database configuration parameters to a value other than OFF.
For example, if you want to use archive logging and you want to
save the archived logs to disk, issue the following command:
db2 update db configuration for mydb using logarchmeth1
disk:/u/dbuser/archived_logs
The
archived logs are placed in a directory called /u/dbuser/archived_logs.
- Specify values for other database logging configuration
parameters, as required. The following additional configuration parameters
apply to database logging:
- archretrydelay
- blk_log_dsk_ful
- failarchpath
- logarchcompr1
- logarchcompr2
- logarchmeth1
- logarchmeth2
- logarchopt1
- logarchopt2
- logbufsz
- logfilsiz
- logprimary
- logsecond
- max_log
- mirrorlogpath
- newlogpath
- mincommit
- numarchretry
- num_log_span
- overflowlogpath
For more information about these database logging configuration
parameters, see
Configuration parameters for database logging.
- To configure database logging
options by using IBM® Data
Studio,
use the task assistant for the UPDATE DATABASE CONFIGURATION command.