Friday, 12 December 2014

What to do when the transaction log becomes full

You have to run the following commands

Connect to database using -
     db2 connect to DBNAME USER <USERBANEM> USING <PASSWORD>

See the details for the database using -
    db2 get db cfg for DBNAME show detail

Increase the number of primary log files using -
    db2 update db cfg for DBNAME using logprimary 2

Increase the number of secondary log files using -
    update db cfg for DBNAME using logsecond 2

Increase the number of pages of size 4 kB each using -
   update db cfg for DBNAME using logfilsiz 100000

The total log size you saw in details and which you set, is number of pages x page size x (number of primary logs _ number of secondary logs)

No comments:

Post a Comment