vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi folks, How to remove the transaction logs which are out of date in HADR environment? DB2 command PRUNE, it can only run on primary database but cannot run on standby database. Because the database conection is not permitted on standby database. USEREXIT, I don't know whether it can run on standby database or not... Any comments? Laurence |
| |||
| On 4月20日, 下午10時37分, Laurence <worldwide...@gmail.com> wrote: > Hi folks, > > How to remove the transaction logs which are out of date in HADR > environment? > > DB2 command PRUNE, it can only run on primary database but cannot run > on standby database. Because the database conection is not permitted > on standby database. > > USEREXIT, I don't know whether it can run on standby database or > not... > > Any comments? > > Laurence Hmm, I mean the archived logs but not transaction logs. Sorry~ How to remove/clear archived logs between primary/standby databases in HADR environment? Have any comments? Thanks in advance, Laurence |
| |||
| On Apr 22, 9:45*pm, Laurence <worldwide...@gmail.com> wrote: > On 420, 銝1037, Laurence <worldwide...@gmail.com> wrote: > > > Hi folks, > > > How to remove the transaction logs which are out of date in HADR > > environment? > > > DB2 command PRUNE, it can only run on primary database but cannot run > > on standby database. Because the database conection is not permitted > > on standby database. > > > USEREXIT, I don't know whether it can run on standby database or > > not... > > > Any comments? > > > Laurence > > Hmm, I mean the archived logs but not transaction logs. Sorry~ > > How to remove/clear archived logs between primary/standby databases in > HADR environment? Have any comments? > > Thanks in advance, > > Laurence You will have to write a script to delete them. |
| ||||
| Ideally HADR should manage the set of log files automatically on the standby, deleting or recycling (rename old and use as container for a new one) them as needed. It is intended to do this, but there are a couple of known issues that may play in, causing accumulation of more log files than desirable on the standby. - APAR IY85138 - fixed in V8 FP14 and V9 FP2 - "First active log file" not updated frequently enough on standby, causing retention/ accumulation of potentially many more log files than needed. - APAR IY94994/APAR JR25834 - open - Log files are never deleted on HADR standby, only recycled. This results in the number of log files retained on the standby only growing, never shrinking. It is generally* safe to delete log files from the HADR standby that have (a) already been archived (at primary), and (b) have a sequence number lower than that of the first active log file. DB2 itself will normally consider such log files for removal (subject to implications of config param LOGPRIMARY). *- The risk involved in removing such log files is that they may be required later in case of a rollforward operation or reinitialization of the HADR standby. In an HADR environment, log file archives made at one site in an HADR pair must anyway be later accessible to the other site for these purposes, so this is not a new requirement of this particular scenario. One can determine the first active log file at the standby from the output of "GET DB CFG" issued there, for example: db2 get db cfg for <dbname-or-alias> | grep "First active" Regards, - Steve P. -- Steve Pearson, DB2 for Linux, UNIX, and Windows, IBM Software Group "Portland" Development Team, IBM Beaverton Lab, Beaverton, OR, USA |