Active log
一、概述
The active log files record transactions that are in progress on the server.
The active log stores all the transactions that have not yet been committed. The active log always contains the most recent log records. If a failure occurs, the changes that were made but not committed are rolled back, and all committed transactions, which might not have been physically written to disk, are reapplied and committed again.
The location and size of the active log are set during initial configuration of a new or upgraded server (or by specifying the ACTIVELOGDIR and the ACTIVELOGSIZE parameters of the DSMSERV FORMAT or DSMSERV LOADFORMAT utility). Both the location and size can be changed later. To change the size of the active log,
活动日志默认是16384 MD(16 GB),最大为131072MB(128GB)最小的活动日志为2048MB(2GB)。当估计活动日志的大小时候,要考虑到最大工作负荷时的状态。对于简单的别分和归档没有重复数据删除,20GB的活动日志是可以的。如果使用的是一个重复删除的大象对象数据库(例如图像设备),活动日志的大小因为数据库大小的20%。
二、增加活动日志的大小
If the log is running out of space, the current transaction is rolled back, and the server issues an error message and halts. You cannot restart the server until the active log size is increased.
To increase the size of the active log while the server is halted, complete the following steps:
1.Issue the DSMSERV DISPLAY LOG offline utility to display the size of the active log.
2.Ensure that the location for the active log has enough space for the increased log size. If a log mirror exists, its location must also have enough space for the increased log size.
3.Halt the server.
4.In the dsmserv.opt file, update the ACTIVELOGSIZE server option to the new maximum size of the active log, in megabytes. For example, to change the active log to its maximum size of 128 GB, enter the following server option:
activelogsize 131072
5.If you will use a new active log directory, update the directory name specified in the ACTIVELOGDIR server option. The new directory must be empty and must be accessible to the user ID of the database manager.
6.Restart the server.
日志文件当达到最大限度的时候,都是按照512MB自动增加的。如果存在日志镜像,那么日志文件也会相应的自动增加。
三、移动活动日志文件
You can move only the active log from one directory to another.
1.Halt the server.
2.Create a new active log directory. For example:
mkdir /activelog2
mkdir p:\tsm\activelog
3.Update the dsmserv.opt option file for the new active log directory. For example:
activelogdir /activelog2
activelogdir p:\tsm\activelog
4.Restart the server. The active logs are automatically moved by the database manager from the old directory to the new directory.
5.Optional: Remove the old directory.
Active log mirror
一、概述
The active log mirror is a copy of the active log that can be used if the active log files cannot be read. All changes made to the active log are also written to the log mirror. There can be only one active log mirror.
Mirroring the active log can protect the database when a hardware failure occurs on the device where the active log is stored. Mirroring the active log provides another level of protection in addition to placing the active log on hardware that has high-availability features. Creating a log mirror is optional but recommended. Place the active log directory and the log mirror directory on different physical devices. If you increase the size of the active log, the log mirror size is increased automatically.
本文出自 “无双城” 博客,谢绝转载!