Manage the capacity of the database, active
log, and archive logs to ensure that the inventory is sized for the
tasks, based on the status of the logs.
Before you begin
The active and archive logs have the following characteristics:
- The active log can be a maximum size of 512 GB. For more information about sizing the active log for your system, see Planning the storage arrays.
- The archive log size is limited to the size of the file system
that it is installed on. The archive log size is not maintained at
a predefined size like the active log. Archive log files are automatically
deleted after they are no longer needed.
As a best practice, you can optionally create an archive failover
log to store archive log files when the archive log directory is full.
Check
the Operations Center to
determine the component of the inventory that is full. Ensure that
you stop the server before you increase the size of one of the inventory
components.
Procedure
- To increase the size of the database, complete the following steps:
- Create one or more directories for the database on separate drives or file systems.
- Issue the EXTEND DBSPACE command to add the directory or directories to
the database. The directories must be accessible to the instance user ID of the database manager. By
default, data is redistributed across all database directories and space is reclaimed.
Tips: - The time that is needed to complete redistribution of data and reclaiming of space is variable,
depending on the size of your database. Make sure that you plan adequately.
- Ensure that the directories that you specify are the same size as existing directories to ensure
a consistent degree of parallelism for database operations. If one or more directories for the
database are smaller than the others, they reduce the potential for optimized parallel prefetching
and distribution of the database.
- Halt and restart the server to fully use the new directories.
- Reorganize the database if necessary. Index and table reorganization for the server database
can help to avoid unexpected database growth and performance issues. For more information about
reorganizing the database, see technote 1683633.
- To decrease the size of the database for V7.1 servers and later, issue the following DB2® commands from the server instance directory:
Restriction: The commands can increase I/O activity, and might affect server
performance. To minimize performance problems, wait until one command is completed before you issue
the next command. The DB2 commands can be issued when the
server is running.
db2 connect to tsmdb1
db2 set schema tsmdb1
db2 ALTER TABLESPACE USERSPACE1 REDUCE MAX
db2 ALTER TABLESPACE IDXSPACE1 REDUCE MAX
db2 ALTER TABLESPACE LARGEIDXSPACE1 REDUCE MAX
db2 ALTER TABLESPACE LARGESPACE1 REDUCE MAX
db2 ALTER TABLESPACE REPLTBLSPACE1 REDUCE MAX
db2 ALTER TABLESPACE REPLIDXSPACE1 REDUCE MAX
db2 ALTER TABLESPACE ARCHOBJDATASPACE REDUCE MAX
db2 ALTER TABLESPACE ARCHOBJIDXSPACE REDUCE MAX
db2 ALTER TABLESPACE BACKOBJDATASPACE REDUCE MAX
db2 ALTER TABLESPACE BACKOBJIDXSPACE REDUCE MAX
db2 ALTER TABLESPACE BFABFDATASPACE REDUCE MAX
db2 ALTER TABLESPACE BFABFIDXSPACE REDUCE MAX
db2 ALTER TABLESPACE BFBFEXTDATASPACE REDUCE MAX
db2 ALTER TABLESPACE BFBFEXTIDXSPACE REDUCE MAX
db2 ALTER TABLESPACE DEDUPTBLSPACE1 REDUCE MAX
db2 ALTER TABLESPACE DEDUPIDXSPACE1 REDUCE MAX
db2 ALTER TABLESPACE DEDUPTBLSPACE2 REDUCE MAX
db2 ALTER TABLESPACE DEDUPIDXSPACE2 REDUCE MAX
db2 ALTER TABLESPACE DEDUPTBLSPACE3 REDUCE MAX
db2 ALTER TABLESPACE DEDUPIDXSPACE3 REDUCE MAX
db2 ALTER TABLESPACE DEDUPTBLSPACE4 REDUCE MAX
db2 ALTER TABLESPACE DEDUPIDXSPACE4 REDUCE MAX
db2 ALTER TABLESPACE DEDUPTBLSPACE5 REDUCE MAX
db2 ALTER TABLESPACE DEDUPIDXSPACE5 REDUCE MAX
- To increase or decrease the size of the active log, complete the following steps:
- 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.
- Halt the server.
- In the dsmserv.opt file, update the ACTIVELOGSIZE
option to the new size of the active log, in megabytes.
The size of
an active log file is based on the value of the
ACTIVELOGSIZE option. Guidelines
for space requirements are in the following table:
Table 1. How to estimate volume and file space requirementsACTIVELOGSize option value |
Reserve this much free space in the active log directory, in addition to the
ACTIVELOGSize space |
16 GB - 128 GB |
5120 MB |
129 GB - 256 GB |
10240 MB |
257 GB - 512 GB |
20480 MB |
To change the active log to its maximum size of 512 GB, enter the following server option:activelogsize 524288
- If you plan to use a new active log directory, update the directory name that is specified in
the ACTIVELOGDIRECTORY server option. The new directory must be empty and must be
accessible to the user ID of the database manager.
- Restart the server.
- Compress the archive logs to reduce the amount of space that is required for storage. Enable dynamic compression of the archive log by issuing the following
command:
setopt archlogcompress yes
Restriction: Use caution when
you enable the ARCHLOGCOMPRESS server option on systems with sustained high
volume usage and heavy workloads. Enabling this option in this system environment can cause delays
in archiving log files from the active log file system to the archive log file system. This delay
can cause the active log file system to run out of space. Be sure to monitor the available space in
the active log file system after archive log compression is enabled. If the active log directory
file system usage nears out of space conditions, the ARCHLOGCOMPRESS server
option must be disabled. You can use the SETOPT command to disable archive log
compression immediately without halting the server.