Method of dynamically adding and removing DB2 active logs
First Claim
1. A method of dynamically adding a new active log to a DATABASE 2 (DB2) subsystem without cycling DB2, said subsystem having a log management control block (LMB) chain that includes a log data set active log (LDSD) control block for each active log, a bootstrap data set (BSDS) data set having at least one BSDS active log record, and a cache including cached portions of the BSDS data set, said method comprising the steps of:
- (a) verifying that sufficient storage in the BSDS active log record is available to add the new active log;
(b) invoking the DB2 module DSNJDS01 with an ALLOCATE request to allocate the new active log data set and create a new LDSD control block for the new active log data set;
(c) setting NEW and REUSABLE status flags in the new LDS D control block;
(d) completing initialization of the new LDSD control block;
(e) obtaining the LMB LOG WRITE latch;
(f) adding the new LDSD control block to the LMB chain;
(g) obtaining the BSDS ACCESS latch;
(h) updating the BSDS to show the presence of the new active log;
(i) updating the BSDS cache; and
(j) releasing said latches.
9 Assignments
0 Petitions
Accused Products
Abstract
In a novel method of dynamically adding or removing active logs in a DB2 subsystem without the necessity of cycling DB2, a set of control blocks emulating certain DB2 control blocks is constructed. In adding an active log, a call to a DB2 module is made to allocate the new active log data set and create a new LDSD control block for the new active log data set. The NEW and REUSABLE status flags are set in the new LDSD control block, initialization of the new LDSD control block is completed, and the new LDSD control block is added to the LDSD chain off the LMB. The BSDS record(s) and the cached portions of the BSDS information are updated to reflect the addition of the new active log. In removing an active log, the LDSD of the active log is removed from the LDSD chain and an attempt is made to deallocate the active log data set via a call to a DB2 module. If the deallocation attempt is unsuccessful, the active log'"'"'s LDSD is reinserted in the chain off the LDSD; if the attempt is successful the BSDS and the cached portions of the BSDS are updated to reflect the removal of the active log.
-
Citations
2 Claims
-
1. A method of dynamically adding a new active log to a DATABASE 2 (DB2) subsystem without cycling DB2, said subsystem having a log management control block (LMB) chain that includes a log data set active log (LDSD) control block for each active log, a bootstrap data set (BSDS) data set having at least one BSDS active log record, and a cache including cached portions of the BSDS data set, said method comprising the steps of:
-
(a) verifying that sufficient storage in the BSDS active log record is available to add the new active log; (b) invoking the DB2 module DSNJDS01 with an ALLOCATE request to allocate the new active log data set and create a new LDSD control block for the new active log data set; (c) setting NEW and REUSABLE status flags in the new LDS D control block; (d) completing initialization of the new LDSD control block; (e) obtaining the LMB LOG WRITE latch; (f) adding the new LDSD control block to the LMB chain; (g) obtaining the BSDS ACCESS latch; (h) updating the BSDS to show the presence of the new active log; (i) updating the BSDS cache; and (j) releasing said latches.
-
-
2. A method of dynamically removing a specified active log from a DATABASE 2 (DB2) subsystem without cycling DB2, said subsystem having a log management control block (LMB) chain that includes a log data set active log (LDSD) control block for each active log, a bootstrap data set (BSDS) data set, and a cache including cached portions of the BSDS data set, said method comprising the steps of:
-
(a) obtaining the LMB LOG WRITE latch; (b) removing the LDS D control block of the specified active log from the LMB chain; (c) invoking the DB2 module DSNJDS01 with a DEALLOCATE request to deallocate said active log data set; (d) if the DEALLOCATE request is successfully completed, then continuing, else replacing said LDSD control block on the LMB chain; (e) obtaining the BSDS ACCESS latch; (f) updating the BSDS to show the removal of the specified active log; (g) updating the BSDS cache; and (h) releasing said latches.
-
Specification