CN111444281B - Database parameter synchronization method and system - Google Patents
Database parameter synchronization method and system Download PDFInfo
- Publication number
- CN111444281B CN111444281B CN202010297974.6A CN202010297974A CN111444281B CN 111444281 B CN111444281 B CN 111444281B CN 202010297974 A CN202010297974 A CN 202010297974A CN 111444281 B CN111444281 B CN 111444281B
- Authority
- CN
- China
- Prior art keywords
- parameter
- database
- parameter table
- history
- date
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/273—Asynchronous replication or reconciliation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/219—Managing data history or versioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a database parameter synchronization method and a database parameter synchronization system, wherein the method comprises the following steps: setting a parameter table and a history parameter table; when the database performs batch, inquiring whether the historical parameter table has current-period accounting date parameter data or not; if the current accounting date parameter data is not queried, synchronizing to a database according to the parameter data needing to be synchronized in the parameter table, backing up the synchronized parameter data to a history parameter table, and setting the current accounting date for the backed-up parameter data in the history parameter table; and if the current date accounting date parameter data is queried, synchronizing the current date accounting date parameter data to a database. The method and the system are suitable for parameter synchronization of various databases, can maintain current parameters into historical parameter tables according to accounting days, enable other database systems to synchronize corresponding parameters according to respective accounting days, ensure consistency of parameters in each period among the databases, store historical data in each parameter table and support data tracing.
Description
Technical Field
The present invention relates to the field of database management technologies, and in particular, to a method and a system for synchronizing database parameters.
Background
In recent years, the domestic transformation of various large commercial bank database systems is accelerated, and the situation that new and old database systems are parallel is unavoidable in the downward transformation process. Normally, after maintaining parameters of the front end interface, service personnel need to distribute new and old systems at the same time; however, accounting days of new and old systems may be different due to performance differences, which may cause consistency problems in each phase of parameters among heterogeneous databases.
Currently, parameter synchronization among multiple databases is mainly based on isomorphic databases (such as multiple ORACLE databases), and the scheme of parameter synchronization generally adopts a broadcast distribution mode to send parameter data to other databases; because accounting days of a plurality of database systems are different, processing data by the same parameter has problems, and the ORACLE and GBASE databases cannot be communicated in two directions, so that parameter synchronization cannot be completed according to the previous scheme.
In this regard, a database parameter synchronization scheme that can ensure database parameter synchronization consistency and has wide applicability is needed.
Disclosure of Invention
In order to solve the problems, the invention provides a database parameter synchronization method and a database parameter synchronization system, wherein in the parameter synchronization process, synchronization among a plurality of databases can be realized only by configuring a parameter table to be synchronized, and the operation is flexible and convenient and is not easy to make mistakes; according to the scheme, the parameter data can be stored according to the accounting date, each database system can actively acquire the parameter data and maintain the accounting date, other database systems can be directly used based on the parameter data, and because each parameter table can store historical data, data tracing can be achieved.
In an embodiment of the present invention, a method for synchronizing database parameters is provided, including:
setting a parameter table and a history parameter table, wherein parameter data needing to be synchronized are set in the parameter table;
when the database is batched, inquiring whether the historical parameter table has current date accounting date parameter data or not;
if the current accounting date parameter data is not queried in the history parameter table, synchronizing to the database according to the parameter data needing to be synchronized in the parameter table, backing up the synchronized parameter data to the history parameter table, and setting the current accounting date for the backed up parameter data in the history parameter table;
and if the current date accounting date parameter data is queried in the history parameter table, synchronizing the current date accounting date parameter data to the database.
In another embodiment of the present invention, a system for synchronizing database parameters is also presented, the system comprising:
the parameter table setting module is used for setting a parameter table and a history parameter table, wherein parameter data needing to be synchronized are set in the parameter table;
the parameter data query module is used for querying whether the historical parameter table has current date accounting date parameter data or not when the database is batched;
the parameter synchronization module is used for synchronizing to the database according to the parameter data needing to be synchronized in the parameter table under the condition that the parameter data of the current period accounting date is not queried in the history parameter table, backing up the synchronized parameter data to the history parameter table, and setting the current period accounting date for the backed-up parameter data in the history parameter table;
and under the condition that the current date accounting date parameter data is inquired in the history parameter table, synchronizing the current date accounting date parameter data to the database.
In another embodiment of the present invention, a computer device is also presented, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a method of database parameter synchronization when executing the computer program.
In another embodiment of the present invention, a computer readable storage medium storing a computer program which when executed by a processor implements a method of database parameter synchronization is also presented.
The method and the system for synchronizing the database parameters are suitable for synchronizing the parameters of various databases, and a worker can realize synchronization among the databases by only configuring a parameter table needing synchronization, so that the operation is flexible and convenient; in the database parameter synchronization process, the current parameters can be maintained in the historical parameter tables according to the accounting days, other database systems can synchronize corresponding parameters according to the accounting days respectively, consistency of parameters among databases in each period is guaranteed, each parameter table can store historical data, and data tracing is supported.
Drawings
FIG. 1 is a flowchart of a method for database parameter synchronization according to an embodiment of the present invention.
FIG. 2 is a flowchart of a method for database parameter synchronization according to another embodiment of the present invention.
FIG. 3 is a system architecture diagram illustrating database parameter synchronization according to an embodiment of the present invention.
FIG. 4 is a schematic diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable those skilled in the art to better understand and practice the invention and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Those skilled in the art will appreciate that embodiments of the invention may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, the method and the system for synchronizing the database parameters are provided, the method and the system can ensure the consistency of the parameters under the condition that a plurality of database systems have different accounting days, in the process of synchronizing the data parameters, a target database can not only receive the parameters, but also maintain the current parameters into a historical parameter table according to the accounting days of the system, and other database systems can respectively acquire the corresponding parameters according to the respective accounting days.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments thereof.
FIG. 1 is a flowchart of a method for database parameter synchronization according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S101, setting a parameter table and a history parameter table, wherein parameter data to be synchronized are set in the parameter table;
step S102, inquiring whether the current date accounting date parameter data exists in the history parameter table when the database is batched;
step S103, if the current date accounting date parameter data is not queried in the history parameter table, synchronizing to the database according to the parameter data needing to be synchronized in the parameter table;
backing up the synchronous parameter data to the history parameter table, and setting the current accounting date for the backed-up parameter data in the history parameter table;
step S104, if the current date accounting date parameter data is queried in the history parameter table, synchronizing the current date accounting date parameter data to the database.
In one embodiment, the database includes GBASE and ORACLE databases.
The database parameter synchronization method provided by the invention is suitable for parameter synchronization between ORACLE and GBASE databases, and is also suitable for other heterogeneous or isomorphic databases.
In order to more clearly explain the above method for database parameter synchronization, a specific embodiment will be described below.
Referring to fig. 2, a flowchart of a method for database parameter synchronization according to another embodiment of the present invention is shown. As shown in fig. 2, the method further includes:
step S200:
defining a table structure of each parameter table and a table structure of a corresponding history parameter table at a database server of service maintenance parameters; and creating a parameter table structure needing to be synchronized in a target-end database, wherein the target-end database can be a GBASE database, an ORACLE database or other types of databases.
Creating a parameter synchronization table, configuring parameter table information to be synchronized, wherein the parameter table information comprises: parameter table name, history parameter table name, database name to be synchronized, corresponding database user name.
Step S201:
setting a corresponding parameter table and a history parameter table according to the parameter table name and the history parameter table name in the parameter synchronization table, wherein parameter data needing synchronization are set in the parameter table.
In one embodiment, the parameter data may be configured by a worker; the staff can maintain all the parameters to be synchronized into a parameter synchronization table sync_cde_tab, which records the range of the parameter table to be synchronized and the database name of each parameter table to be synchronized, and only needs to maintain the table if the table is updated later.
Each parameter table (assume table name a) has a unique corresponding history parameter table (table name a_his). The table A only records the current parameter data, and the service can be maintained at any time; the table a_his is more than the table a by only one DATE column (column name sync_process_date) for recording the accounting DATE corresponding to the parameter data.
Step S202:
the synchronization process of database parameters can use cursor and DBLINK modes to realize the parameter synchronization of ORACLE and GBASE databases; because the synchronization mechanism is that each database actively acquires parameter data according to the accounting date and automatically maintains the parameter data in the parameter history table. Each database therefore needs to develop a parameter synchronization program to ensure that current parameters are obtained before the system is running.
Specifically, if the data size of the parameter table is small, the parameter synchronization can take the form of DBLINK, and before executing the parameter synchronization program, the DBLINK between the database to be synchronized and the parameter maintenance database needs to be created. For GBASE databases, it is also necessary to configure gateway information at the system level.
In an embodiment, when the cursor is utilized to synchronize parameters of the database, the cursor needs to be defined first, and the cursor comprises a corresponding database user name and is used for reading the parameter table and the history parameter table;
when the database is batched, opening the cursor;
and checking the database name and the database user name of the database according to the parameter synchronization table, and circularly reading a history parameter table corresponding to the history parameter table name according to the value of the cursor under the condition that the checking is passed, and inquiring whether the current accounting date parameter data exists.
If the current date accounting date parameter data is not queried in the history parameter table, executing step S203;
if the current date accounting date parameter data is queried in the history parameter table, step S204 is performed.
Step S203:
synchronizing the parameter data to be synchronized to the database according to the parameter data to be synchronized in the parameter table corresponding to the parameter table name, and inserting the parameter data to be synchronized into a table corresponding to the database;
backing up the synchronous parameter data to the history parameter table, setting the current accounting DATE for the backed-up parameter data in the SYNC_PROCESS_DATE field of the history parameter table corresponding to the backed-up parameter data; in the history parameter table, the sync_process_date field is used for recording accounting days corresponding to the parameter data synchronized by the database.
Step S204:
and because the current-period accounting date parameter data can be queried in the history parameter table, synchronizing the current-period accounting date parameter data to the database and inserting the database into a table corresponding to the database.
Step S205:
and closing the cursor after the parameter synchronization is completed.
If there are multiple databases to be synchronized, each database may return to step S202 to perform the database parameter synchronization process.
By using the database parameter synchronization method, the consistency of parameters can be ensured under the condition that the accounting days of a plurality of database systems are different, the target database needing to synchronize the parameters can not only receive the parameters, but also maintain the current parameters into a history table according to the accounting days of the systems, and other database systems can respectively acquire the corresponding parameters according to the accounting days.
The method can perform database parameter synchronization, such as database parameter synchronization of ORACLE and GBASE, for a heterogeneous database system. Heterogeneous databases refer to a collection of related multiple database systems; heterogeneous databases may not only rely on different operating systems, but may also differ in their own architectures. In practical applications, the type of database is not limited to this, but may be used in a homogeneous database system.
In one embodiment, at the beginning of each batch of ORACLE and/or GBASE databases, it is checked whether there is current accounting date data in the history parameter table (A_HIS);
if yes, directly synchronizing the date of the current accounting date in the table A_HIS to an ORACLE and/or GBASE database;
if not, indicating that other database systems have not used the future data, synchronizing the data of the parameter table (table A), and backing up the data of table A into the history parameter table (A_HIS); after that, if other databases need to synchronize data with this period of data directly from the history parameter table (a_his); the same parameter table data is shared among a plurality of databases, and the parameter table data are not affected.
In one embodiment, the technician needs to identify the parameter table range to be synchronized and correctly configure the sync_cde_tab parameter synchronization table, and then only need to maintain the table if updated. Because the synchronization mechanism of the invention is that each database actively acquires parameter data according to accounting days and automatically maintains the parameter data in a parameter history table. Each database therefore needs to develop a parameter synchronization program to ensure that current parameters are obtained before the system is running.
It should be noted that although the operations of the method of the present invention are described in a particular order in the above embodiments and the accompanying drawings, this does not require or imply that the operations must be performed in the particular order or that all of the illustrated operations be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Having described the method of an exemplary embodiment of the present invention, a system for database parameter synchronization of an exemplary embodiment of the present invention is described next with reference to FIG. 3.
The implementation of the database parameter synchronization system can be referred to the implementation of the above method, and the repetition is not repeated. The term "module" or "unit" as used below may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Based on the same inventive concept, the invention also provides a database parameter synchronization system, as shown in fig. 3, comprising:
a parameter table setting module 310, configured to set a parameter table and a history parameter table, where parameter data to be synchronized is set in the parameter table;
the parameter data query module 320 is configured to query whether the historical parameter table has current date accounting date parameter data when the database is batched;
the parameter synchronization module 330 is configured to synchronize to the database according to the parameter data to be synchronized in the parameter table, and backup the synchronized parameter data to the history parameter table, where the current accounting date is set for the backed-up parameter data in the history parameter table, when the current accounting date parameter data is not queried in the history parameter table;
and under the condition that the current date accounting date parameter data is inquired in the history parameter table, synchronizing the current date accounting date parameter data to the database.
In an embodiment, the parameter table setting module 310 is further configured to:
creating a parameter synchronization table, configuring parameter table information to be synchronized, wherein the parameter table information comprises: parameter table name, history parameter table name, database name to be synchronized, corresponding database user name.
In one embodiment, the parameter data query module 320 is specifically configured to:
opening cursors when the database is batched; the cursor comprises a corresponding database user name and is used for reading the parameter table and the history parameter table;
and checking the database name and the database user name of the database according to the parameter synchronization table, and circularly reading a history parameter table corresponding to the history parameter table name according to the value of the cursor under the condition that the checking is passed, and inquiring whether the current accounting date parameter data exists.
In one embodiment, the parameter synchronization module 330 is specifically configured to:
under the condition that the parameter data of the current period of accounting date is not inquired in the history parameter table, synchronizing the parameter data to be synchronized to the database according to the parameter data to be synchronized in the parameter table corresponding to the parameter table name, inserting the parameter data to be synchronized into the table corresponding to the database, backing up the synchronized parameter data to the history parameter table, and setting the current period of accounting date for the backed-up parameter data in the history parameter table;
under the condition that the current date accounting date parameter data is inquired in the history parameter table, synchronizing the current date accounting date parameter data to the database, and inserting the current date accounting date parameter data into a table corresponding to the database;
and closing the cursor after the parameter synchronization is completed.
In one embodiment, the parameter synchronization module 330 is deployed on the target databases that need to be synchronized, and each database is deployed.
It should be noted that while several modules of a database parameter synchronized system are mentioned in the above detailed description, such partitioning is merely exemplary and not mandatory. Indeed, the features and functions of two or more modules described above may be embodied in one module in accordance with embodiments of the present invention. Conversely, the features and functions of one module described above may be further divided into a plurality of modules to be embodied.
Based on the foregoing inventive concept, as shown in fig. 4, the present invention further proposes a computer device 400, including a memory 410, a processor 420, and a computer program 430 stored in the memory 410 and executable on the processor 420, where the processor 420 implements the method of database parameter synchronization described above when executing the computer program 430.
Based on the foregoing inventive concept, the present invention also proposes a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method of database parameter synchronization described above.
The method and the system for synchronizing the database parameters are suitable for synchronizing the parameters of various databases, and a worker can realize synchronization among the databases by only configuring a parameter table needing synchronization, so that the operation is flexible and convenient; in the database parameter synchronization process, the current parameters can be maintained in the historical parameter tables according to the accounting days, other database systems can synchronize corresponding parameters according to the accounting days respectively, consistency of parameters among databases in each period is guaranteed, each parameter table can store historical data, and data tracing is supported.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (12)
1. A method of database parameter synchronization, the method comprising:
setting a parameter table and a history parameter table, wherein parameter data needing to be synchronized are set in the parameter table; the history parameter table is added with a date column compared with the parameter table and is used for recording accounting days corresponding to the parameter data;
when the database is batched, inquiring whether the historical parameter table has current date accounting date parameter data or not;
if the current accounting date parameter data is not queried in the history parameter table, synchronizing to the database according to the parameter data needing to be synchronized in the parameter table, backing up the synchronized parameter data to the history parameter table, and setting the current accounting date for the backed up parameter data in the history parameter table;
and if the current date accounting date parameter data is queried in the history parameter table, synchronizing the current date accounting date parameter data to the database.
2. The method of claim 1, wherein the database comprises GBASE and ORACLE databases.
3. The method of database parameter synchronization of claim 1, further comprising:
creating a parameter synchronization table, configuring parameter table information to be synchronized, wherein the parameter table information comprises: parameter table name, history parameter table name, database name to be synchronized, corresponding database user name.
4. The method of claim 3, wherein querying whether there is current date accounting date parameter data in the history parameter table when the database is batched, further comprising:
when the database is batched, opening the cursor; the cursor comprises a corresponding database user name and is used for reading the parameter table and the history parameter table;
and checking the database name and the database user name of the database according to the parameter synchronization table, and circularly reading a history parameter table corresponding to the history parameter table name according to the value of the cursor under the condition that the checking is passed, and inquiring whether the current accounting date parameter data exists.
5. The method of database parameter synchronization of claim 4, further comprising:
if the current date accounting date parameter data is not queried in the history parameter table, synchronizing the parameter data to be synchronized to the database according to the parameter data to be synchronized in the parameter table corresponding to the parameter table name, inserting the parameter data to be synchronized into a table corresponding to the database, and
backing up the synchronized parameter data to the history parameter table, and setting the current accounting date for the backed-up parameter data in the history parameter table;
if the current date accounting date parameter data is queried in the history parameter table, synchronizing the current date accounting date parameter data to the database, and inserting the current date accounting date parameter data into a table corresponding to the database;
and closing the cursor after the parameter synchronization is completed.
6. A system for database parameter synchronization, the system comprising:
the parameter table setting module is used for setting a parameter table and a history parameter table, wherein parameter data needing to be synchronized are set in the parameter table; the history parameter table is added with a date column compared with the parameter table and is used for recording accounting days corresponding to the parameter data;
the parameter data query module is used for querying whether the historical parameter table has current date accounting date parameter data or not when the database is batched;
the parameter synchronization module is used for synchronizing to the database according to the parameter data needing to be synchronized in the parameter table under the condition that the parameter data of the current period accounting date is not queried in the history parameter table, backing up the synchronized parameter data to the history parameter table, and setting the current period accounting date for the backed-up parameter data in the history parameter table;
and under the condition that the current date accounting date parameter data is inquired in the history parameter table, synchronizing the current date accounting date parameter data to the database.
7. The system for database parameter synchronization according to claim 6, wherein the database comprises GBASE and ORACLE databases.
8. The system for database parameter synchronization as recited in claim 6 wherein said parameter table setting module is further configured to:
creating a parameter synchronization table, configuring parameter table information to be synchronized, wherein the parameter table information comprises: parameter table name, history parameter table name, database name to be synchronized, corresponding database user name.
9. The system for synchronizing database parameters according to claim 8, wherein the parameter data query module is specifically configured to:
opening cursors when the database is batched; the cursor comprises a corresponding database user name and is used for reading the parameter table and the history parameter table;
and checking the database name and the database user name of the database according to the parameter synchronization table, and circularly reading a history parameter table corresponding to the history parameter table name according to the value of the cursor under the condition that the checking is passed, and inquiring whether the current accounting date parameter data exists.
10. The system for database parameter synchronization according to claim 9, wherein the parameter synchronization module is specifically configured to:
under the condition that the parameter data of the current period of accounting date is not inquired in the history parameter table, synchronizing the parameter data to be synchronized to the database according to the parameter data to be synchronized in the parameter table corresponding to the parameter table name, inserting the parameter data to be synchronized into the table corresponding to the database, backing up the synchronized parameter data to the history parameter table, and setting the current period of accounting date for the backed-up parameter data in the history parameter table;
under the condition that the current date accounting date parameter data is inquired in the history parameter table, synchronizing the current date accounting date parameter data to the database, and inserting the current date accounting date parameter data into a table corresponding to the database;
and closing the cursor after the parameter synchronization is completed.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 5 when executing the computer program.
12. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010297974.6A CN111444281B (en) | 2020-04-16 | 2020-04-16 | Database parameter synchronization method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010297974.6A CN111444281B (en) | 2020-04-16 | 2020-04-16 | Database parameter synchronization method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111444281A CN111444281A (en) | 2020-07-24 |
CN111444281B true CN111444281B (en) | 2023-05-02 |
Family
ID=71653177
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010297974.6A Active CN111444281B (en) | 2020-04-16 | 2020-04-16 | Database parameter synchronization method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111444281B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117234993B (en) * | 2023-11-15 | 2024-02-13 | 浙江禾川科技股份有限公司 | Parameter synchronization method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106708879A (en) * | 2015-11-16 | 2017-05-24 | 阿里巴巴集团控股有限公司 | Business data processing method and apparatus |
JP2018163583A (en) * | 2017-03-27 | 2018-10-18 | 株式会社オービック | Accounting data creating device, accounting data creating method, and accounting data creating program |
CN109241189A (en) * | 2018-09-10 | 2019-01-18 | 阿里巴巴集团控股有限公司 | Storage method, device and the equipment of data |
CN110163742A (en) * | 2019-04-22 | 2019-08-23 | 阿里巴巴集团控股有限公司 | A kind of account resource data determines method and system |
CN110910238A (en) * | 2019-11-21 | 2020-03-24 | 中国银行股份有限公司 | Data processing method and device for bank system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8156150B2 (en) * | 2009-06-15 | 2012-04-10 | Oracle International Corporation | Fusion general ledger |
-
2020
- 2020-04-16 CN CN202010297974.6A patent/CN111444281B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106708879A (en) * | 2015-11-16 | 2017-05-24 | 阿里巴巴集团控股有限公司 | Business data processing method and apparatus |
JP2018163583A (en) * | 2017-03-27 | 2018-10-18 | 株式会社オービック | Accounting data creating device, accounting data creating method, and accounting data creating program |
CN109241189A (en) * | 2018-09-10 | 2019-01-18 | 阿里巴巴集团控股有限公司 | Storage method, device and the equipment of data |
CN110163742A (en) * | 2019-04-22 | 2019-08-23 | 阿里巴巴集团控股有限公司 | A kind of account resource data determines method and system |
CN110910238A (en) * | 2019-11-21 | 2020-03-24 | 中国银行股份有限公司 | Data processing method and device for bank system |
Also Published As
Publication number | Publication date |
---|---|
CN111444281A (en) | 2020-07-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108228814B (en) | Data synchronization method and device | |
US9779128B2 (en) | System and method for massively parallel processing database | |
CN111046057B (en) | Data processing method, device, computer equipment and medium of server cluster | |
CN107783975A (en) | The method and apparatus of distributed data base synchronization process | |
CN110909006B (en) | Method, device, computer equipment and storage medium for data synchronization | |
US10726042B2 (en) | Replication control using eventually consistent meta-data | |
CN102880529A (en) | Memory data backup method and memory data backup system | |
CN108255909B (en) | Data table backup method and server based on Oracle database | |
CN106874281B (en) | Method and device for realizing database read-write separation | |
CN109542330B (en) | Data storage method, data query method and device | |
CN107016014A (en) | The method of data synchronization and device of heterogeneous database | |
CN106648679B (en) | Version management method for structured data | |
US9026493B1 (en) | Multi-master RDBMS improvements for distributed computing environment | |
CN102202087A (en) | Method for identifying storage equipment and system thereof | |
CN108599971A (en) | Configuring information processing method, system, computer equipment and storage medium | |
CN111444281B (en) | Database parameter synchronization method and system | |
CN104516795A (en) | Data access method and system | |
CN106201772A (en) | The backup of a kind of operating system based on data center, restoration methods and device | |
CN112434108B (en) | Database synchronization method, device and equipment | |
CN114218193A (en) | Data migration method and device, computer equipment and readable storage medium | |
CN101425078A (en) | Software source code updating method and device | |
CN112202909A (en) | Online upgrading method and system for computer storage system | |
CN104077403A (en) | Alcedo database scheduled task processing method and processing device | |
CN110196883A (en) | A kind of method of data synchronization and device on business on line without influence | |
CN114625799A (en) | Method and system for database gray scale publishing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |