0

my DB2 database (v 9.7) is in Circular mode.

Current Logging Type:Circular

(USEREXIT) = OFF
(LOGRETAIN) = OFF
(LOGARCHMETH1) = OFF
(LOGARCHMETH2) = OFF
(LOGPRIMARY) = 10
(LOGSECOND) = 10
Path to log files: /home/ctginst1/ctginst1/NODE0000/SQL00001/SQLOGDIR/

I had old archive location /opt/IBM/archive and now my hard disk space is full 100% because I have over 500 logs in that location which I cannot find that is defined somewhere.

What is going on?Why archive logs keep coming to old archive log location?

This is really big problem for us I will be thankful for any help

5
  • 1
    Are you sure that circular took affect? Did you force everyone off the DB and deactivate it? Feb 4, 2015 at 13:45
  • Hi Chris, you mean to run db2 force application all, db2stop, and db2start and it should take affect? Please confirm me I did not do that. I did however do the offline backup recently I will check if logs are still coming after some time
    – Dejan
    Feb 4, 2015 at 15:55
  • 2
    Simply deactivating the database (which would have happened with an offline backup) will cause the change to go into effect. Feb 5, 2015 at 17:23
  • Thank you Chris and Ian. I suppose I can delete all those old archive logs now when I have offline backup?? Please confirm
    – Dejan
    Feb 6, 2015 at 10:12
  • 1
    Once you have an offline backup, you should be on circular logging. So yes, you can delete those archived logs. If your paranoid (and a good DBA should be), take a file system backup before you delete the logs. Then you have them just in case. Feb 6, 2015 at 17:19

2 Answers 2

1

Run GET DB CFG with the SHOW DETAIL option, which will reveal any settings that are delayed (not yet active). Any difference between the "Current" and "Delayed" value indicates a DB CFG change that was made after the database was last activated.

If the old path isn't showing up in any of the settings in the "Current" column of the database config, then examine the logging settings of other local databases on the system (and in other local instances if any exist) to see if they're the culprit.

It also wouldn't hurt to take a look at the crontab schedules on the server to see if a cron job is responsible for copying the files to an inappropriate path.

-1

enter image description here this how we need to update the new active log path. once it is done we need to restart db2 and activate db , then it will change to newlog path value to your path to log files. this activity requires minimal down time.

after restart it will change to like below

enter image description here

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. Oct 14, 2022 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.