Disk space full due to DB2 Transaction Logs
search cancel

Disk space full due to DB2 Transaction Logs

book

Article ID: 155270

calendar_today

Updated On:

Products

Security Information Manager

Issue/Introduction

No more disk space is available for proper functioning of the Symantec Security Information Manager (SSIM) appliance.

Cause

The inactive DB2 transaction logs are not cleared, as a result they occupy disk space.

Resolution

The  solution is to clear the inactive transaction logs. Before the logs can be cleared, we need to know which ones are inactive as deleteing an active transaction log will crash DB2.

Follow the steps below to clear the log files.

Note: Though it is not necessary for users and applications to stop using the database while a purging of the transaction logs is performed, it is always advised to do so.

 

- Login onto the SSIM appliance as db2admin via ssh (or root if you directly on console)

 

- Stop all the services:

su -

/opt/Symantec/simserver/simdbmu/bin/stopall.sh --all

 

- Connect to the database using the command

su - db2admin

$db2 connect to sesa

 

- Execute the command

$db2 get db config

   Or to get all log parameters execute the command

$db2 get db config | grep -i log

   Parameters to look out for from the result of this command are

First active log file - this gives you the active log file. Eg: S0000006.LOG

Path to log files - path to the tranaction log files - /dblog/sesa

Log file size - individual log file size

Number of primary log files

 

- Once you know the active log file execute

$db2 prune logfile prior to <activeLogFileName>

   In our example the command would look like

$db2 prune logfile prior to S0000006.LOG

    On execution of this command, DB2 would clear all inactive transaction logs prior to S0000006.LOG

 

- Start all the services

/opt/Symantec/simserver/simdbmu/bin/startall.sh --all

 

- As user root, check the status of the services using the status command

status

 

Risk Involved

Make sure you follow the above mentioned steps for purging DB2 transaction logs, deleting them manually might cease DB functioning and might require a database restore using an older backup.

 

Best Practices

- Transaction log files using diskspace can be monitored by using the command

du –h /dblog/sesa

   If this total size is occupying much of your disk space, perform log clean up as decribed above

 

- If you do not want to purge, you can move the inactive transaction log files to a separate disk.


Applies To

SSIM 4.7.x