CN105446824B - Table increment acquisition methods and long-distance data backup method - Google Patents

Table increment acquisition methods and long-distance data backup method Download PDF

Info

Publication number
CN105446824B
CN105446824B CN201410232700.3A CN201410232700A CN105446824B CN 105446824 B CN105446824 B CN 105446824B CN 201410232700 A CN201410232700 A CN 201410232700A CN 105446824 B CN105446824 B CN 105446824B
Authority
CN
China
Prior art keywords
increment
new data
object table
timing node
recorded
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
Application number
CN201410232700.3A
Other languages
Chinese (zh)
Other versions
CN105446824A (en
Inventor
何俊
陈加胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuxi China Resources Microelectronics Co Ltd
Original Assignee
Wuxi China Resources Microelectronics Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuxi China Resources Microelectronics Co Ltd filed Critical Wuxi China Resources Microelectronics Co Ltd
Priority to CN201410232700.3A priority Critical patent/CN105446824B/en
Publication of CN105446824A publication Critical patent/CN105446824A/en
Application granted granted Critical
Publication of CN105446824B publication Critical patent/CN105446824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses a kind of table increment acquisition methods, includes the following steps: based on SAP platform, establishes the access and operation to oracle database via SAP data dictionary;Before renewal time node, the object table of oracle database is read into interior table;After renewal time node, the object table of oracle database is read into interior table;According to the major key of object table, analysis comparison is carried out to the object table before and after renewal time node in memory, obtains table increment.A kind of long-distance data backup method based on the table increment acquisition methods is also disclosed.Above-mentioned table increment acquisition methods and long-distance data backup method all have faster processing speed.

Description

Table increment acquisition methods and long-distance data backup method
Technical field
The present invention relates to data base administration, more particularly to a kind of table increment acquisition methods and a kind of long-distance data backup Method.
Background technique
Database is almost the important component that current manufacturing enterprise is used to manage creation data, for large-scale manufacturing enterprise It says, the data volume in database is very big, requires to devote a tremendous amount of time when backing up it.And when each point of enterprise When branch mechanism is dispersed in different areas, mutual data will be consistent, and can only be transmitted by network.
Under current network condition, when data volume reaches T grades (1T=1,000G=1,000,000M), network transmission It is relatively time consuming and unstable.Therefore, in order to improve efficiency, the variance data between database is only transmitted, including increase, modify and delete The data removed.
The type of database generally comprises SQL Server, Oarcle and DB2 etc., and wherein Oarcle uses more wide It is general.Oarcle database itself is with the tool for obtaining data increment, but the mode that Oarcle itself obtains data increment needs Server more cpu performance and magnetic disc i/o are sacrificed, server overall performance is reduced.Such as generate the table increment of millions It needs several hours even one day, is unable to satisfy the needs of practical application.
Summary of the invention
Based on this, it is necessary to provide a kind of table increment acquisition methods, can be improved the speed of acquisition table increment.
In addition, also providing a kind of method of long-distance data backup, the speed of long-distance data backup can be improved.
A kind of table increment acquisition methods, include the following steps:
Based on SAP platform, the access and operation to oracle database are established via SAP data dictionary;
Before renewal time node, the object table of oracle database is read into interior table;
After renewal time node, the object table of oracle database is read into interior table;
According to the major key of object table, analysis comparison is carried out to the object table before and after renewal time node in memory, is obtained Table increment.
The renewal time node is promoted by the fixed cycle in one of the embodiments, two targets for comparing The time span of table is not more than the fixed cycle.
The fixed cycle is 24 hours in one of the embodiments,.
The step of acquisition table increment includes: in one of the embodiments,
It is defined in the object table after renewal time node and exists and do not have in the object table before renewal time node Be recorded as the first kind record;
Exist and do not have in the object table after renewal time node in object table before being defined on renewal time node Be recorded as the second class record;
Exist in the object table before object table and renewal time node after definition renewal time node with identical Major key but content it is differentiated be recorded as third class record;
Compare the object table before and after renewal time node:
The first kind records if it exists, then the first kind is recorded in table increment and is added to newly-increased record;
The second class records if it exists, then second class is recorded in table increment and is added to deletion record;
Third class records if it exists, then the third class is recorded in table increment and is added to modification record.
A kind of long-distance data backup method, includes the following steps:
Destination server is sent by the initial table in the oracle database of source server;
It obtains the table increment of source server and is sent to destination server;
Destination server generates backup table according to initial table and table increment;
Wherein, the method for the table increment for obtaining source server includes the following steps:
Based on SAP platform, the access and operation to oracle database are established via SAP data dictionary;
Before renewal time node, the object table of oracle database is read into interior table;
After renewal time node, the object table of oracle database is read into interior table;
According to the major key of object table, analysis comparison is carried out to the object table before and after renewal time node in memory, is obtained Table increment.
The renewal time node is promoted by the fixed cycle in one of the embodiments, two targets for comparing The time span of table is not more than the fixed cycle.
The fixed cycle is 24 hours in one of the embodiments,.
The step of acquisition table increment includes: in one of the embodiments,
It is defined in the object table after renewal time node and exists and do not have in the object table before renewal time node Be recorded as the first kind record;
Exist and do not have in the object table after renewal time node in object table before being defined on renewal time node Be recorded as the second class record;
Exist in the object table before object table and renewal time node after definition renewal time node with identical Major key but content it is differentiated be recorded as third class record;
Compare the object table before and after renewal time node:
The first kind records if it exists, then the first kind is recorded in table increment and is added to newly-increased record;
The second class records if it exists, then second class is recorded in table increment and is added to deletion record;
Third class records if it exists, then the third class is recorded in table increment and is added to modification record.
Source server sends initial table and table increment to destination server using FTP in one of the embodiments,.
The method of above-mentioned acquisition table increment, using the interior table technology of SAP platform, tables of data can be read in memory into Row compares, and for the processing mode for needing to occupy cpu resource and magnetic disc i/o compared to oracle database, fast speed is right The tables of data of millions, the time for comparing object table and acquisition table increment only need a few minutes.
Above-mentioned long-distance data backup method is based on the table increment acquisition methods, it may have faster backup rate.
Detailed description of the invention
Fig. 1 is the table increment acquisition methods flow chart of an embodiment;
Fig. 2 is the long-distance data backup method flow diagram of an embodiment;
Fig. 3 is the data acquisition of the backup method of Fig. 2 and flows to schematic diagram.
Specific embodiment
As shown in Figure 1, being the table increment acquisition methods flow chart of an embodiment.This method comprises the following steps.
Step S101: being based on SAP platform, establishes the access and operation to oracle database via SAP data dictionary. SAP platform (Systems, Application and Products in Data processing), refers to SAP commercial affairs set Part, R/3 system therein provide a whole set of business measure in a modular fashion, in company or corporate strategy and use On management.The system itself is the general system an of standard, can be provided by configuring for different industries different Solution, while also providing based on ABAP (Advanced Business Application Programming) language A set of developing instrument.The SAP platform of the present embodiment is to be carried out based on the R/3 system in the business suite using ABAP language Required function is completed in secondary development.The present embodiment is mainly for oracle database.SAP platform can by SAP data dictionary Establish the access and operation to oracle database.
Step S102: before renewal time node, the object table of oracle database is read into interior table.Interior table is A kind of technology of ABAP programming language, it is similar with the structural body in general programming language, it is temporarily to be created in program operation A memory space, it be one may include a plurality of record tables of data.Therefore table resides in memory in.Renewal time Node refers to the time point of more new data, timed events can be arranged in a program usually to trigger and update operation.Object table is Tables of data to be processed.
Step S103: after renewal time node, the object table of oracle database is read into interior table.
By step S102 and step S103, the object table before and after renewal time node is all stored in interior table.
Step S104: according to the major key of object table, the object table before and after renewal time node is analyzed in memory Compare, obtains table increment.Major key be in tables of data one data of unique identification record data item, generally can using number come Mark.Two identical records are not present in tables of data, but some possible projects are identical, in order to distinguish two different numbers According to record, one data record is identified using major key.It is appreciated that two targets before and after comparing renewal time node When whether table changes, same data record can be found by the comparison of major key, then judge that other data item are It is no to change.
Specifically, in this step S104, the step of acquisition table increment, includes:
It is defined in the object table after renewal time node and exists and do not have in the object table before renewal time node Be recorded as the first kind record;
Exist and do not have in the object table after renewal time node in object table before being defined on renewal time node Be recorded as the second class record;
Exist in the object table before object table and renewal time node after definition renewal time node with identical Major key but content it is differentiated be recorded as third class record;
Compare the object table before and after renewal time node:
The first kind records if it exists, then the first kind is recorded in table increment and is added to newly-increased record;
The second class records if it exists, then second class is recorded in table increment and is added to deletion record;
Third class records if it exists, then the third class is recorded in table increment and is added to modification record.
In the present embodiment, the renewal time node is promoted by the fixed cycle, the time of two object tables for comparing Span is not more than the fixed cycle.For example, the fixed cycle is 24 hours, namely data are completed in front and back at the same time daily Update.According to the significance level or real-time levels of backup information, which can be adjusted.
The method of above-mentioned acquisition table increment, using the interior table technology of SAP platform, tables of data can be read in memory into Row compares, and for the processing mode for needing to occupy cpu resource and magnetic disc i/o compared to oracle database, fast speed is right The tables of data of millions, the time for comparing object table and acquisition table increment only need a few minutes.
With reference to Fig. 2, the method for acquisition table increment based on the above embodiment can also realize a kind of long-distance data backup side Method, this method comprises the following steps.
Step S201: destination server is sent by the initial table in the oracle database of source server.Source server It is in strange land with destination server, data is transmitted between each other and passes through network transmission.Initial table is the initial stage in building database When initial content, the quantity of data record will not be very much.Therefore it can be transmitted by network.
Step S202: it obtains the table increment of source server and is sent to destination server.The tables of data of millions, table increase For tables of data itself, magnitude also very little can also be transmitted amount by network.
Step S203: destination server generates backup table according to initial table and table increment.Table increment is included in initial table Increased record, the record deleted and the record of modification.Accordingly increased in initial table, modify and delete operation i.e. Nearest backup table can be obtained.
With reference to Fig. 3, the SAP server as source server obtain daily newest tables of data and with the tables of data of the previous day It is compared, obtains current table increment, the data warehouse as destination server is then transferred to by ftp server, number One day table increment is differed according to the data between warehouse and source server.
Using the above method, long-distance data backup can be quickly carried out.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (9)

1. a kind of table increment acquisition methods, include the following steps:
Based on SAP platform, the access and operation to oracle database are established via SAP data dictionary;
Before the timing node of more new data, the object table of oracle database is read using the interior table technology of SAP platform Interior table into memory;
After the timing node of more new data, the object table of oracle database is read using the interior table technology of SAP platform Interior table into memory;
According to the major key of object table, analysis ratio is carried out to the object table before and after the timing node of more new data in the memory Compared with acquisition table increment.
2. table increment acquisition methods according to claim 1, which is characterized in that the timing node of the more new data is by solid Fixed cycle promotes, and the time span of two object tables for comparing is not more than the fixed cycle.
3. table increment acquisition methods according to claim 2, which is characterized in that the fixed cycle is 24 hours.
4. table increment acquisition methods according to claim 1, which is characterized in that the step of acquisition table increment includes:
It is defined in the object table after the timing node of more new data and exists and do not have in the object table before renewal time node Some is recorded as first kind record;
Exist and do not have in the object table after renewal time node in object table before being defined on the timing node of more new data Some is recorded as the second class record;
Exist in object table after the timing node of definition more new data and the object table before the timing node of more new data With identical major key but the differentiated third class that is recorded as of content records;
Compare the object table before and after the timing node of more new data:
The first kind records if it exists, then the first kind is recorded in table increment and is added to newly-increased record;
The second class records if it exists, then second class is recorded in table increment and is added to deletion record;
Third class records if it exists, then the third class is recorded in table increment and is added to modification record.
5. a kind of long-distance data backup method, includes the following steps:
Destination server is sent by the initial table in the oracle database of source server;
It obtains the table increment of source server and is sent to destination server;
Destination server generates backup table according to initial table and table increment;
Wherein, the method for the table increment for obtaining source server includes the following steps:
Based on SAP platform, the access and operation to oracle database are established via SAP data dictionary;
Before the timing node of more new data, the object table of oracle database is read using the interior table technology of SAP platform Interior table into memory;
After the timing node of more new data, the object table of oracle database is read using the interior table technology of SAP platform Interior table into memory;
According to the major key of object table, analysis ratio is carried out to the object table before and after the timing node of more new data in the memory Compared with acquisition table increment.
6. long-distance data backup method according to claim 5, which is characterized in that the timing node of the more new data is pressed Fixed cycle promotes, and the time span of two object tables for comparing is not more than the fixed cycle.
7. long-distance data backup method according to claim 6, which is characterized in that the fixed cycle is 24 hours.
8. long-distance data backup method according to claim 5, which is characterized in that the step of acquisition table increment wraps It includes:
It is defined in the object table after the timing node of more new data and exists and do not have in the object table before renewal time node Some is recorded as first kind record;
Exist and do not have in the object table after renewal time node in object table before being defined on the timing node of more new data Some is recorded as the second class record;
Exist in object table after the timing node of definition more new data and the object table before the timing node of more new data With identical major key but the differentiated third class that is recorded as of content records;
Compare the object table before and after the timing node of more new data:
The first kind records if it exists, then the first kind is recorded in table increment and is added to newly-increased record;
The second class records if it exists, then second class is recorded in table increment and is added to deletion record;
Third class records if it exists, then the third class is recorded in table increment and is added to modification record.
9. long-distance data backup method according to claim 5, which is characterized in that source server is taken using FTP to target Business device sends initial table and table increment.
CN201410232700.3A 2014-05-28 2014-05-28 Table increment acquisition methods and long-distance data backup method Active CN105446824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410232700.3A CN105446824B (en) 2014-05-28 2014-05-28 Table increment acquisition methods and long-distance data backup method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410232700.3A CN105446824B (en) 2014-05-28 2014-05-28 Table increment acquisition methods and long-distance data backup method

Publications (2)

Publication Number Publication Date
CN105446824A CN105446824A (en) 2016-03-30
CN105446824B true CN105446824B (en) 2019-11-05

Family

ID=55557059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410232700.3A Active CN105446824B (en) 2014-05-28 2014-05-28 Table increment acquisition methods and long-distance data backup method

Country Status (1)

Country Link
CN (1) CN105446824B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009046A (en) * 2017-11-21 2018-05-08 广州慧睿思通信息科技有限公司 A kind of method of ORACLE data remote backup
CN110389954A (en) * 2019-06-20 2019-10-29 平安普惠企业管理有限公司 A kind of form automatic generation method and relevant device based on software supervision
CN110602168B (en) * 2019-08-13 2022-03-01 平安科技(深圳)有限公司 Data synchronization method and device, computer equipment and storage medium
CN112988458B (en) * 2019-12-18 2023-04-07 中国移动通信集团四川有限公司 Data backup method and device, electronic equipment and storage medium
CN112115121B (en) * 2020-11-20 2023-12-12 陕西云基华海信息技术有限公司 Real-time data quality detection system for data management

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193938A (en) * 2010-03-01 2011-09-21 深圳市金蝶中间件有限公司 Method and device for acquiring incremental data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8825601B2 (en) * 2010-02-01 2014-09-02 Microsoft Corporation Logical data backup and rollback using incremental capture in a distributed database
US20130085995A1 (en) * 2011-09-29 2013-04-04 International Business Machines Corporation Managing back up operations for data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193938A (en) * 2010-03-01 2011-09-21 深圳市金蝶中间件有限公司 Method and device for acquiring incremental data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"ABAP程序执行效率优化的研究";蒋文文;《2011中国石油石化企业信息化技术交流会》;20110921;第1-5页 *

Also Published As

Publication number Publication date
CN105446824A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN109460349B (en) Test case generation method and device based on log
US11341139B2 (en) Incremental and collocated redistribution for expansion of online shared nothing database
CN110908997B (en) Data blood relationship construction method and device, server and readable storage medium
CN105446824B (en) Table increment acquisition methods and long-distance data backup method
JP7200259B2 (en) Data retention handling for data object stores
CN102202073B (en) Distributed system and data synchronization method thereof
US8688622B2 (en) Methods and systems for loading data into a temporal data warehouse
US9356966B2 (en) System and method to provide management of test data at various lifecycle stages
US9436734B2 (en) Relative performance prediction of a replacement database management system (DBMS)
CN104899295B (en) A kind of heterogeneous data source data relation analysis method
CN106815326B (en) System and method for detecting consistency of data table without main key
US9679021B2 (en) Parallel transactional-statistics collection for improving operation of a DBMS optimizer module
CN102129478A (en) Database synchronization method and system thereof
US20140143284A1 (en) Zero downtime schema evolution
CN104423960A (en) Continuous project integration method and continuous project integration system
CN105550270B (en) Data base query method and device
CN105100050A (en) User permission management method and system
CN110598413B (en) Method, system and equipment for maintaining rules of anti-attack platform
Wibowo Problems and available solutions on the stage of extract, transform, and loading in near real-time data warehousing (a literature study)
CN105373631A (en) SQLSever-based automatic upgrading method for database structure
CN109634975B (en) Data synchronization method and device, electronic equipment and computer readable storage medium
Atmaja et al. Implementation of change data capture in ETL process for data warehouse using HDFS and apache spark
US20160179866A1 (en) Method and system to search logs that contain a massive number of entries
CN103577746A (en) XML configuration-based detection method for authorization difference between information systems
CN110245148B (en) Data storage method, device, system and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant