CN100461167C - Universal database automatic unloading method and system - Google Patents
Universal database automatic unloading method and system Download PDFInfo
- Publication number
- CN100461167C CN100461167C CNB2005100351954A CN200510035195A CN100461167C CN 100461167 C CN100461167 C CN 100461167C CN B2005100351954 A CNB2005100351954 A CN B2005100351954A CN 200510035195 A CN200510035195 A CN 200510035195A CN 100461167 C CN100461167 C CN 100461167C
- Authority
- CN
- China
- Prior art keywords
- dump
- automatic
- database
- data
- logic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The related auto dump method by a general database comprises: (a) generating configuration file for auto dump with defined dump logic for common database; (b) starting auto-dump module to set auto-dump timer for dump application; (c) using the timer to trigger said module to select opposite data in old database. It also provides an opposite system for dump application.
Description
Technical field
The present invention relates to data management field, particularly a kind of Universal Database maintaining method and system.
Background technology
In existing a lot of database applications, occur because the data volume of database table constantly increases in time through regular meeting, caused occurring in the database for using, not having in a large number the phenomenon of the legacy data of too big meaning.But these data can not be deleted again sometimes fully.When lot of data is present in the database, not only reduced the efficient of database manipulation, the danger of (can not insert or more new data) database also may appear collapses because data are full.Now all Database Systems do not have the processing of automatic dump legacy data, and this just needs application itself to realize dump to legacy data, even need come these legacy datas of dump by the user.Take two kinds of methods to solve this problem in the present application mostly: manual dump and dump automatically.
Manual dump requires the user to realize dump to legacy data being unlikely to overexpansion to guarantee database data by inquiry and dump operation at reasonable time.Its operating process generally comprises: selective dump operation, the dump condition is set, from the data base querying data, preserve Query Result to disk file, deleted data, dump success.Yet should craft dump technology there be following defective: can not solve the problem of data volume overexpansion at all; Increase the workload of system maintenance; Increased the exploitation scale of using; Only be aimed at the application of data designated storehouse and appointment, do not have versatility; When there is contingency table in the dump item, can not guarantee the consistance of data.
Automatically the principle of dump is: timer is set in application, regularly triggers dump operation.Automatically the operating process of dump comprises: start application, automatic dump timer is set, regularly triggers dump operation, wherein, the process of dump operation is similar to the operation of manual dump technology, and just the dump condition configures.Yet the dump technology has following shortcoming automatically: the exploitation scale of application is increased more; Only be aimed at the application of data designated storehouse and appointment, do not have versatility; When there is contingency table in the dump item, can not guarantee the consistance of data.
Summary of the invention
The objective of the invention is to, a kind of universal database automatic unloading method and system are provided, solve the comparatively loaded down with trivial details problem of outdated data dump in the database.
Technical scheme of the present invention is, a kind of universal database automatic unloading method is provided, and may further comprise the steps:
(a) generate automatic dump configuration file, configuration file has defined the dump logic in dump data of different types storehouse;
(b) by the automatic dump module of application start, the dump module is provided with the automatic dump timer in the application according to the dump logic in the described configuration file automatically;
(c) the dump timer triggers automatic dump module automatically, automatic dump module basis and the corresponding dump logic of using of type of database, the legacy data in the database that dump is used.
In the above-mentioned universal database automatic unloading method, described data of different types storehouse comprises one or more among ORACLE, ACCESS, SQL SEVER, MYSQL, the DB2.
In the above-mentioned universal database automatic unloading method, the dump logic in described data of different types storehouse comprises the setting of dump condition and dump item information.
In the above-mentioned universal database automatic unloading method, the dump logic in described data of different types storehouse also comprises definition one or more in following: dump path, the use number percent that satisfies the table space of dump condition, the ratio of unload database, dump item number.
In the above-mentioned universal database automatic unloading method, described dump item information comprises dump item title, dump association database table name, place table space, time field, whether have one or more in associate field, contingency table number, the contingency table information.
In the above-mentioned universal database automatic unloading method, step (c) may further comprise the steps:
(c1) described automatic dump module Query Database, and judge according to the dump condition whether the dump item reaches the dump condition;
(d2), then do not carry out dump operation if do not reach the dump condition; Reach the dump condition if be checked through the dump item, then carry out dump operation.
In the above-mentioned universal database automatic unloading method, step (d2) may further comprise the steps:
(d21) according to the definition in the configuration file, from data base querying and preserve the legacy data by time field ordering of designated ratio;
(d22) deletion has been saved in the legacy data of file;
(d23) record dump operation result.
In the above-mentioned universal database automatic unloading method, described dump logic comprises timer execution time/timer performance period.
The invention still further relates to a kind of universal database automatic unloading system, comprise configuration file, use, automatically the dump module; Use, be used to start automatic dump module; Configuration file is used to define the dump logic in dump data of different types storehouse; Automatically the dump module is used for the dump logic according to configuration file, and the automatic dump timer in the application is set; When automatically the dump timer triggers, according to the corresponding dump logic of using of type of database, the legacy data in the database that dump is used.
In the above-mentioned universal database automatic unloading system, the dump logic in described data of different types storehouse comprises the setting of dump condition and dump item information, and the dump logic in described data of different types storehouse also comprises one or more in following: dump path, the use number percent that satisfies the table space of dump condition, the ratio of unload database, dump item number.
Universal database automatic unloading method of the present invention and system by using independently dump module and configuration file automatically, have realized the automatic dump of legacy data in the different databases.For the situation of the relevant table of dump item, also can realize dump by defining setting in the dump configuration file automatically to the contingency table data.The present invention also can be provided with automatic dump trigger condition, time and operation at the concrete condition of different application in addition, greatly reduces the workload of application and development correlation function.
Description of drawings
Fig. 1 is the structured flowchart of universal database automatic unloading of the present invention system.
Fig. 2 is the process flow diagram of the realization of universal database automatic unloading method of the present invention.
Fig. 3 is the process flow diagram of dump data item step among Fig. 2.
Embodiment
As shown in Figure 1, be the block diagram of universal database automatic unloading of the present invention system.The present invention realizes the data dump logic by automatic dump module 12.This automatic dump module 12 be one can independent operating module, connect by external management interface and a plurality of application 13 (be application program, only illustrate among the figure).Wherein externally management interface such as comprises startups, closes and restarts at application programming interfaces, thus automatically dump module 12 can use 13 start or close in start or close, also can startup in the operational process of using, close or restart.In addition, dump module 12 also can be provided with the timer of using in 13 14 according to the configuration file 11 that has defined the data dump logic automatically, and can be according to the data item that comprises the time field in the data dump logic dump database 12 in the configuration file 11.
In the present embodiment, the XML file of configuration file 11 for adopting SCHEMA (mapped file) to generate is used for definition of data dump logic.Configuration file 11 has defined the general dump logic in dump data of different types storehouse.For example, use the type of database that uses in 13 and be Oracle, then the oracle database type that automatic dump module 12 defines in can be automatically according to configuration file 11 when the operation relevant dump logic of calling automatic dump module is carried out dump.The field that needs in the configuration file 11 to define comprises: type of database, the dump path, timer cycle, the timer execution time, satisfy the use number percent of the table space (or record number of table) of dump condition, the ratio of unload database, the dump item number, dump item information (can be a plurality of, number is consistent with the dump item number), dump item information comprises again: dump item title, dump association database table name, the place table space, the time field, whether there is associate field, the contingency table number, contingency table information (can be a plurality of, number is consistent with the contingency table number), contingency table information comprises: the contingency table title, associate field.Between data item and the contingency table unique associate field must be arranged here, and the present invention do not support the recurrence association, promptly contingency table can not have other contingency table again.
Certainly, also available other instruments of configuration file 11 generate, for example text editor etc.Adopt the benefit of SCHEMA file to be, it can help to generate automatically the configuration of some acquiescences, and after having defined this configuration file, the SCHEMA file can check also whether the XML document definition is legal.And the form of configuration file 11 also is not limited to the XML form.
As shown in Figure 2, be the process flow diagram of the realization of universal database automatic unloading method of the present invention.At first, use the automatic dump configuration file 11 of SCHEMA document definition, the content in the configuration file 11 comprises the contingency table, timer configuration information of type of database, dump setting, dump item, dump item etc.; After having defined this configuration file 11, use XML document definition that the SCHEMA file checking generates whether legal (step S21).
When using 13 startups or in the operational process, start automatic dump module 12.This step can realize by the log-on message of the automatic dump module 12 of configuration in application 13, and can check whether this automatic dump module starts success (step S22) by output journal.Automatically dump module 12 at first reads configuration file 11, and according to the timer configuration information in the configuration file 11 (as timer execution time, cycle etc.) timer 14 (step S23) is set after startup.After reaching the timing condition of setting, timer 14 triggers automatic dump module 12 and begins to start dump operation, automatically dump module 12 is inquired about in the database 15 (step S24) of using 13 correspondences, and judge according to the dump condition of definition in the configuration file 11 whether the dump item reaches the dump condition and the needs dump, for example whether table space (or table record number) surpasses (step S25) such as certain proportions.If reach the dump condition, then dump module 12 is carried out data item dump operation (step S27) automatically, returns step S24 then.If do not reach the dump condition, the automatic behaviour in service (step S26) in dump module 12 record sheet space in journal file then, and return step S24.
As shown in Figure 3, be the process flow diagram of dump data item step (step S27) among Fig. 2.At first automatically, dump module 12 starts dump operation (step S31), and judges and treat whether the data item of dump exists contingency table (step S32).If have contingency table, then dump contingency table data (step S33), dump list data item then; Otherwise direct dump list data item (step S34); Forward step S24 then to.Can be when dump list data item and dump contingency table data (step S33, step S34) according to the definition in the configuration file 11, from the data (older data other data relatively) by time field ordering of database 15 inquiries and preservation designated ratio, deletion has been saved in the legacy data of file then.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.
Claims (10)
1. a universal database automatic unloading method is characterized in that, may further comprise the steps:
(a) generate automatic dump configuration file, described configuration file has defined the dump logic in dump data of different types storehouse;
(b) by the automatic dump module of application start, described automatic dump module is provided with the automatic dump timer in the described application according to the dump logic in the described configuration file;
(c) described automatic dump timer triggers described automatic dump module, and described automatic dump module is according to the dump logic corresponding with the type of database of described application, the legacy data in the database of the described application of dump.
2. universal database automatic unloading method according to claim 1 is characterized in that, described data of different types storehouse comprises one or more among ORACLE, ACCESS, SQL SEVER, MYSQL, the DB2.
3. universal database automatic unloading method according to claim 1 is characterized in that, the dump logic in described data of different types storehouse comprises the setting of dump condition and dump item information.
4. universal database automatic unloading method according to claim 3, it is characterized in that the dump logic in described data of different types storehouse also comprises definition one or more in following: dump path, the use number percent that satisfies the table space of dump condition, the ratio of unload database, dump item number.
5. universal database automatic unloading method according to claim 3, it is characterized in that described dump item information comprises dump item title, dump association database table name, place table space, time field, whether have one or more in associate field, contingency table number, the contingency table information.
6. universal database automatic unloading method according to claim 3 is characterized in that, step (c) may further comprise the steps:
(c1) described automatic dump module Query Database, and judge according to the dump condition whether the dump item reaches the dump condition;
(d2), then do not carry out dump operation if do not reach the dump condition; Reach the dump condition if be checked through the dump item, then carry out dump operation.
7. universal database automatic unloading method according to claim 6 is characterized in that, step (d2) may further comprise the steps:
(d21) according to the definition in the configuration file, from data base querying and preserve the legacy data by time field ordering of designated ratio;
(d22) deletion has been saved in the legacy data of file;
(d23) record dump operation result.
8. universal database automatic unloading method according to claim 1 is characterized in that, described dump logic comprises timer execution time/timer performance period.
9. a universal database automatic unloading system is characterized in that, comprises configuration file, uses, automatically the dump module;
Described application is used to start described automatic dump module;
Described configuration file is used to define the dump logic in dump data of different types storehouse;
Described automatic dump module is used for the dump logic according to described configuration file, and the automatic dump timer in the described application is set; When described automatic dump timer triggers, according to the dump logic corresponding, the legacy data in the database of the described application of dump with the type of database of described application.
10. universal database automatic unloading according to claim 9 system, it is characterized in that, the dump logic in described data of different types storehouse comprises the setting of dump condition and dump item information, and the dump logic in described data of different types storehouse also comprises one or more in following: dump path, the use number percent that satisfies the table space of dump condition, the ratio of unload database, dump item number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100351954A CN100461167C (en) | 2005-06-06 | 2005-06-06 | Universal database automatic unloading method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100351954A CN100461167C (en) | 2005-06-06 | 2005-06-06 | Universal database automatic unloading method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1877569A CN1877569A (en) | 2006-12-13 |
CN100461167C true CN100461167C (en) | 2009-02-11 |
Family
ID=37510006
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005100351954A Expired - Fee Related CN100461167C (en) | 2005-06-06 | 2005-06-06 | Universal database automatic unloading method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100461167C (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102651010A (en) | 2011-02-28 | 2012-08-29 | 国际商业机器公司 | Method, equipment and system for unloading database |
CN102651027A (en) * | 2012-04-05 | 2012-08-29 | 福兴达科技实业(深圳)有限公司 | Method and device for extending storage space |
CN106446172A (en) * | 2016-09-27 | 2017-02-22 | 浪潮软件集团有限公司 | Data dump method for big data comparison |
CN107590056A (en) * | 2017-09-27 | 2018-01-16 | 郑州云海信息技术有限公司 | The dump method and device of audit log in a kind of storage system |
CN109165260A (en) * | 2018-09-25 | 2019-01-08 | 安徽信息工程学院 | Method of data transfer based on ORACLE data basd link |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1202653A (en) * | 1997-06-13 | 1998-12-23 | 精英电脑股份有限公司 | Read-out speed-up method for memory |
US6314529B1 (en) * | 1998-03-10 | 2001-11-06 | Grammer Engine, Inc. | System for providing real-time code coverage |
CN2502324Y (en) * | 2001-09-06 | 2002-07-24 | 铁道部株洲电力机车研究所 | Data memory transfer device |
US20020166083A1 (en) * | 2001-05-03 | 2002-11-07 | International Business Machines Corporation | Conditional hardware scan dump data capture |
CN1486023A (en) * | 2002-09-28 | 2004-03-31 | 华为技术有限公司 | Method for serially implementing data backup of multiple device |
CN1517918A (en) * | 2003-01-17 | 2004-08-04 | 深圳市中兴通讯股分有限公司 | Method for back-up and restoring important data |
-
2005
- 2005-06-06 CN CNB2005100351954A patent/CN100461167C/en not_active Expired - Fee Related
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1202653A (en) * | 1997-06-13 | 1998-12-23 | 精英电脑股份有限公司 | Read-out speed-up method for memory |
US6314529B1 (en) * | 1998-03-10 | 2001-11-06 | Grammer Engine, Inc. | System for providing real-time code coverage |
US20020166083A1 (en) * | 2001-05-03 | 2002-11-07 | International Business Machines Corporation | Conditional hardware scan dump data capture |
CN2502324Y (en) * | 2001-09-06 | 2002-07-24 | 铁道部株洲电力机车研究所 | Data memory transfer device |
CN1486023A (en) * | 2002-09-28 | 2004-03-31 | 华为技术有限公司 | Method for serially implementing data backup of multiple device |
CN1517918A (en) * | 2003-01-17 | 2004-08-04 | 深圳市中兴通讯股分有限公司 | Method for back-up and restoring important data |
Non-Patent Citations (8)
Title |
---|
华为T2000传送网网管数据备份方案的探讨. 王甲兴.铁道运营技术,第9卷第2期. 2003 |
华为T2000传送网网管数据备份方案的探讨. 王甲兴. 铁道运营技术,第9卷第2期. 2003 * |
在C++ Builder下通过FTP实现数据的自动转储. 张诗军,王会进.计算机应用,第22卷第5期. 2002 |
在C++Builder下通过FTP实现数据的自动转储. 张诗军,王会进. 计算机应用,第22卷第5期. 2002 * |
异型数据库数据转储过程的设计. 吴悦,张曾科,邓丽曼.小型微型计算机系统,第18卷第8期. 1997 |
异型数据库数据转储过程的设计. 吴悦,张曾科,邓丽曼. 小型微型计算机系统,第18卷第8期. 1997 * |
非结构化信息数据库的恢复技术. 夏厚德.中南民族大学学报(自然科学版),第23卷第2期. 2004 |
非结构化信息数据库的恢复技术. 夏厚德. 中南民族大学学报(自然科学版),第23卷第2期. 2004 * |
Also Published As
Publication number | Publication date |
---|---|
CN1877569A (en) | 2006-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100461167C (en) | Universal database automatic unloading method and system | |
CN102541598B (en) | A kind of method and system of dynamic load assembly | |
CN101645010B (en) | System and method for automatically generating code | |
JP5342302B2 (en) | Firmware update system, firmware distribution server, and program | |
CN101552692B (en) | Operating and maintenance system and parameter configuration method of network element device | |
CN102012933B (en) | Distributed file system and method for storing data and providing services by utilizing same | |
CN111124474B (en) | API version control method and device | |
CN101471845B (en) | Method for adjusting data block counterpart number and metadata server node | |
US20060004840A1 (en) | Index adding program of relational database, index adding apparatus, and index adding method | |
CN102609488B (en) | Client, data query method of client, server and data query system | |
US20120324436A1 (en) | Method of updating versioned software using a shared cache | |
CN103902562A (en) | Method and device for upgrading terminal databases | |
CN102467520A (en) | Data storage method and device | |
CN111240892A (en) | Data backup method and device | |
CN100433651C (en) | Method and system for ensuring network managment and element configuration data consistency | |
CN110597764A (en) | File management method and device | |
CN101526959B (en) | Data storing method and device | |
CN102215264A (en) | Method and device for supporting multi-tenancy data and service customized running | |
CN102323943A (en) | Virtual-machine-based data storage method and system | |
CN103778176A (en) | Long term archiving of data in a MES system | |
CN105550342A (en) | Data processing method of completely-transparent distributed database | |
CN102043853A (en) | Method and device for updating stored data | |
CN112115166B (en) | Data caching method and device, computer equipment and storage medium | |
CN100504787C (en) | Virtual executing method for installing software, and system | |
CN108228192A (en) | A kind of implementation method of the dynamic management of service-oriented Airborne Software |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090211 Termination date: 20170606 |