Database-rearranging program, database-rearranging method, and database-rearranging apparatus
First Claim
1. A computer-readable, non-transitory medium storing a database-rearranging program for rearranging a database, the database-rearranging program causing a computer to execute a procedure comprising:
- sequentially selecting pages of a first database in response to a request for rearranging data stored in the first database, and copying records in the sequentially selected pages to a second database, while recording a progress status of the copying in a page status management table such that each page in the first database is given an uncopied status indicating that the page has not yet been subjected to the copying, or a being-copied status indicating that the page is in process of the copying, or a copied status indicating that the copying of the page has been completed; and
referring to the page status management table, in response to a request for writing an updated record in a specified page of the first database, to retrieve the progress status of the specified page, writing the updated record in the specified page of the first database when the retrieved progress status indicates that the specified page is in the uncopied status, writing the updated record in the specified page of both the first and second databases when the retrieved progress status indicates that the specified page is in the copied status, waiting for a change in the progress status when the retrieved progress status indicates that the specified page is in the being-copied status, and writing the updated record in the specified page of both the first and second databases when the progress status of the specified page is changed from the being-copied status to the copied status.
1 Assignment
0 Petitions
Accused Products
Abstract
A database-rearranging program which is capable of rearranging a database while maintaining high reliability, without stopping services provided by the database. When a request for rearranging the copy source database is input, a record copying module sequentially selects pages in the copy source database, and the records in the selected page are copied to the copy destination database. Further, the record copying module sets a progress of copying of each page of the copy source database to a page status management table. Thereafter, when a request for writing updated records is input, a record writing module refers to the page status management table, and when a page of the copy source database in which the updated records should be written is in an uncopied status, the updated records are written in the page of the copy source database, and when the same is in a copied status, the updated records are written in the copy source database and the copy destination database.
16 Citations
7 Claims
-
1. A computer-readable, non-transitory medium storing a database-rearranging program for rearranging a database, the database-rearranging program causing a computer to execute a procedure comprising:
-
sequentially selecting pages of a first database in response to a request for rearranging data stored in the first database, and copying records in the sequentially selected pages to a second database, while recording a progress status of the copying in a page status management table such that each page in the first database is given an uncopied status indicating that the page has not yet been subjected to the copying, or a being-copied status indicating that the page is in process of the copying, or a copied status indicating that the copying of the page has been completed; and referring to the page status management table, in response to a request for writing an updated record in a specified page of the first database, to retrieve the progress status of the specified page, writing the updated record in the specified page of the first database when the retrieved progress status indicates that the specified page is in the uncopied status, writing the updated record in the specified page of both the first and second databases when the retrieved progress status indicates that the specified page is in the copied status, waiting for a change in the progress status when the retrieved progress status indicates that the specified page is in the being-copied status, and writing the updated record in the specified page of both the first and second databases when the progress status of the specified page is changed from the being-copied status to the copied status. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer implemented method of rearranging a database, the computer implemented method comprising:
-
sequentially selecting pages of a first database in response to a request for rearranging data stored in the first database, and copying records in the sequentially selected pages to a second database, while recording a progress status of the copying in a page status management table such that each page in the first database is given an uncopied status indicating that the sage has not yet been subjected to the copying, or a being-copied status indicating that the page is in process of the copying, or a copied status indicating that the copying of the page has been completed; and referring to the page status management table, in response to a request for writing an updated record in a specified page of the first database, to retrieve the progress status of the specified page, writing the updated record in the specified page of the first database when the retrieved progress status indicates that the specified page is in the uncopied status, writing the updated record in the specified page of both the first and second databases when the retrieved progress status indicates that the specified page is in the copied status, waiting for a change in the progress status when the retrieved progress status indicates that the specified page is in the being-copied status and writing the updated record in the specified page of both the first and second databases when the progress status of the specified page is changed from the being-copied status to the copied status.
-
-
7. A database-rearranging apparatus for rearranging a database, the database-rearranging apparatus comprising:
-
record copying means performed by a processor, responsive to a request for rearranging data stored in a first database, for sequentially selecting pages of the first database, and copying records in the sequentially selected pages to a second database, while recording a progress status of the copying in a page status management table in a memory, such that each page in the first database is given an uncopied status indicating that the page has not yet been subjected to the copying, or a being-copied status indicating that the page is in process of the copying, or a copied status indicating that the copying of the page has been completed; and record writing means performed by the processor, responsive to a request for writing an updated record in a specified page of the first database, for referring to the page status management table to retrieve the progress status of the specified page, and writing the updated record in the specified page of the first database when the retrieved progress status indicates that the specified page is in the uncopied status, writing the updated record in the specified page of both the first and second databases when the retrieved progress status indicates that the specified page is in the copied status, waiting for a change in the progress status when the retrieved progress status indicates that the specified page is in the being-copied status, and writing the updated record in the specified page of both the first and second databases when the progress status of the specified page is changed from the being-copied status to the copied status.
-
Specification