CN109597709B - Method for breakpoint resume of Oracle Dataguard creation process - Google Patents

Method for breakpoint resume of Oracle Dataguard creation process Download PDF

Info

Publication number
CN109597709B
CN109597709B CN201811359314.5A CN201811359314A CN109597709B CN 109597709 B CN109597709 B CN 109597709B CN 201811359314 A CN201811359314 A CN 201811359314A CN 109597709 B CN109597709 B CN 109597709B
Authority
CN
China
Prior art keywords
change
library
field
dataguard
range
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
CN201811359314.5A
Other languages
Chinese (zh)
Other versions
CN109597709A (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.)
Hangzhou Woqu Technology Co ltd
Original Assignee
Hangzhou Woqu Technology 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 Hangzhou Woqu Technology Co ltd filed Critical Hangzhou Woqu Technology Co ltd
Priority to CN201811359314.5A priority Critical patent/CN109597709B/en
Publication of CN109597709A publication Critical patent/CN109597709A/en
Application granted granted Critical
Publication of CN109597709B publication Critical patent/CN109597709B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Abstract

The invention provides a method for establishing a Dataguard by Oracle database breakpoint retransmission, aiming at the problem that once the Oracle database is interrupted, the Dataguard cannot be continuously transmitted. The invention has the creativity that the defects of an Oracle database are made up, and in the long process of creating the Dataguard, if errors occur, synchronous data does not need to be restarted, and only differential data need to be synchronized, so that the characteristic of breakpoint continuous transmission is realized. The invention greatly reduces the time consumption in the process of creating the Dataguard and reduces the waiting time of technicians.

Description

Method for breakpoint resume in Oracle Dataguard creation process
Technical Field
The invention relates to an Oracles database, which is used for enhancing the process of creating the Dataguard by Oracle native, making up the defect that errors in the midway need to be restarted, and particularly relates to a method for breakpoint resume in the process of creating the Oracle Dataguard.
Background
Oracle Dataguard technology is a way to create an Oracle backup database that is natively supported by the Oracle database.
During the creation of the Dataguard, oracle provides a simple operation mode, and realizes the simplification operation of operations such as synchronous control files, data files, filing files and the like during the creation.
When errors occur in the network, storage, database and other layers, the Dataguard creation process is terminated, and the native creation command cannot realize the function of breakpoint transmission. Since the Oracle database size may be large, up to 30TB or even over 100TB, the time cost for re-creation is very high in case of error.
Disclosure of Invention
Aiming at the defect that errors occur in the middle of the process of creating the Dataguard by Oracle native in the prior art and the data uard needs to be restarted, the invention provides a method for creating the Dataguard by breakpoint resume of an Oracle database, when the method for creating the Dataguard by Oracle native is used, the breakpoint resume can be realized by using the method, and the method for restarting the native process is replaced, and the method comprises the following steps;
(1) And comparing whether the data files of the current main database (hereinafter referred to as the main database) and the backup database (hereinafter referred to as the backup database) are consistent. If the two signals are consistent, going to the step (2), and if the two signals are not consistent, going to the step (3);
(2) And acquiring the minimum FIRST _ CHANGE # field value and the maximum NEXT _ CHANGE # field value in all continuous archival logs of the primary library, namely the range of the continuous archival logs, and comparing the minimum FIRST _ CHANGE # field value and the maximum NEXT _ CHANGE # field value with the CHECKPOINT _ CHANGE # field of all data files in the V $ DATAFILE view in the backup library. If the record with the CHECKOINT _ CHANGE # field smaller than the range of the primary library filing log exists, going to (3), and if not, going to (4);
(3) And exporting the control file of the main library to the standby library to cover the original old file of the standby library. Updating the information of the transmitted data file to the control file;
(4) The minimum FIRST _ CHANGE # field value and the maximum NEXT _ CHANGE # field value in all continuous archive logs of the primary library, namely the range of the continuous archive logs, are obtained and compared with the check key _ CHANGE # field of all data files in the V $ database _ HEADER view in the backup library. If the record with the CHECKPOINT _ CHANGE # field smaller than the range of the primary library filing log exists; go to (5), otherwise go to (6);
(5) According to the information obtained in the step (4), retransmitting the data file indicated by the record with the CHECKPOINT _ CHANGE # field smaller than the filing log range of the main library, and updating the information to the control file;
(6) Performing log archiving once on all the instances of the master library, and recording the value of the FIRST _ CHANGE # field of the newly generated archiving log;
(7) Transmitting the difference filing log to a standby library according to the minimum CHECKPoint _ CHANGE # field value in the V $ DATAFILE view and the V $ DATAFILE _ HEADER view;
(8) Executing a RECOVER operation in the standby library, and designating to restore to the value of the FIRST _ CHANGE # field recorded in the step (6);
(9) At this time, the standby library can successfully execute the OPEN operation, the Dataguard is successfully created, and the whole process is finished.
Due to the adoption of the technical scheme, the invention has the remarkable technical effects that: through breakpoint retransmission, the data transmitted before the interruption of the creation process can be multiplexed without retransmission, and the time cost for creating the Oracle Dataguard is greatly reduced.
Drawings
Fig. 1 is a flow chart of a method for creating Dataguard by breakpoint resuming of an Oracle database.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Example 1
As shown in fig. 1, a method for creating Dataguard by breakpoint resuming of Oracle database includes the following steps:
(1) And comparing whether the data files of the current main database (hereinafter referred to as the main database) and the backup database (hereinafter referred to as the backup database) are consistent. If the two signals are consistent, going to the step (2), and if the two signals are not consistent, going to the step (3);
(2) And acquiring the minimum FIRST _ CHANGE # field value and the maximum NEXT _ CHANGE # field value in all continuous archival logs of the primary library, namely the range of the continuous archival logs, and comparing the minimum FIRST _ CHANGE # field value and the maximum NEXT _ CHANGE # field value with the CHECKPOINT _ CHANGE # field of all data files in the V $ DATAFILE view in the backup library. If the record with the CHECKOINT _ CHANGE # field smaller than the range of the primary library filing log exists, going to (3), and if not, going to (4);
(3) And exporting the control file of the main library to the standby library to cover the original old file of the standby library. Updating the information of the transmitted data file to the control file;
(4) The minimum FIRST _ CHANGE # field value and the maximum NEXT _ CHANGE # field value in all continuous archive logs of the primary library, namely the range of the continuous archive logs, are obtained and compared with the check key _ CHANGE # field of all data files in the V $ database _ HEADER view in the backup library. If the record with the CHECKPOINT _ CHANGE # field smaller than the range of the primary library filing log exists; go to (5), otherwise go to (6);
(5) According to the information obtained in the step (4), retransmitting the data file indicated by the record with the CHECKPOINT _ CHANGE # field smaller than the filing log range of the main library, and updating the information to the control file;
(6) Performing log archiving once on all the instances of the master library, and recording the value of the FIRST _ CHANGE # field of the newly generated archiving log;
(7) Transmitting the difference filing log to a standby library according to the minimum CHECKPoint _ CHANGE # field value in the V $ DATAFILE view and the V $ DATAFILE _ HEADER view;
(8) Executing a RECOVER operation in the standby library, and designating to restore to the value of the FIRST _ CHANGE # field recorded in the step (6);
(9) At this time, the standby library can successfully execute the OPEN operation, the Dataguard is successfully created, and the whole process is finished.
Due to the adoption of the technical scheme, the invention has the remarkable technical effects that: through breakpoint retransmission, the data transmitted before the interruption of the creation process can be multiplexed without retransmission, and the time cost for creating the Oracle Dataguard is greatly reduced.
In summary, the above is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in the claims of the present invention should be covered by the claims of the present invention.

Claims (2)

1. A method for creating Dataguard by breakpoint resuming of Oracle database, comprising: comprises the following steps;
(1) Comparing whether the number of data files is consistent or not in the current main database, the main database for short, and the backup database, the backup database for short; if the two signals are consistent, going to the step (2), and if the two signals are not consistent, going to the step (3);
(2) Acquiring a minimum FIRST _ CHANGE # field value and a maximum NEXT _ CHANGE # field value in all continuous archiving logs of a primary library, namely a range of the continuous archiving logs, and comparing the range with the check key _ CHANGE # fields of all data files in a V $ DATAFILE view in a secondary library; if the record with the CHECKOINT _ CHANGE # field smaller than the range of the primary library filing log exists, going to (3), and if not, going to (4);
(3) Exporting the control file of the main library to the standby library, and covering the original old file of the standby library; updating the information of the transmitted data file to the control file;
(4) Acquiring the minimum FIRST _ CHANGE # field value and the maximum NEXT _ CHANGE # field value in all continuous archiving logs of a main library, namely the range of the continuous archiving logs, and comparing the range with the CHECKPOINT _ CHANGE # field of all data files in the V $ DATAFILE _ HEADER view in the backup library; if the record with the CHECKPoint _ CHANGE # field smaller than the range of the primary library filing log exists; go to (5), otherwise go to (6);
(5) According to the information obtained in the step (4), retransmitting the data file indicated by the record with the CHECKPOINT _ CHANGE # field smaller than the filing log range of the main library, and updating the information to the control file;
(6) Performing log archiving once on all the instances of the master library, and recording the value of the FIRST _ CHANGE # field of the newly generated archiving log;
(7) Transmitting the difference filing log to a standby library according to the minimum CHECKPoint _ CHANGE # field value in the V $ DATAFILE view and the V $ DATAFILE _ HEADER view;
(8) Executing a RECOVER operation in the standby library, and designating to restore to the value of the FIRST _ CHANGE # field recorded in the step (6);
(9) The OPEN operation is successfully performed by the standby library, and the Dataguard is successfully created.
2. The method for Oracle database breakpoint resumption creation of Dataguard as claimed in claim 1, wherein: and realizing breakpoint continuous transmission through synchronous difference data.
CN201811359314.5A 2018-11-15 2018-11-15 Method for breakpoint resume of Oracle Dataguard creation process Active CN109597709B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811359314.5A CN109597709B (en) 2018-11-15 2018-11-15 Method for breakpoint resume of Oracle Dataguard creation process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811359314.5A CN109597709B (en) 2018-11-15 2018-11-15 Method for breakpoint resume of Oracle Dataguard creation process

Publications (2)

Publication Number Publication Date
CN109597709A CN109597709A (en) 2019-04-09
CN109597709B true CN109597709B (en) 2023-01-10

Family

ID=65958515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811359314.5A Active CN109597709B (en) 2018-11-15 2018-11-15 Method for breakpoint resume of Oracle Dataguard creation process

Country Status (1)

Country Link
CN (1) CN109597709B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515573B (en) * 2021-05-08 2023-01-17 上海英方软件股份有限公司 Method and system for one-to-many negotiation replication breakpoint of ORACLE database
CN115129739B (en) * 2022-08-31 2022-11-25 杭州沃趣科技股份有限公司 Data file breakpoint continuous transmission method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9406564D0 (en) * 1994-03-31 1994-05-25 Int Computers Ltd Database management system
US6658589B1 (en) * 1999-12-20 2003-12-02 Emc Corporation System and method for backup a parallel server data storage system
CN105975579A (en) * 2016-05-05 2016-09-28 北京思特奇信息技术股份有限公司 Primary and backup copying method of memory database and memory database system
CN106933843A (en) * 2015-12-29 2017-07-07 阿里巴巴集团控股有限公司 database heartbeat detecting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9406564D0 (en) * 1994-03-31 1994-05-25 Int Computers Ltd Database management system
US6658589B1 (en) * 1999-12-20 2003-12-02 Emc Corporation System and method for backup a parallel server data storage system
CN106933843A (en) * 2015-12-29 2017-07-07 阿里巴巴集团控股有限公司 database heartbeat detecting method and device
CN105975579A (en) * 2016-05-05 2016-09-28 北京思特奇信息技术股份有限公司 Primary and backup copying method of memory database and memory database system

Also Published As

Publication number Publication date
CN109597709A (en) 2019-04-09

Similar Documents

Publication Publication Date Title
US7043504B1 (en) System and method for parallel primary and secondary backup reading in recovery of multiple shared database data sets
US6993537B2 (en) Data recovery system
CN107145403B (en) Relational database data backtracking method oriented to Web development environment
US7634679B2 (en) Remote location failover server application
US8341460B2 (en) Verification of computer backup data
KR100825720B1 (en) File management method in file system and metadata server for the same
US6594676B1 (en) System and method for recovery of multiple shared database data sets using multiple change accumulation data sets as inputs
CN106776121B (en) Data disaster recovery device, system and method
US20180329630A1 (en) Data synchronization method and system, and synchronization obtaining method and apparatus
WO2018153251A1 (en) Method for processing snapshots and distributed block storage system
WO2018098972A1 (en) Log recovery method, storage device and storage node
US7801867B2 (en) Optimizing backup and recovery utilizing change tracking
US20140059003A1 (en) Automated migration to a new target volume via merged bitmaps to maintain consistency
CN109597709B (en) Method for breakpoint resume of Oracle Dataguard creation process
CN103914359A (en) Data recovery method and device
CN104217174A (en) Safety storage system and safety storage method for distributed files
CN109766218A (en) Data back up method based on distributed storage
CN108829813A (en) A kind of File Snapshot method and system based on distributed memory system
CN116955355A (en) Block data processing method and device and electronic equipment
CN109587202B (en) Method, device and system for coprocessing between file verification and data processing
JP2005293469A (en) System and method for data copy
JPWO2006049202A1 (en) Data multiplexing system
CN113239005B (en) I and IV area data synchronization method and device for power monitoring system
CN112925676B (en) WAL-based method for realizing recovery of distributed database cluster at any time point
CN108874592B (en) Data cold standby method and system for Log-structured storage engine

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