[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113609232B - Data management method, data management system, and computer-readable storage medium - Google Patents

Data management method, data management system, and computer-readable storage medium Download PDF

Info

Publication number
CN113609232B
CN113609232B CN202111169314.0A CN202111169314A CN113609232B CN 113609232 B CN113609232 B CN 113609232B CN 202111169314 A CN202111169314 A CN 202111169314A CN 113609232 B CN113609232 B CN 113609232B
Authority
CN
China
Prior art keywords
production
instance
server
backup
database
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
CN202111169314.0A
Other languages
Chinese (zh)
Other versions
CN113609232A (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.)
Wuhan Barda Technology Co.,Ltd.
Original Assignee
Wuhan Sitong Information Service 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 Wuhan Sitong Information Service Co ltd filed Critical Wuhan Sitong Information Service Co ltd
Priority to CN202111169314.0A priority Critical patent/CN113609232B/en
Publication of CN113609232A publication Critical patent/CN113609232A/en
Application granted granted Critical
Publication of CN113609232B publication Critical patent/CN113609232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a data management method, a system and a storage medium, wherein the method comprises the following steps: the management server receives a first data synchronization request comprising production identification information of the production server, first backup identification information of the first backup server and instance identification information of the production database instance, sending a first initialization command to the production server via the telecommunication protocol, the production server, according to the first initialization command, first configuration information of the production database instance is acquired through the first initialization interface, and the management server acquires, according to the first configuration information, sending a second initialization command to the first backup server through a remote communication protocol, wherein the first backup server sends the second initialization command to the first backup server according to the second initialization command and the first configuration information, the first standby database instance is configured through the second initialization interface, and data in the first standby database instance and data in the production database instance are synchronized, so that the efficiency and accuracy of data management are improved.

Description

Data management method, data management system, and computer-readable storage medium
Technical Field
The application relates to the technical field of smart cities, in particular to a data management method, a data management system and a computer readable storage medium.
Background
In a scenario of primary and secondary data management of a database, such as a scenario of primary and secondary data synchronization of a database, primary and secondary data synchronization is usually implemented by manual processing in the prior art, or primary and secondary data synchronization is implemented by using a simple script and simultaneously doping with many manual processes. In the process of realizing the synchronization of the main data and the standby data in the prior art, manual processing is involved, so that the synchronization can be realized only by professional technicians, and due to the manual processing, misoperation is easy to occur, and higher data risk is realized.
Disclosure of Invention
Embodiments of the present application provide a data management method, a data management system, and a computer-readable storage medium, which can improve efficiency and accuracy of data management.
The embodiment of the application provides a data management method, which comprises the following steps:
the data management method is applied to a data management system, the data management system comprises a management server, a production server and a first backup server, the production server is in a production environment, the first backup server is in a backup environment I, and preset database proxy services are integrated in the production server and the first backup server, and the data management method comprises the following steps:
the method comprises the steps that a management server receives a first data synchronization request, the first data synchronization request is triggered through a request interface, and the first data synchronization request comprises production identification information of a production server, first backup identification information of a first backup server and example identification information of a production database example;
sending a first initialization instruction to the production server corresponding to the production identification information through a remote communication protocol;
the production server triggers a first initialization interface of a preset database proxy service in the production server according to the first initialization instruction, and acquires first configuration information of the production database instance through the first initialization interface;
when the management server receives first configuration information returned by the production server, a second initialization instruction is sent to a first backup server corresponding to the first backup identification information through a remote communication protocol according to the first configuration information;
and the first backup server triggers a second initialization interface of preset database proxy service in the first backup server according to the second initialization instruction, configures a first backup library instance through the second initialization interface according to the first configuration information, and synchronizes data in the first backup library instance with data in the production database instance.
An embodiment of the present application further provides a data management system, including: the system comprises a management server, a production server and a first backup server, wherein the production server is in a production environment, the first backup server is in a first backup environment, and preset database proxy services are integrated in the production server and the first backup server; the data management system executes the data management method.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in any data management method are implemented.
According to the embodiment of the application, the first data synchronization request is triggered through the production identification information of the production server of the request interface, the first backup identification information of the first backup server and the example identification information of the production database example, so that the first data synchronization request can be generated through simple interface input operation, complex configuration is not needed, and labor cost is reduced; after receiving the first data synchronization request, the management server automatically sends an initialization instruction to the production server and the first backup server through a remote communication protocol, so that the first backup server automatically configures a first backup library example, synchronizes data in the first backup library example with data in the production database example, and automatically executes operation among the management server, the production server and the first backup server so as to automatically synchronize data in the first backup library example with data in the production database example, thereby achieving high automation and improving efficiency and accuracy of data management (data synchronization); in addition, preset database proxy services are integrated on the production server and the first backup server, and data synchronization is realized through corresponding initialization interfaces, namely, the command set is highly packaged in the initialization interfaces, and the command set is highly packaged in an automatic mode, so that the data safety problem caused by manual misoperation is greatly reduced, and the data operation and maintenance cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic application scenario diagram of a data management method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a request interface provided by an embodiment of the present application;
FIG. 3 is a flow chart of a data management method provided in an embodiment of the present application;
FIG. 4 is a timing flow diagram illustrating a data management method according to an embodiment of the present application;
FIG. 5 is a sub-flow diagram of a data management method provided in an embodiment of the present application;
FIG. 6 is a schematic view of another sub-flow of a data management method provided in an embodiment of the present application;
FIG. 7 is a schematic view of another sub-flow of a data management method provided in an embodiment of the present application;
FIG. 8 is a schematic flow chart of a data management method according to an embodiment of the present application;
FIG. 9 is a schematic flow chart of a data management method according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a takeover interface provided by an embodiment of the present application;
fig. 11 is a schematic structural diagram of a data management system according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a data management method, a data management system and a computer readable storage medium. Any one of the data management methods provided by the embodiments of the present application may be integrated in a data management system. The data management system comprises a client, a management server, a production server and at least one backup server (such as a first backup server and/or a second backup server). The management server, the production server, the first backup server and the second backup server can be independent server individuals or server clusters.
Please refer to fig. 1, which is a schematic view of an application scenario of a data management method according to an embodiment of the present application. The application scenario is described by taking an Oracle database as an example. The Oracle database in the production server in the production environment is a main database, the Oracle database in the first backup server in the backup environment is a first backup database (or backup 1 database), and the Oracle database in the second backup server in the backup environment is a second backup database (or backup 2 database). The first backup repository and the second backup repository belong to a backup database of the primary database. In the application scenario, only one Oracle database directly faces to the user, and provides data service for the user, such as a main database in a production environment.
The management server includes relevant information of the production server in the production environment, relevant information of the first backup server in the backup environment, relevant information of the second backup server in the backup environment, relevant information of the Oracle database instance, and the like.
The production server, the first backup server and the second backup server are all integrated with preset database proxy services. Various initialization interfaces, configuration interfaces and the like are provided in the preset database proxy service so as to be called by the corresponding server. Meanwhile, remote connection services are integrated in the management server, the first backup server and the second backup server, and mutual communication among the management server, the first backup server and the second backup server is carried out through a remote communication protocol corresponding to the remote connection services. In addition, the management server, the first backup server and the second backup server correspond to the same operating system, the same type and the same version of the corresponding Oracle database instance.
In the embodiment of the present application, a small amount of user configuration is performed on a request interface (please refer to fig. 2) of a client, so as to automatically complete configuration of an Oracle database in a first backup database, configuration of an Oracle database in a second backup database, synchronization of data of the Oracle database in a production server and data of the Oracle database in the first backup database, synchronization of data of the Oracle database in the production server and data of the Oracle database in the second backup database, and the like.
It should be noted that, in the embodiment of the present application, an Oracle database is taken as an example for description, and in other embodiments, any other application may also be used.
It should be noted that the primary database, the first backup database, and the second backup database are all relative. In the embodiment of the present application, the application scenario shown in fig. 1 is first described as an example, and the production role corresponding to the master database, the first backup library role corresponding to the first backup library, and the second backup library role corresponding to the second backup library are also switched hereinafter, for which, please refer to the contents in the following text, which will not be described first.
Hereinafter, the data management method, the data management system, and the computer-readable storage medium in the embodiments of the present application will be described in detail. The numbers in the following examples are not intended to limit the order of preference of the examples.
Fig. 3 and fig. 4 are schematic flow diagrams of a data management method according to an embodiment of the present application. As shown in fig. 3, the data management method is applied to a data management system, and the data management method includes the following steps 101 to 105.
101, a management server receives a first data synchronization request, where the first data synchronization request is triggered through a request interface, and the first data synchronization request includes production identification information of a production server, first backup identification information of a first backup server, and instance identification information of a production database instance.
The production identification information of the production server comprises the name and/or the IP address of the production server, the first backup identification information comprises the name and/or the IP address of the first backup server, the production database instance refers to a database instance in a production environment, and the instance identification information of the production database instance comprises information such as the name of the production database. The hosts file can be configured in advance, and the hosts file comprises the corresponding relation between the name and the IP address of the production server and the name and the IP address of the first backup server, so that the IP address of the production server can be determined by generating the name of the server, and meanwhile, the IP address can also be determined by the name of the first backup server.
The production identification information of the production server, the first backup identification information of the first backup server, the instance identification information of the production database instance, and the like are input through a request interface, which is shown in fig. 2.
In fig. 2, in response to a configuration input operation (the input operation includes a selection operation) for the request interface, the input production identification information of the production server, the first backup identification information of the first backup server, and the instance identification information of the production database instance are determined. And generating a first data synchronization request in response to the configuration determination operation for the request interface, and sending the first data synchronization request to the management server.
Therefore, the first data request is generated and sent to the management server through a small amount of configuration input by the request interface, the requirement of technicians on the specialty is reduced through the small amount of configuration, and labor cost is reduced.
The following steps in this embodiment are performed automatically.
In an embodiment, after receiving the first data synchronization request or before sending the first initialization instruction to the production server corresponding to the production identification information, the data management method further includes step 102 a.
102a, creating/obtaining the mounting catalog according to the example identification information.
The management server is mounted using NFS (Network File System). The method comprises the steps of firstly installing an NFS server in a management server, then configuring the NFS server to add/create a mount directory and set the authority of the mount directory, and restarting the NFS server to mount the mount directory.
Wherein the mount directory is configured to hold listening configuration files of production database instances such as listener. Listening configuration files corresponding to the first library instance, such as listener. ora file, tnsname. ora file and pflie file of Oracle database, and the monitoring configuration files corresponding to the second backup library instance, such as a listener. ora file, a tnsname. ora file and a pflie file of an Oracle database, so that when the local production server fails to produce the database instance, restoring the production database instance according to the monitoring configuration file of the corresponding production database instance in the mount directory, and enabling the first backup server to restore the production database instance when the first backup database instance fails, restoring the first backup library instance according to the monitoring configuration file corresponding to the first backup library instance in the mount directory, and enabling the second backup server to restore the first backup library instance when the second backup library instance fails, and restoring the second standby library instance according to the monitoring configuration file corresponding to the second standby library instance in the mounting directory.
102, sending a first initialization instruction to a production server corresponding to the production identification information through a remote communication protocol.
The method comprises the steps of establishing a remote connection channel with a production server through a remote connection service of a management server, and sending a first initialization instruction to the production server through the remote connection channel by using a remote communication protocol, wherein the first initialization instruction comprises production identification information of the production server, an IP address of a first backup server and instance identification information of a production database instance (such as an Oracle database instance).
103, the production server triggers a first initialization interface of a preset database proxy service in the production server according to the first initialization instruction, and acquires first configuration information of the production database instance through the first initialization interface.
And the production server receives the first initialization instruction and calls a first initialization interface of the preset database proxy service. The first initialization interface of the preset database proxy service is a pre-constructed initialization interface, and is mainly used for acquiring configuration information of a production database instance, namely acquiring configuration information of the database instance in a production environment, and taking the configuration information as first configuration information, and the first configuration information is also taken as configuration information of the first backup database instance.
In an embodiment, as shown in fig. 5, the step of obtaining the first configuration information of the production database instance through the first initialization interface includes the following steps.
A ping check is performed 201 with a first backup server via a first initialization interface.
Ping checks with the first backup server are implemented using a ping command, such as ping the IP address of the first backup server. If the first backup server can ping, the first backup server can communicate with the first backup server to execute the subsequent steps; and if the ping communication is not possible, returning the corresponding prompt information of the client.
202, if ping is enabled, backing up the listening configuration file of the production database instance to the mount directory.
Monitoring configuration files such as listener.
In the process of acquiring the first configuration information of the production database instance, if the production database instance fails or is abnormal or the production database instance is damaged, the production database instance is restored according to the monitoring configuration file of the production database instance currently backed up in the mount directory, and the production database instance is restored to the state and data corresponding to the backup time.
In some embodiments, step 201 and/or step 202 may not be required.
And 203, configuring and starting a monitoring communication file of the production database instance to establish a production database connection channel.
The listening communication file refers to a listener. The monitoring communication file of the production database instance is configured and started to start a database connection string, a connection channel (production database connection channel) is established, the connection channel is a unique connection channel of the Oracle database, and who has the database connection string can connect the Oracle database in the production database instance through the connection channel.
And 204, creating a preset log file of the production database instance and setting the logging mode of the production database instance as a forced logging mode.
Wherein, the preset log file refers to a standby log. The Oracle database has a plurality of logging modes, and in this embodiment, the logging mode of the production database instance is set as forced logging.
Database identification information and a password file of the production database instance, configuration of a start initialization file of the database instance, directory information and path information of the production database instance, and a size of the fast recovery area are obtained 205.
The database identification information includes a name of the database, which is unique. The password file refers to a password file for logging in a database. The startup initialization file refers to a pfile file, which is an initialization file used when starting up the database. The configuration of the pfile for the production database instance is obtained, as create pfile ='% spri _ pfile.
The catalog information for the production database instance includes the catalog that needs to be created in the first library instance.
The path information for the production database instance includes the absolute path of the control file, the path of the fast recovery area, the mapped path value for db _ file _ name _ convert, the mapped path value for log _ file _ name _ convert, the archive log path, and the like. The size of the fast recovery area refers to size information of resources occupied by the fast recovery area.
Db _ file _ name _ convert is used for converting the file name of the new data file on the production database instance (main database) into the file name on the backup database (first backup database instance, second backup database instance), and if a data file is added to the main database, the corresponding file must be added to the backup database.
log _ file _ name _ convert, which is used to convert the file name of the new log file on the production database instance (primary database) into the file name of the log file on the backup database (first backup database instance, second backup database instance), if the log file is added to the primary database, the corresponding file must be added to the backup database.
206, obtaining the memory information of the production database instance, and determining the standby database initial memory information of the first standby database instance according to the memory information.
The MEMORY information of the production database instance includes information of MEMORY SIZEs corresponding to parameters, such as MEMORY parameter MEMORY _ TARGET (the total SIZE of MEMORY that can be used by the SGA and the PGA, and the maximum value does not exceed MEMORY _ MAX _ TARGET), SGA _ TARGET (SGA TARGET MEMORY SIZE), PGA _ AGGREGATE _ TARGET (PGA TARGET MEMORY SIZE), MEMORY _ MAX _ TARGET (the maximum value of MEMORY that can be used by the SGA and the PGA), and SGA _ MAX _ SIZE (the maximum value of SGA TARGET MEMORY), of the operating system of the production database instance.
After the memory information (the memory size of the memory parameter) corresponding to the production database instance is obtained, the initial memory information of the standby database of the first standby database instance is determined according to the memory information (the memory size of the memory parameter).
In an embodiment, the step of determining the standby database initial memory information of the first standby database instance according to the memory information includes: and calculating a first base coefficient, and determining the initial memory information of the standby database of the first standby database example according to the memory information and the first base coefficient.
Wherein, the first base coefficient can be calculated by the following formula: k1= (stand _ size-2)/pri _ size, stand _ size is the memory size of the first library instance, pri _ size is the memory size of the production database instance in GB, and 2 in the formula means 2 GB.
Determining the initial memory information of the standby database of the first standby database instance according to the memory information and the first radix coefficient, wherein the method comprises the following steps: and multiplying the memory size of each memory parameter in the memory parameters by the first base coefficient to obtain the initial memory size of the memory parameter of the first backup library instance.
207, the database identification information, the password file, the production database connection channel, the configuration of the startup initialization file, the directory information, the path information, the size of the fast recovery area, and the initial memory information of the standby database are used as the first configuration information of the production database instance/the first standby database instance.
It should be noted that, the above steps 201 to 207 are automatically completed through the first initialization interface, and are specific contents implemented by the first initialization interface. The first initialization interface not only realizes the configuration of the production database instance, but also realizes the acquisition of the first configuration information of the production database instance, and the first configuration information is also used as the configuration information of the first standby database instance.
If steps 201 to 207 are executed normally, in the executing process, the production server in the currently executed step returns to the management server, and the management server returns the currently executed step to the client to display the currently executed step on the client; and after the execution is finished, returning the first configuration information to the management server. If the execution of the steps 201 to 207 is abnormal, the reason of the abnormality is returned to the management server, and the abnormality is returned to the client through the management server for prompting.
And 104, when the management server receives the first configuration information returned by the production server, sending a second initialization instruction to the first backup server corresponding to the first backup identification information through a remote communication protocol according to the first configuration information.
And generating a second initialization instruction according to the first configuration information, the first backup identification information of the first backup server and the example identification information of the production database example, and sending the second initialization instruction to the first backup server through a remote communication protocol by the first configuration information returned by the management server production server.
And 105, the first backup server triggers a second initialization interface of the preset database proxy service in the first backup server according to the second initialization instruction, configures the first backup library instance through the second initialization interface according to the first configuration information, and synchronizes the data in the first backup library instance with the data in the production database instance.
And the first backup server receives the second initialization instruction and calls a second initialization interface of the preset database proxy service. The second initialization interface of the preset database proxy service is a pre-constructed initialization interface, and the second initialization interface is mainly used for configuring the first standby database instance according to the first configuration information and synchronizing data in the first standby database instance with data in the production database instance.
In an embodiment, as shown in fig. 6, the step of configuring the first backup library instance and synchronizing the data in the first backup library instance with the data in the production database instance through the second initialization interface according to the first configuration information includes the following steps 301 to 308.
301, ping check with the production server via the second initialization interface.
If the first standby library server can ping with the production server, the first standby library server means that the first standby library server can communicate with the production server to execute the subsequent steps; and if the ping communication is not possible, returning the corresponding prompt information of the client.
302, if ping is enabled, backup the monitoring configuration file of the first backup repository instance to the mount directory.
The monitoring configuration files of the first standby library instance, such as a listener. If the first backup library instance fails or is abnormal or is damaged in the data synchronization process, the first backup library instance is restored according to the monitoring configuration file of the corresponding first backup library instance in the mount directory, and the first backup library instance is restored to the state and the data corresponding to the backup time.
In some embodiments, step 301 and/or step 302 may not be required, and the audit directory of the first library instance may be created directly through the second initialization interface.
303, an audit trail of the first backup instance is created.
The audit directory refers to an advertisement directory, and the directory is mainly used for storing audit information of an Oracle database.
And 304, configuring and starting the monitoring communication file of the first standby library instance to establish a first standby library connection channel.
The monitoring communication file of the first backup library instance comprises a listener and tnscale file, the monitoring communication file of the first backup library instance is configured and started to start a database connection string, a connection channel is proposed, namely the first backup library connection channel, and who has the database connection string can be connected with an Oracle database in the first backup library instance through the first backup library connection channel.
And 305, synchronously producing the password file of the database instance and the password file of the first backup library instance according to the password file in the first configuration information.
And synchronizing the password files of the production database instance and the first standby database instance so that the information such as the login password of the database in the local production database instance is the same as the information such as the login password of the database in the first standby database instance.
And 306, creating a start initialization file of the first standby library instance according to the configuration of the start initialization file of the first configuration information, and starting the first standby library instance to a first start state according to the start initialization file.
Wherein the first start-up state is a momomut state.
307, synchronizing data in the first backup repository instance with data in the production database instance according to the first configuration information.
Specifically, modifying a corresponding memory parameter in the first backup library instance according to the initial memory information of the backup library to modify the size of a relevant memory of the first backup library instance; connecting a production database (master database) in the production database instance according to the production database connection channel in the first configuration information; and according to the directory information, the path information and the size of the quick recovery area, utilizing an RMan technology and a production database connecting channel to realize data backup of the production database instance so as to synchronize the data in the first backup database instance with the data in the production database.
In other embodiments, other ways of synchronizing data may also be used.
308, the first standby library instance is restarted.
The first standby library instance is restarted to validate the configuration and modification of the first standby library instance.
It should be noted that, the above steps 301 to 308 are specific contents implemented by a second initialization interface, where the second initialization interface implements both configuration of the first backup library instance and synchronization of data in the first backup library instance and data in the production database instance.
If steps 301 to 308 are performed normally, in the execution process, the first backup server in the currently executed step returns to the management server, and the management server returns the currently executed step to the client to display the currently executed step on the client; after the execution is completed, the first backup server returns a result that the second initialization is successful to the management server. If the abnormality occurs in steps 307 to 308, the cause of the abnormality is returned to the management server, and the abnormality is returned to the client through the management server for prompt.
In an embodiment, after synchronizing the data in the first backup database instance with the data in the production database instance, further configuration needs to be performed, for example, when the management server receives a result of successful second initialization returned by the first backup server, the management server controls the production server and the first backup server to configure a command line management service of the Oracle database. Correspondingly, as shown in fig. 3, the data management method further includes the following steps 106 to 109.
And 106, when the management server receives a second initialization success result returned by the first backup server, sending a first configuration instruction to the production server through a remote communication protocol.
And the management server receives a result returned by the first backup server, and when the result is a result of successful second initialization, the management server means that the first backup library instance is successfully configured and realizes synchronization of data in the first backup library instance and data in the production database instance, so that a first configuration instruction is sent to the production server through a remote communication protocol.
107, the production server configures the command line management service of the production database instance through a first configuration interface of the preset database proxy service according to the first configuration instruction.
The command line management service is a Data Guard Broker service of an Oracle database, and the command line management service for configuring the production database instance is a Data Guard Broker for configuring the production database instance.
And after receiving the first configuration instruction, the production server calls a first configuration interface of the preset database proxy service. The first configuration interface of the preset database proxy service is also a pre-constructed configuration interface, and the first configuration interface is mainly used for configuring a Data Guard Broker for producing a database instance.
In an embodiment, as shown in fig. 7, the step of configuring the command line management service of the production database instance through the first configuration interface of the preset database proxy service includes the following steps.
401, through a first configuration interface of a preset database proxy service, when data of a production database instance and data of a first standby database instance are in a synchronous state, backing up a start initialization file of the production database instance to a mount directory.
And verifying the synchronization state of the production database instance (the main database) and the first standby database through a first configuration interface of the preset database proxy service. And backing up a starting initialization file of the production database instance, such as a profile file, to the mount directory when the data of the production database instance and the data of the first backup database instance are in a synchronous state. If the data of the production database instance and the data of the first standby database instance are not in a synchronous state, the production database instance is synchronized first, and then the starting initialization file of the production database instance is backed up to the mounting directory.
And backing up the starting initialization file of the production database instance to the mounting directory, so that if the production database fails or is abnormal or the production database instance is damaged in the process of configuring the production database instance, the production database instance is recovered according to the monitoring configuration file (including the starting initialization file) of the corresponding production database instance stored in the mounting directory, and the production database instance is recovered to the corresponding state and data at the backup time.
In some embodiments, step 402 may be directly performed by presetting the first configuration interface of the database proxy service while the data of the production database instance and the first backup database instance are in a synchronized state.
402, the flashback function of the production database instance and the first backup library instance is turned on to turn on the configuration of the command line management service.
Turning on the flash back function is equivalent to turning on the switch, and the Data Guard breaker can be configured after the switch is turned on. Or it may be understood that the observer process may be created only if the flashback function is turned on. In the embodiment of the application, the production database instance and the first standby database instance both need to start a flashback function.
And 403, creating management configuration files of the command line management service of the production database instance and the first standby library instance, and opening the management configuration of the production database instance and the first standby library instance.
Both the production database instance and the first library instance need to create a Data Guard Broker management profile for writing the corresponding configuration information, as will be described below. Both the production database instance and the first backup database instance need to open a management configuration, i.e. a configuration of opening a Data Guard Broker, which is equivalent to opening the eyes of the viewer process.
The production database instance establishes 404 a connection channel with the command line management service of the first backup database instance.
This step is to connect both the connection channel of the production database instance and the connection channel of the first library instance to the Data Guard Broker so that various configuration information can be transmitted to the production database instance and the first library instance.
And 405, writing configuration information of a command line management service in the management configuration file, wherein the configuration information of the command line management service comprises a connection channel between the production database instance and the first standby library instance, a database synchronization mode, an application opening state, a failover target of the production database instance, a failover target of the first standby library instance, a failure threshold value and an open fast failover.
And writing the established connection channel between the production database instance and the first standby database instance into the corresponding management configuration file. Setting the mode of the database as a synchronous mode, and writing the synchronous mode into a configuration file; setting an application state as an open state, and setting state = application-ON, and writing the application open state into a management configuration file; setting a fault transfer target of the production database instance as a first standby database instance, setting the fault transfer target of the first standby database instance as the production database instance, setting a fault threshold time as 30s, starting rapid fault transfer, and writing the setting information into corresponding management configuration files. Where the failure threshold time of 30s, it can be understood that the failure time exceeds 30s, an automatic failover is triggered.
Step 401 to step 405 implement configuring Data Guard Broker of Oracle database, and step 405 of step 401 is the specific content implemented by the first configuration interface, which implements the configuration of Data Guard Broker of Oracle Data.
If the steps 401 to 405 are executed normally, in the execution process, the production server in the currently executed step returns to the management server, and the management server returns the currently executed step to the client to display the currently executed step on the client; after the execution is completed, the production server returns a result that the first configuration is successful to the management server. And if the execution from the step 401 to the step 401 is abnormal, returning the reason of the abnormality to the management server, and returning the reason to the client through the management server for prompting.
And 108, when the management server receives a first configuration success result returned by the production server, sending a second configuration instruction to the first backup server through the remote communication protocol.
And the management server receives the result returned by the production server, and when the result is the result that the first configuration is successful, which means that the Data Guard Broker is successfully configured, the management server sends a second configuration instruction to the first backup server through the remote communication protocol.
And 109, the first backup server configures and starts the monitoring communication file of the first backup library instance, starts the observer process of the first backup library instance, and closes the automatic failover of the first backup library instance through a second configuration interface of the preset database proxy service according to the second configuration instruction.
And after receiving the second configuration instruction, the production server calls a second configuration interface of the preset database proxy service. The second configuration interface of the preset database proxy service is also a pre-constructed configuration interface, and the second configuration interface configures and starts a monitoring communication file of the first standby library instance, such as a listener.
And after the second configuration interface is executed, the first standby library server sends a result of successful second configuration to the management server, and if the second configuration interface is executed abnormally, the abnormal reason is returned to the management server and returned to the client through the management server for prompting.
And 110, the management server receives the result of the second configuration returned by the first backup server. The result of the second configuration includes a successful result and an abnormal result, and the result of the second configuration is sent to the client.
In the embodiment of the method, in the process of executing each step from step 101 to step 110, the management server sends the currently executed step to the client, so as to display the currently executed step on the interface corresponding to the client, so as to remind the user of the currently executed step, thereby improving the user experience.
In the embodiment of the method, after receiving the first Data synchronization request, the management server automatically sends the initialization instruction and the configuration instruction to the production server and the first backup server through the remote communication protocol, so that the first backup server automatically configures the first backup instance, synchronizes the Data in the first backup instance with the Data in the production database instance, and automatically configures the command line management service (Data Guard Broker of the Oracle database) of the production server and the first backup server, i.e., automatically executes operations between the management server, the production server and the first backup server, so as to automatically synchronize the Data in the first backup instance with the Data in the production database instance. Such high automation improves the efficiency and accuracy of data management (data synchronization). In addition, preset database proxy service is integrated on the production server and the first backup server, Data synchronization is achieved through the corresponding initialization interface, and Data Guard Broker configuration is achieved through the corresponding configuration interface.
The steps of the method automatically realize the configuration and Data synchronization between the production database instance (main database) and the first standby database and the configuration of the Data Guard Broker.
In an embodiment, if the Oracle database includes a second backup database in addition to the main database and the first backup database, and a server corresponding to the second backup database is a second backup server, as shown in fig. 8, the data management method provided in the embodiment of the present application further includes the following steps 601 to 607.
601, the management server receives a second data synchronization request, where the second data synchronization request is triggered through a request interface, the second data synchronization request includes production identification information of the production server, second backup identification information of the second backup server, and instance identification information of the production database instance, and a preset database agent is integrated in the second backup server.
Wherein the request interface may be as described above. And the client is used for responding to the configuration input operation (the input operation comprises a selection operation) aiming at the request interface, and determining the input production identification information of the production server, the second backup identification information of the second backup server and the instance identification information of the production database instance. And generating a second data synchronization request in response to the configuration determination operation for the request interface, and sending the second data synchronization request to the management server.
And 602, sending a third initialization instruction to the production server corresponding to the production identification information through a remote communication protocol.
603, the production server triggers a third initialization interface of the preset database proxy service in the production server according to the third initialization instruction, and obtains second configuration information of the production database instance through the third initialization interface.
And the production server receives the third initialization instruction and calls a third initialization interface of the preset database proxy service. The third initialization interface is mainly used for acquiring configuration information of a production database instance, that is, acquiring configuration information of the database instance in a production environment, and using the configuration information as second configuration information, where the second configuration information is also used as configuration information of a second backup database instance. The third initialization interface initializes the production server for the second backup server.
The main steps implemented by the third initialization interface are different from those implemented by the first initialization interface in that: ping check is carried out with a second backup server through a third initialization interface, and a host file of the corresponding relation between the name and the IP address of the second backup server and the name and the IP address of the production server is required to be configured under the condition that ping can be carried out; and secondly, when the memory information of the production database instance is obtained and the initial memory information of the spare database of the second spare database instance is determined according to the memory information, the corresponding calculation modes of the second base coefficient are different. Wherein, the second base coefficient can be calculated by the following formula: k1= (stand _ size)/pri _ size.
Other steps of the third initialization interface implementation are consistent with other steps of the first initialization interface implementation, and only the first configuration information in the step corresponding to the first initialization interface is modified into the second configuration information, the first backup library instance is modified into the second backup library instance, and the first backup server is modified into the second backup server.
604, when the management server receives the second configuration information returned by the production server, according to the second configuration information, a fourth initialization instruction is sent to the second backup server corresponding to the second backup identification information through the remote communication protocol.
605, the second backup server triggers a fourth initialization interface of the preset database proxy service in the second backup server according to the fourth initialization instruction, configures the second backup library instance through the fourth initialization interface according to the second configuration information, and synchronizes the data in the second backup library instance with the data in the production database instance.
And the second backup server receives the fourth initialization instruction and calls a fourth initialization interface of the preset database proxy service. The fourth initialization interface is mainly used for configuring the second standby library instance according to the second configuration information and synchronizing data in the second standby library instance with data in the production database instance.
The main steps implemented by the fourth initialization interface are different from those implemented by the second initialization interface in that: after restarting the second backup library instance, modifying the relevant configuration of the first backup library instance according to the second backup library instance, for example, adding the name of the second backup library instance to the configuration information in the first backup library instance to inform the first backup library instance that the second backup library instance has been added.
Other steps of the implementation of the fourth initialization interface are consistent with other steps of the implementation of the second initialization interface, and only the first configuration information in the step corresponding to the second initialization interface is modified into the second configuration information, the first backup library instance is modified into the second backup library instance, and the first backup server is modified into the second backup server.
And 606, when the management server receives a result of successful fourth initialization returned by the second backup server, sending a third configuration instruction to the production server through the remote communication protocol.
607, the production server configures the command line management service of the second backup library instance through a third configuration interface of the preset database proxy service according to the third configuration instruction.
In an embodiment, the step of configuring the command line management service of the second library-ready instance through a third configuration interface of the preset database proxy service includes: through a third configuration interface of the preset database proxy service, when the data of a production database instance (a main database) and a second standby database instance (a second standby database) are in a synchronous state, backing up a starting initialization file of the production database instance to a mounting directory; starting a flash back function of the second standby library example to start the configuration of the command line management service; creating a management configuration file of the command line management service of the second standby library instance; the production database instance establishes a connection channel with the command line management service of the second backup instance; stopping the observer process; closing the failover configuration; starting the management configuration of the second standby library instance; and writing configuration information of the command line management service in the management configuration file, wherein the configuration information of the command line management service comprises a connection channel between the production database instance and the second standby database instance, a database synchronization mode, an application opening state, a fault transfer target of the production database instance, a fault transfer target of the second standby database instance, a fault threshold value, disconnection fault transfer and the like.
The reason for stopping the observer process and closing the failover configuration is to prevent the production server from automatically switching, and if the production server is not closed, the production database instance is likely to have little network fluctuation, and the production role corresponding to the production database instance is automatically switched to the standby role, or the standby role is switched to the production role, and the like.
Setting a fault transfer target of the production database instance as a second standby database instance, and setting the fault transfer target of the second standby database instance as the production database instance; if the disconnection fault transfer time is set to be 120s, the fact that the disconnection time of the second standby library exceeds 120s means that the main database corresponding to the second standby library is automatically switched to the first standby library.
The embodiment realizes the configuration of the second standby library example, the Data synchronization of the production database and the second standby library and the configuration of the Data Guard Broker of the second standby library example; or it may be understood that a master-slave configuration and data synchronization is implemented in this embodiment. The command set is highly encapsulated in the initialization interface and the configuration interface when one-master-multi-standby configuration and data synchronization are realized, and the command set is highly encapsulated in a highly automated mode, so that the data safety problem caused by manual misoperation is greatly reduced, and the data operation and maintenance cost is reduced.
It should be noted that, in the above steps, when the management server receives the returned corresponding result, the corresponding state and record data are saved.
In the process of providing services by the Oracle database, there may be situations such as disconnection or failure of the master database, the first backup database, and the second backup database, and therefore, it is necessary to switch the production role corresponding to the master database, the first backup database role corresponding to the first backup database, and the second backup database role corresponding to the second backup database, so as to provide data services of the normal Oracle database.
In an embodiment, as shown in fig. 9, the data management method further includes the following steps 701 to 705.
701, displaying a production role corresponding to the production database instance, a standby library role corresponding to the standby library instance, and a takeover state of the production role and the standby library role on a takeover interface of the client.
The backup library role corresponds to at least one backup library, for example, the backup library role comprises a first backup library, a second backup library and the like.
The production role, the standby role and the corresponding takeover state on the takeover interface are shown in fig. 10, the primary database/production database corresponds to the "primary" and is the production role, the standby database corresponds to the "standby" and is the standby role. For example, in fig. 10, the currently uppermost one of the standby database roles is a first standby database role corresponding to the "first standby database instance", that is, the taking standby database corresponding to the current primary database is the first standby database. The takeover state between the primary database and the first standby database is a normally takeover state.
A switch request is generated in response to a switch operation for an instance on the takeover interface 702.
In fig. 10, the instance switching operation may be an operation of clicking/touching a switch instance icon or the like, the instance switching operation triggers a switch instance icon (double-headed arrow) on the takeover interface, and the switching request is generated in response to the instance switching operation on the takeover interface. And generating a switching request according to the currently displayed production role and the standby library role on the takeover interface.
703, the management server receives the switching request, calls a first switching interface according to the switching request, and obtains the real takeover states of the production database instance and the standby database instance through the first switching interface.
The method comprises the steps of obtaining the takeover states of a production database instance and a standby database instance which are currently stored in a management server, and taking the takeover states as real takeover states.
And 704, when the real takeover state meets the instance switching condition, executing a switching instruction through the first switching interface.
Wherein, the parameter in the switch instruction can indicate the switch direction, such as dgmgrl sys/% s @% s "+" \\\ switchover to% s \ ". For example, the parameter input before and the parameter input after the switchover to indicate that the role corresponding to the parameter input before is switched to the role corresponding to the parameter input after.
705, the command line management service is called through the switching instruction, so that the role of the standby library corresponding to the standby library instance is switched to the production role and the production role corresponding to the production database instance is switched to the corresponding standby library role according to the command line management service.
And when the example is switched, the command line management service configured in the foregoing is called according to the switching instruction to realize the switching.
If the production role and the first standby library role are displayed on the current takeover interface, the switching request is used for requesting to switch the production role and the first standby library role, after the execution is finished, the production database (main database) is changed into the first standby library, the first standby library is changed into the production database, and the second standby library is not changed. The example switching of this case is referred to as a double-cut example.
If the production role and the second standby library role are displayed on the current takeover interface, the switching request is used for requesting to switch the production role and the second standby library role, after the execution is finished, the production database (the main database) is changed into the second standby library, the second standby library is changed into the production database, and the first standby library is not changed. The example switching of this case is referred to as a double-cut example.
If the production database instance fails and the role of the first standby database is displayed on the takeover interface, the switching request is used for singly switching (failure switching) the instance, specifically, the production database (main database) is changed into the first standby database, the first standby database is changed into the main database, and the second standby database is kept unchanged; the actual production database instance does not make any changes (because it has failed).
If the production database instance fails and the role of the second standby database is displayed on the takeover interface, the switching request is used for singly switching (failure switching) the instance, specifically, the production database (main database) is changed into the second standby database, the second standby database is changed into the main database, and the first standby database is kept unchanged; the actual production database instance does not make any changes (because it has failed).
Fig. 11 is a schematic structural diagram of a data management system according to an embodiment of the present application. The data management system comprises a client, a management server, a production server and at least one backup server, such as a first backup server. The production server is in a production environment and the first backup server is in a first backup environment. The management server, the production server and the first backup server are all integrated with remote connection services, and the production server and the first backup server are integrated with preset database proxy services.
And the client is used for responding to the configuration input operation (the input operation comprises a selection operation) aiming at the request interface, and determining the input production identification information of the production server, the first backup identification information of the first backup server and the instance identification information of the production database instance. Responding to configuration determination operation aiming at a request interface, generating a first data synchronization request, and sending the first data synchronization request to a management server;
the management server is used for receiving the first data synchronization request and sending a first initialization instruction to the production server corresponding to the production identification information through a remote communication protocol;
the production server is used for triggering a first initialization interface of a preset database proxy service in the production server according to the first initialization instruction, and acquiring first configuration information of a production database instance through the first initialization interface;
the management server is further used for sending a second initialization instruction to the first backup server corresponding to the first backup identification information through a remote communication protocol according to the first configuration information when receiving the first configuration information returned by the production server;
and the first backup server is used for triggering a second initialization interface of the preset database proxy service in the first backup server according to the second initialization instruction, configuring the first backup library instance through the second initialization interface according to the first configuration information, and synchronizing the data in the first backup library instance with the data in the production database instance.
In an embodiment, the database is an Oracle database, and the management server is further configured to send a first configuration instruction to the production server through a remote communication protocol when receiving a second initialization success result returned by the first backup server; the production server is also used for configuring command line management service of the production database instance through a first configuration interface of the preset database proxy service according to the first configuration instruction; the management server is also used for sending a second configuration instruction to the first backup server through a remote communication protocol when receiving a first configuration success result returned by the production server; the first backup server is also used for configuring and starting a monitoring communication file of the first backup library instance, starting an observer process of the first backup library instance and closing automatic failover of the first backup library instance through a second configuration interface of the preset database proxy service according to a second configuration instruction; and the management server is also used for receiving a second configuration result returned by the first backup server and sending the second configuration result to the client.
In an embodiment, the management server, before sending the first initialization instruction to the production server corresponding to the production identification information, is further configured to create/obtain the mount directory according to the instance identification.
In an embodiment, when the production server executes the step of obtaining the first configuration information of the production database instance through the first initialization interface, the following is specifically implemented: performing ping check with a first backup server through a first initialization interface; when the ping can be started, backing up the monitoring configuration file of the production database instance to a mounting directory; configuring and starting a monitoring communication file of a production database instance to establish a production database connection channel; creating a preset log file of a production database instance and setting a log recording mode of the production database instance as a forced log recording mode; acquiring database identification information and a password file of a production database instance, configuration of a starting initialization file of the database instance, directory information and path information of the production database instance and the size of a quick recovery area; acquiring memory information of a production database instance, and determining standby database initial memory information of the first standby database instance according to the memory information; and taking the database identification information, the password file, the production database connecting channel, the configuration of the starting initialization file, the directory information, the path information, the size of the quick recovery area and the initial memory information of the standby database as the first configuration information of the production database instance/the first standby database instance.
In an embodiment, when executing the step of configuring, by the second initialization interface, the first backup server according to the first configuration information and synchronizing the data in the first backup library instance with the data in the production database instance, the first backup server specifically executes: performing ping check with the production server through a second initialization interface; if the first backup library instance can be ping-connected, backing up the monitoring configuration file of the first backup library instance to a mounting directory; creating an audit directory of a first standby library instance; configuring and starting a monitoring communication file of a first standby library example to establish a first standby library connecting channel; synchronously producing the password files of the database instance and the first standby database instance according to the password files in the first configuration information; establishing a starting initialization file of the first standby library instance according to the configuration of the starting initialization file of the first configuration information, and starting the first standby library instance to a first starting state according to the starting initialization file; according to the first configuration information, synchronizing data in the first standby database instance with data in the production database instance; the first standby library instance is restarted.
In an embodiment, when executing the step of configuring the command line management service of the production database instance through the first configuration interface of the preset database proxy service, the production server specifically executes: through a first configuration interface of a preset database proxy service, when the data of a production database instance and the data of a first standby database instance are in a synchronous state, backing up a starting initialization file of the production database instance to a mounting directory; starting the flash back function of the production database instance and the first standby database instance to start the configuration of the command line management service; creating a management configuration file of command line management service of the production database instance and the first standby library instance, and starting the management configuration of the production database instance and the first standby library instance; the production database instance establishes a connection channel with the command line management service of the first standby database instance; and writing configuration information of the command line management service in the management configuration file, wherein the configuration information of the command line management service comprises a connection channel between the production database instance and the first standby database instance, a database synchronization mode, an application opening state, a fault transfer target of the production database instance, a fault transfer target of the first standby database instance, a fault threshold value and starting rapid fault transfer.
In one embodiment, as shown in FIG. 11, the backup server includes a first backup server and a second backup server. The management server, the production server, the first backup server and the second backup server are all integrated with remote connection services, and the production server, the first backup server and the second backup server are all integrated with preset database proxy services.
The management server is also used for receiving a second data synchronization request, the second data synchronization request is triggered through a request interface, the second data synchronization request comprises production identification information of the production server, second backup identification information of the second backup server and instance identification information of a production database instance, and a preset database agent program is integrated in the second backup server;
the management server is also used for sending a third initialization instruction to the production server corresponding to the production identification information through a remote communication protocol;
the production server is further used for triggering a third initialization interface of the preset database proxy service in the production server according to the third initialization instruction, and acquiring second configuration information of the production database instance through the third initialization interface;
the management server is further used for sending a fourth initialization instruction to a second backup server corresponding to the second backup identification information through a remote communication protocol according to the second configuration information when receiving the second configuration information returned by the production server;
and the second backup server is used for triggering a fourth initialization interface of the preset database proxy service in the second backup server according to the fourth initialization instruction, configuring a second backup library instance through the fourth initialization interface according to the second configuration information, and synchronizing the data in the second backup library instance with the data in the production database instance.
The management server is further used for sending a third configuration instruction to the production server through a remote communication protocol when a fourth initialization success result returned by the second backup server is received;
and the production server is also used for configuring the command line management service of the second standby library instance through a third configuration interface of the preset database proxy service according to the third configuration instruction.
In an embodiment, the client is configured to display, on the takeover interface, a production role corresponding to the production database instance, a standby role corresponding to the standby instance, and takeover states of the production role and the standby role; generating a switching request in response to an instance switching operation on the takeover interface;
the management server is also used for receiving the switching request, calling a first switching interface according to the switching request and acquiring the real takeover states of the production database instance and the standby database instance through the first switching interface; when the real takeover state meets the instance switching condition, executing a switching instruction through a first switching interface; and calling the command line management service through the switching instruction so as to switch the role of the standby library corresponding to the standby library example into a production role and switch the production role corresponding to the production database example into the corresponding standby library role according to the command line management service.
In specific implementation, each server may be an independent server or a server cluster. The specific implementation process of the server and the achieved beneficial effects may refer to the corresponding description in the foregoing method embodiments, and are not described herein again for convenience and brevity of description.
It is noted that each of the servers described above may include one or more processors of the processing core, one or more memories of the computer readable storage medium, a power supply, radio frequency circuitry, and the like. In this embodiment, the processor in each server loads the executable file corresponding to the thread of one or more application programs into the memory according to the following instructions, and the processor runs the application programs stored in the memory, thereby implementing the functions that can be performed by each server.
The data management system formed by the server combinations can implement the steps in any embodiment of the data management method provided in the embodiment of the present application, and therefore, the beneficial effects that can be achieved by any data management method provided in the embodiment of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions (computer programs) which are stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the instructions (computer programs). To this end, an embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps of any embodiment of the data management method provided in the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any data management method embodiment provided in the embodiments of the present invention, beneficial effects that can be achieved by any data management method provided in the embodiments of the present invention may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The data management method, the data management system, and the computer-readable storage medium provided in the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principles and implementations of the present application, and the description of the above embodiments is only used to help understand the method and the core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A data management method is characterized in that the data management method is applied to a data management system, the data management system comprises a management server, a production server and a first backup server, the production server is in a production environment, the first backup server is in a backup environment I, and a preset database proxy service is integrated in both the production server and the first backup server, the data management method comprises the following steps:
the method comprises the steps that a management server receives a first data synchronization request, the first data synchronization request is triggered through a request interface, and the first data synchronization request comprises production identification information of a production server, first backup identification information of a first backup server and example identification information of a production database example;
sending a first initialization instruction to the production server corresponding to the production identification information through a remote communication protocol;
the production server triggers a first initialization interface of a preset database proxy service in the production server according to the first initialization instruction, and acquires first configuration information of the production database instance through the first initialization interface;
when the management server receives first configuration information returned by the production server, a second initialization instruction is sent to a first backup server corresponding to the first backup identification information through a remote communication protocol according to the first configuration information;
and the first backup server triggers a second initialization interface of preset database proxy service in the first backup server according to the second initialization instruction, configures a first backup library instance through the second initialization interface according to the first configuration information, and synchronizes data in the first backup library instance with data in the production database instance.
2. The data management method of claim 1, wherein the production database instance is an oracle database instance, the data management method further comprising:
when the management server receives a second initialization success result returned by the first backup server, a first configuration instruction is sent to the production server through a remote communication protocol;
the production server configures command line management service of the production database instance through a first configuration interface of the preset database proxy service according to the first configuration instruction;
when the management server receives a first configuration success result returned by the production server, a second configuration instruction is sent to the first backup server through a remote communication protocol;
and the first backup server configures and starts a monitoring communication file of the first backup library instance, opens an observer process of the first backup library instance and closes an automatic failover function of the first backup library instance through a second configuration interface of the preset database proxy service according to the second configuration instruction.
3. The data management method according to claim 1, before the sending the first initialization instruction to the production server corresponding to the production identification information through the remote communication protocol, further comprising: creating/obtaining a mount directory according to the instance identification information, wherein the mount directory is configured to backup a monitoring configuration file of the production database instance and a monitoring configuration file corresponding to the first standby database instance, so that the production server recovers the production database instance according to the monitoring configuration file of the production database instance corresponding to the mount directory if the production database instance fails in the process of obtaining the first configuration information of the production database instance; and if the first backup server fails in the process of data synchronization, restoring the first backup library instance according to the monitoring configuration file corresponding to the first backup library instance in the mount directory.
4. The data management method of claim 1, wherein the step of obtaining the first configuration information of the production database instance through the first initialization interface comprises:
configuring and starting a monitoring communication file of the production database instance through the first initialization interface to establish a production database connection channel;
creating a preset log file of the production database instance and setting a log recording mode of the production database instance as a forced log recording mode;
acquiring database identification information and a password file of the production database instance, starting configuration of an initialization file, directory information and path information of the production database instance, and the size of a quick recovery area;
acquiring memory information of the production database instance, and determining standby database initial memory information of the first standby database instance according to the memory information;
and taking the database identification information, the password file, the production database connecting channel, the configuration of the startup initialization file, the directory information, the path information, the size of the fast recovery area and the initial memory information of the standby database as the first configuration information of the production database instance.
5. The data management method according to claim 1, wherein the step of configuring a first backup repository instance and synchronizing data in the first backup repository instance with data in the production database instance through the second initialization interface according to the first configuration information comprises:
creating an audit directory of the first standby library instance through the second initialization interface;
configuring and starting a monitoring communication file of the first standby library instance to establish a first standby library connection channel;
synchronizing the password files of the production database instance and the first standby database instance according to the password files in the first configuration information;
creating a starting initialization file of the first standby library instance according to the configuration of the starting initialization file of the first configuration information, and starting the first standby library instance to a first starting state according to the starting initialization file;
according to the first configuration information, synchronizing data in the first standby database instance with data in the production database instance;
restarting the first backup library instance.
6. The data management method of claim 2, wherein the step of configuring the command line management service for the production database instance comprises:
when the data of the production database instance and the first standby library instance are in a synchronous state, starting a flash back function of the production database instance and the first standby library instance so as to start the configuration of the command line management service;
creating a management configuration file of a command line management service of the production database instance and the first standby database instance;
establishing a connection between the production database instance and the command line management service of the first standby database instance;
and writing configuration information of a command line management service into the management configuration file, wherein the configuration information of the command line management service comprises a connection channel between the production database instance and the first standby library instance, a mode of the database instance, an application opening state, a fault transfer target of the production database instance, a fault transfer target of the first standby library instance, a fault threshold value and starting rapid fault transfer.
7. The data management method of claim 1, further comprising:
the management server receives a second data synchronization request, the second data synchronization request is triggered through a request interface, the second data synchronization request comprises production identification information of a production server, second backup identification information of a second backup server and instance identification information of a production database instance, and a preset database agent program is integrated in the second backup server;
sending a third initialization instruction to the production server corresponding to the production identification information through a remote communication protocol;
the production server triggers a third initialization interface of a preset database proxy service in the production server according to the third initialization instruction, and acquires second configuration information of the production database instance through the third initialization interface;
when the management server receives second configuration information returned by the production server, according to the second configuration information, a fourth initialization instruction is sent to a second backup server corresponding to the second backup identification information through a remote communication protocol;
and the second backup server triggers a fourth initialization interface of preset database proxy service in the second backup server according to the fourth initialization instruction, configures a second backup database instance through the fourth initialization interface according to the second configuration information, and synchronizes data in the second backup database instance with data in the production database instance.
8. The data management method of claim 1, further comprising:
displaying a production role corresponding to the production database instance, a standby library role corresponding to the first standby library instance and a takeover state of the production role and the standby library role on a takeover interface of a client, wherein the standby library role comprises the first standby library role;
generating a switching request in response to an instance switching operation on the takeover interface;
the management server receives the switching request, calls a first switching interface according to the switching request, and obtains the real takeover state of the production database instance and the standby database instance through the first switching interface, wherein the standby database instance comprises a first standby database instance;
when the real takeover state meets an example switching condition, executing a switching instruction through the first switching interface;
and calling a command line management service through a switching instruction so as to switch the standby library role corresponding to the standby library instance into a production role and switch the production role corresponding to the production database instance into the standby library role according to the command line management service.
9. A data management system, comprising a management server, a production server and a first backup server, wherein the production server is in a production environment, the first backup server is in a first backup environment, and a predetermined database proxy service is integrated in each of the production server and the first backup server, and the data management system performs the data management method according to any one of claims 1 to 8.
10. 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 steps in the data management method of any of the preceding claims 1 to 8.
CN202111169314.0A 2021-10-08 2021-10-08 Data management method, data management system, and computer-readable storage medium Active CN113609232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111169314.0A CN113609232B (en) 2021-10-08 2021-10-08 Data management method, data management system, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111169314.0A CN113609232B (en) 2021-10-08 2021-10-08 Data management method, data management system, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN113609232A CN113609232A (en) 2021-11-05
CN113609232B true CN113609232B (en) 2021-12-03

Family

ID=78310796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111169314.0A Active CN113609232B (en) 2021-10-08 2021-10-08 Data management method, data management system, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN113609232B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775624A (en) * 2022-03-10 2023-09-19 国能智深控制技术有限公司 Coal preparation plant data management method and system
CN114722050B (en) * 2022-06-10 2022-09-30 辰星(天津)自动化设备有限公司 Data synchronization method of robot system and robot system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038591A (en) * 2007-04-11 2007-09-19 华为技术有限公司 Method and system for synchronizing data base
CN102467508A (en) * 2010-11-04 2012-05-23 中兴通讯股份有限公司 Method for providing database service and database system
CN106161629A (en) * 2016-07-13 2016-11-23 广州新博庭网络信息科技股份有限公司 The method of a kind of business object synchronization, client and server
CN106713487A (en) * 2017-01-16 2017-05-24 腾讯科技(深圳)有限公司 Data synchronization method and device
CN110825772A (en) * 2019-10-28 2020-02-21 爱钱进(北京)信息科技有限公司 Method and device for synchronizing memory data of multiple service instances and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10228962B2 (en) * 2015-12-09 2019-03-12 Commvault Systems, Inc. Live synchronization and management of virtual machines across computing and virtualization platforms and using live synchronization to support disaster recovery

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038591A (en) * 2007-04-11 2007-09-19 华为技术有限公司 Method and system for synchronizing data base
CN102467508A (en) * 2010-11-04 2012-05-23 中兴通讯股份有限公司 Method for providing database service and database system
CN106161629A (en) * 2016-07-13 2016-11-23 广州新博庭网络信息科技股份有限公司 The method of a kind of business object synchronization, client and server
CN106713487A (en) * 2017-01-16 2017-05-24 腾讯科技(深圳)有限公司 Data synchronization method and device
CN110825772A (en) * 2019-10-28 2020-02-21 爱钱进(北京)信息科技有限公司 Method and device for synchronizing memory data of multiple service instances and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Peer-to-Peer Data Synchronization Agents;Sylvain Kubler等;《Proceedings of the 2014 IEEE/WIC/ACM International Joint Conferences on Web Intelligence(WI) and Intelligent Agent Technologies(IAT)》;20140831;第32-39页 *
基于图数据库的大规模配置管理数据库关联查询;戴声等;《计算机与现代化》;20170112;第51-56页 *

Also Published As

Publication number Publication date
CN113609232A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
US10895996B2 (en) Data synchronization method, system, and apparatus using a work log for synchronizing data greater than a threshold value
US11397647B2 (en) Hot backup system, hot backup method, and computer device
CN113609232B (en) Data management method, data management system, and computer-readable storage medium
WO2022037359A1 (en) Configuration data access method, apparatus, and device, configuration center, and storage medium
CN103200036B (en) A kind of automation collocation method of electric power system cloud computing platform
WO2017215502A1 (en) Cloud-desktop disaster recovery method, client, server, cloud-desktop disaster recovery system, and storage medium
WO2024120227A1 (en) Container data protection system, method and apparatus, and device and readable storage medium
CN112202853B (en) Data synchronization method, system, computer device and storage medium
CN112380062A (en) Method and system for rapidly recovering system for multiple times based on system backup point
CN105554130A (en) Distributed storage system-based NameNode switching method and switching device
CN106452836B (en) main node setting method and device
WO2012155630A1 (en) Method, device, and system for disaster recovery
CN110069365B (en) Method for managing database and corresponding device, computer readable storage medium
CN104717077A (en) Data center management method, device and system
CN114840495A (en) Database cluster split-brain prevention method, storage medium and device
CN109739685A (en) A kind of principal and subordinate's hot backup data synchronous method and storage medium
CN111966530A (en) Disaster recovery switching method and device for application system, computer equipment and storage medium
CN105323271B (en) Cloud computing system and processing method and device thereof
CN116996369B (en) Containerized management server, main and standby management method and device thereof, and storage medium
CN112073499A (en) Dynamic service method of multi-machine type cloud physical server
CN115550424B (en) Data caching method, device, equipment and storage medium
CN103780433B (en) Self-healing type virtual resource configuration management data architecture
CN116414915A (en) Distributed database cluster management and control method and device and database management and control platform
CN116521356A (en) Method and device for building maven private library high availability based on Nexus
CN114826584B (en) Method, system and terminal for maintaining Slurm HA state data file

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data management method, data management system and computer readable storage medium

Effective date of registration: 20220628

Granted publication date: 20211203

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: Wuhan Sitong Information Service Co.,Ltd.

Registration number: Y2022420000200

PE01 Entry into force of the registration of the contract for pledge of patent right
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 430070 No. 1, 2 and 10, floors 1-3, building A7, Rongke Zhigu industrial project phase I, No. 555, Wenhua Avenue, Hongshan District, Wuhan City, Hubei Province

Patentee after: Wuhan Barda Technology Co.,Ltd.

Address before: 430070 No. 1, 2 and 10, floors 1-3, building A7, Rongke Zhigu industrial project phase I, No. 555, Wenhua Avenue, Hongshan District, Wuhan City, Hubei Province

Patentee before: Wuhan Sitong Information Service Co.,Ltd.

PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230625

Granted publication date: 20211203

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: Wuhan Sitong Information Service Co.,Ltd.

Registration number: Y2022420000200

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data management methods, data management systems, and computer-readable storage media

Effective date of registration: 20230627

Granted publication date: 20211203

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: Wuhan Barda Technology Co.,Ltd.

Registration number: Y2023420000262

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20211203

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: Wuhan Barda Technology Co.,Ltd.

Registration number: Y2023420000262

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data management methods, data management systems, and computer-readable storage media

Granted publication date: 20211203

Pledgee: Guanggu Branch of Wuhan Rural Commercial Bank Co.,Ltd.

Pledgor: Wuhan Barda Technology Co.,Ltd.

Registration number: Y2024980007424

PE01 Entry into force of the registration of the contract for pledge of patent right