On Aug 2, 4:28*pm, Pierre StJ <p.stjacq...@videotron.cawrote:
Quote:
On Aug 1, 11:27*am, Richard <RSL...@gmail.comwrote:
>
>
Quote:
We have a few development dbs version 8, but really doesnt matter,
that are non-recoverable ( LOGRETAIN OFF). *How do I trim the log
space ? *db2 get db cfg for MYDB | grep 'First active log files'
shows blank.
And there are tons of logfiles and filling diskspace.
|
>
Quote:
As a side note, most of our dbs we have LOGRETAIN=YES and I trim all
logfiles with numbers no less than the
first active logfile no. *Now with nonrecoverable dbs, how do I remove
logfiles safely since there's no active log no ?
|
>
Quote:
Your answer are most appreciated.
|
>
The logs in the log path are useless for recovery so there's no reason
to keep them.
If LOGRETAIN=No then then the logs get regenerated empty at every new
activation of the db.
If you have many logs in there, al *you have to is deactivate the db
and reissue an activate command.
If there are still many logs, they will all be empty ssave for 2 pages
of 4k each.
If that is too many, then revisit the LOGPRIMARY value. *That
determines the number of log files that get preallocated every time
you activate the db.
>
Hope this helps, * Pierre.pedesin
|
Thank you for your suggestions. That verifies I have a flaw in my
thinking. I CAN remove logfiles safely if file no if greater than
first active log. Actually I store them to our backup server, then
remove the inactive logs on the server. But for non-recoverable DBs
the whole of it ( primary + secondary ) logs are needed. There are no
safe log file numbers I can
remove is there ? Let say there is 100 logfiles from S0000000.LOG to
S0000099.LOG and if I assign logprimary=3, I can't say with certain
that I can delete logs S0000003...99
when db is idle thinking logs S00000,1,3 are primaries, and S000004 to
99 are secondaries. At any moment, DB2 can choose to use any of those
files. Correct ?
I can adjust the size of logfile pool by setting LOGPRIMARY and
LOGSECOND, but removing log files may compromised db integritiy. Yes
you might deactive and reactive db
that will trim the logs but not removing logs.
Confirm or Deny ?