Interaction between application of a log and maintenance of a table that maps record identifiers during online reorganization of a database
First Claim
1. A method for performing reorganization in a database management system (DBMS), comprising the steps of:
- reorganizing a plurality of data records which originally reside in an old area of a table space, wherein each of said data records has an old record identifier (RID), while read/write access to said old area is retained;
directing said reorganized data records to a new area in said table space, wherein each of said data records in said new area has a new RID, while read/write access to said old area is retained;
maintaining a mapping table that maps between said old RID and said new RID;
translating a log entry RID for a log entry to said new RID using said mapping table, wherein said log entry RID is said old RID; and
applying said translated log entry with said new RID to said data records in said new area in said table space.
0 Assignments
0 Petitions
Accused Products
Abstract
The present invention includes reorganization of a Database Management System (DBMS). The reorganization of the present invention is implemented by recording a first current Relative Byte Address (RBA). Then, data is copied from the old area in the table space to a new area in the table space in reorganized form. In the present invention, throughout most of reorganization a user maintains access to the DBMS'"'"'s normal facilities to read and write to the old area. The DBMS uses its normal facilities to record writing, which occurs during reorganization, in a log. The reorganization in accordance with the present invention reads the log (that has been written to during reorganization) and processes the log to the new area to bring the new area up to date. This process is performed with the use of a RID mapping table. Finally, at the end of reorganization, the user'"'"'s access is switched from the old area to the new area.
-
Citations
52 Claims
-
1. A method for performing reorganization in a database management system (DBMS), comprising the steps of:
-
reorganizing a plurality of data records which originally reside in an old area of a table space, wherein each of said data records has an old record identifier (RID), while read/write access to said old area is retained; directing said reorganized data records to a new area in said table space, wherein each of said data records in said new area has a new RID, while read/write access to said old area is retained; maintaining a mapping table that maps between said old RID and said new RID; translating a log entry RID for a log entry to said new RID using said mapping table, wherein said log entry RID is said old RID; and applying said translated log entry with said new RID to said data records in said new area in said table space. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method for reorganizing a database, comprising the steps of:
-
recording a first log sequence number (LSN) from a log as a first variable, while read/write access to an old area of a table space is retained; performing reorganization of a plurality of data records, each having an old record identifier (RID) from said old area of said table space, such that a reorganized version of said data records, each having a new RID in a new area of said table space, is directed to said new area while read/write access to said old area is retained; recording a second LSN from said log as a second variable; and applying each log entry between said first variable and said second variable to said reorganized version of said data record identified by said new RID in said new area by using a RID mapping table to translate said old RID to said new RID, while read/write access to said old area is retained. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
-
29. A computer program product, comprising:
a computer usable medium having computer readable program code means embodied in said medium for causing a database management system (DBMS) to be reorganized, the computer readable program code comprising, computer readable program code means for reorganizing a plurality of data records which originally reside in an old area of a table space, wherein each of said data records has an old record identifier (RID); computer readable program code means for directing said reorganized data records to a new area in said table space, wherein each of said data records in said new area has a new RID; computer readable program code means for maintaining a mapping table that maps between said old RID and said new RID; computer readable program code means for translating a log entry RID for a log entry to said new RID using said mapping table, wherein said log entry RID is said old RID; and computer readable program code means for applying said translated log entry with said new RID to said data records in said new area in said table space. - View Dependent Claims (30, 31, 32, 33, 34, 35, 36, 37, 38, 39)
-
40. A computer program product, comprising:
a computer usable medium having computer readable program code means embodied in said medium for causing a database management system (DBMS) to be reorganized, the computer readable program code comprising, computer readable program code means for recording a first log sequence number (LSN) from a log as a first variable; computer readable program code means for performing reorganization of a plurality of data records, each having an old record identifier (RID) from said old area of said table space, such that a reorganized version of said data records, each having a new RID in a new area of said table space, is directed to said new area; computer readable program code means for recording a second LSN from said log as a second variable; and computer readable program code means for applying each log entry between said first variable and said second variable to said reorganized version of said data record identified by said new RID in said new area by using a RID mapping table to translate said old RID to said new RID. - View Dependent Claims (41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52)
Specification