CN112860296B - Oracle database replication method and device and electronic equipment - Google Patents

Oracle database replication method and device and electronic equipment Download PDF

Info

Publication number
CN112860296B
CN112860296B CN202110352512.4A CN202110352512A CN112860296B CN 112860296 B CN112860296 B CN 112860296B CN 202110352512 A CN202110352512 A CN 202110352512A CN 112860296 B CN112860296 B CN 112860296B
Authority
CN
China
Prior art keywords
user
database
statement
table space
oracle
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
CN202110352512.4A
Other languages
Chinese (zh)
Other versions
CN112860296A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110352512.4A priority Critical patent/CN112860296B/en
Publication of CN112860296A publication Critical patent/CN112860296A/en
Application granted granted Critical
Publication of CN112860296B publication Critical patent/CN112860296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The invention provides an Oracle database replication method and device and electronic equipment, wherein the method comprises the following steps: obtaining a mirror image backup of a created user statement, a user authorized statement and a user-defined table space derived from a source database; creating a user according to the user creating statement; recovering a user-defined table space according to the mirror backup; importing user authority information according to the user authority statement to realize configured database replication, wherein for an implementer, the operation steps are simple, only database software needs to be installed, and the subsequent execution can be carried out by means of configuration; the advantages of TTS and database replication are combined, the complicated operation steps of the TTS and the limitation that the database replication technology cannot replicate across versions are simplified, the operation is simple, the functions are powerful, and the Oracle database is updated.

Description

Oracle database replication method and device and electronic equipment
Technical Field
The present invention relates to the field of database technologies, and in particular, to a method and an apparatus for replication of an Oracle database, and an electronic device.
Background
There are two existing Oracle upgrade replication modes:
1. data pump technology export and import
The principle of the data pump technology leading-in is as follows: exporting the data of the source database into a dmp file, and then transmitting the dmp file to the target server and importing the dmp file. The whole process has simple operation steps, and fixed sentences are used for export and import. However, if the data amount is relatively large, it is very time-consuming, so the data pump technique is only applicable to cases where the data amount is less than 500G.
TTS (transmissible tablespace)
The principle of TTS (transmissible table space) is: in the Oracle database, path information of a table space is defined in a control file, and metadata information in the table space is stored in a system table space. These small amounts of metadata information are imported into the target database by exporting the metadata information for a small table space in the source database. The operation steps are complex, and the requirement on specialized knowledge is high.
The two methods are existing Oracle upgrading methods, and are applicable to upgrading of Oracle low versions to high versions. In addition, for the case of the same version of previous migration and consistent operating system, the Oracle also provides a database replication technology (duplicate), and the target database only needs to install Oracle software and then make some simple configurations, and only needs to execute one command to replicate the whole source database to the target database by connecting the source database and the target database through the rman. The copying process is not needed to participate, and the copying process can be directly used without being repeated after the copying process is completed. But only for replication between the same server, same database version.
Disclosure of Invention
In view of the problems in the prior art, the present invention provides an Oracle database replication method and apparatus, an electronic device, and a computer readable storage medium, which can at least partially solve the problems in the prior art.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
in a first aspect, there is provided an Oracle database replication method, including:
obtaining a mirror image backup of a created user statement, a user authorized statement and a user-defined table space derived from a source database;
creating a user according to the user creating statement;
recovering a user-defined table space according to the mirror backup;
and importing user authority information according to the user authority statement.
Further, the Oracle database replication method further comprises the following steps:
and setting the recovered user-defined table space as read-write, and sending an instruction for setting the user-defined table space in the source database as read-write to the source database.
Further, the Oracle database replication method further comprises the following steps:
acquiring information of a source database;
accessing the source database according to the information of the source database to inquire the instance name, the memory size, the data block size, the connection maximum number, the database character set and the connection mode of the source database as installation parameters;
and inquiring the baseline version parameters, and installing a database by combining the installation parameters.
Further, the baseline version parameters include: SYSTEM table space size, undo table space size, temporary table space size, SYSAUX table space size, number of redo log groups, and size.
In a second aspect, there is provided an Oracle database replication method, including:
setting the user-defined table space to be read-only;
mirror image backup is carried out on the user-defined table space;
the export creates a user statement and a user authorization statement.
Further, the Oracle database replication method further comprises the following steps:
acquiring an instruction which is sent by a target database and sets a user-defined table space as read-write;
and setting the user-defined table space as read-write according to the instruction.
Further, the backup piece generated when the user-defined table space is subjected to mirror image backup only contains user-defined data, and is irrelevant to the version of the database.
In a third aspect, there is provided an Oracle database replication apparatus comprising:
the statement backup acquisition module acquires mirror image backup of a created user statement, a user authorized statement and a user-defined table space which are derived from the source database;
the creation module creates a user according to the creation user statement;
the backup recovery module is used for recovering the user-defined table space according to the mirror image backup;
and the permission importing module imports user permission information according to the user authorization statement.
In a fourth aspect, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the Oracle database replication method described above when the program is executed by the processor.
In a fifth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the Oracle database replication method described above.
The invention provides an Oracle database replication method and device and electronic equipment, wherein the method comprises the following steps: obtaining a mirror image backup of a created user statement, a user authorized statement and a user-defined table space derived from a source database; creating a user according to the user creating statement; recovering a user-defined table space according to the mirror backup; importing user authority information according to the user authority statement to realize configured database replication, wherein for an implementer, the operation steps are simple, only database software needs to be installed, and the subsequent execution can be carried out by means of configuration; the advantages of TTS and database replication are combined, the complicated operation steps of the TTS and the limitation that the database replication technology cannot replicate across versions are simplified, the operation is simple, the functions are powerful, and the Oracle database is updated.
The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular description of preferred embodiments, as illustrated in the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flowchart of an Oracle database replication method for a target database according to an embodiment of the present invention;
FIG. 2 is a second flow chart of an Oracle database replication method for a target database according to embodiments of the present invention;
FIG. 3 is a flowchart of an Oracle database replication method for a target database according to embodiments of the present invention;
FIG. 4 is a flowchart of an Oracle database replication method for a source database according to an embodiment of the present invention;
FIG. 5 is a second flow chart of an Oracle database replication method for a source database in an embodiment of the invention;
FIG. 6 illustrates a database migration flow in an embodiment of the invention;
FIG. 7 illustrates a database installation flow in an embodiment of the invention;
FIG. 8 is a block diagram of an Oracle database replication device for a source database in an embodiment of the invention;
FIG. 9 is a block diagram of an Oracle database replication device for a source database in an embodiment of the invention;
fig. 10 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present application and in the foregoing figures, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Firstly, it should be noted that, the precondition of the Oracle database replication technology for a source database provided by the embodiment of the present invention is that:
1. the source server and the target server are required to be in network communication;
2. the IP, root user name and password of the source database and the target database are needed;
3. the target server is required to install Oracle software and database
FIG. 1 is a schematic flow chart of an Oracle database replication method for a target database according to an embodiment of the present invention; as shown in fig. 1, the Oracle database replication method for the target database may include the following:
step S100, obtaining a mirror image backup of a created user statement, a user authorized statement and a user-defined table space derived from a source database;
step 200, creating a user according to the user creating statement;
specifically, the user statement is created as a create user-like statement.
Step 300, recovering the user-defined table space according to the mirror backup;
specifically, according to the mirror backup, the recovery backup is performed (usually, the recovery needs to be performed first, then the recovery is performed, and one of the advantages of the image backup is that the recovery needs not to be performed, and the recovery needs to be directly performed), so as to recover the user-defined table space.
And step 400, importing user authority information according to the user authority statement.
Specifically, each user has own authority, such as authority for creating a table, authority capable of being connected, and the like, and the overall restoration of the user information is realized through the user authority information.
The Oracle database replication technology provided by the invention is mainly applied to replication and upgrading of an Oracle database, combines an Oracle TTS (transmissible table space) upgrading mode with replication between versions of Oracle (duplicate technology) in a configuration mode, realizes upgrading of the Oracle database by integration and simplification based on a pharmaceutical technology, and is simple to operate and powerful in function.
In an alternative embodiment, referring to fig. 2, the Oracle database replication method for the target database may further include:
step S500: and setting the recovered user-defined table space as read-write, and sending an instruction for setting the user-defined table space in the source database as read-write to the source database.
Specifically, before the database is copied, the user-defined table space in the source database needs to be set to be read-only, so that the problems of incomplete backup and the like caused by modification in the copying process are prevented.
In an alternative embodiment, referring to fig. 3, the Oracle database replication method for the target database may further include:
step S600: acquiring information of a source database;
specifically, the information of the source database may include a source database name, an ID, a user name of the LINUX user, a password, operation information, and the like.
Step S700: accessing the source database according to the information of the source database to inquire the instance name, the memory size, the data block size, the connection maximum number, the database character set and the connection mode of the source database as installation parameters;
step S800: and inquiring the baseline version parameters, and installing a database by combining the installation parameters.
Specifically, the baseline version parameters include: SYSTEM table space size, undo table space size, temporary table space size, SYSAUX table space size, number of redo log groups, and size.
By adopting the technical scheme, an empty database can be created in the target database and used for the following data migration process.
In an alternative embodiment, the method for replication of an Oracle database for a target database may further include:
and acquiring and storing the data file transmitted by the source database in a binary transmission mode.
FIG. 4 is a flowchart of an Oracle database replication method for a source database according to an embodiment of the present invention; as shown in fig. 4, the Oracle database replication method for a source database may include the following:
step S10: setting the user-defined table space to be read-only;
specifically, the table space to be exported in the source database is set to be read-only, so that data modification of the source database is prevented in the migration process.
Step S20: mirror image backup is carried out on the user-defined table space;
according to user-defined table spaces, image backup is carried out on the table spaces on a source database, paths are directly backed up under corresponding directories of a target server (the step combines a duplicate technology and a TTS technology, TTS adopts a mode of leading out metadata, migrating data files to the target server and leading in three parts of metadata, the operation steps are complex, and the TTS steps are simplified by the step of operation);
it should be noted that, the backup piece generated when the mirror backup is performed on the user-defined table space only contains user-defined data, and is irrelevant to the version of the database.
Step S30: the export creates a user statement and a user authorization statement.
By adopting the technical scheme, the method is mainly applied to replication and upgrading of the Oracle database, and is simple to operate and powerful in function by integrating and simplifying the method based on the technology of the pharmaceutical by combining an Oracle TTS (transmissible table space) upgrading mode with replication (duplicate technology) between the same versions of the Oracle.
In an alternative embodiment, referring to fig. 5, the Oracle database replication method for a source database may further include the following:
step S40: acquiring an instruction which is sent by a target database and sets a user-defined table space as read-write;
step S50: and setting the user-defined table space as read-write according to the instruction.
Specifically, before the database is copied, the user-defined table space in the source database needs to be set to be read-only, so that the problems of incomplete backup and the like caused by modification in the copying process are prevented.
In an alternative embodiment, the Oracle database replication method for the source database may further include the following: and transmitting the data file to the target database in a binary transmission mode.
For a better understanding of the present application, the implementation of the present invention will be described in additional detail below with reference to fig. 6 and 7:
the Oracle database upgrade is generally divided into two parts, namely database installation and data migration, wherein, referring to the figure, 7, the Oracle software installation and database creation comprise the following steps:
step I: using root users to newly add Oracle operating system users in a target database, setting environment variables, wherein the values of the environment variables refer to a source server, and the environment variables comprise:
ORACLE_BASE (Oracle BASE directory)
ORACLE_HOME (Oracle main catalog)
ORACLE_SID (database instance name)
NLS_LANG (character set);
step II: installing Oracle software on a target server;
step III: inquiring the source database instance name, the memory (comprising SGA and PGA) size, the data block size, the connection maximum number, the database character set and the connection mode as installation parameters;
step V: querying a baseline version: ssysem tablespace size, undo tablespace size, temporary tablespace size, SYSAUX tablespace size, number of redo log groups, and size. Combining the parameter installation database obtained in the step 102;
after the installation, the target server has an empty database, followed by data migration, see fig. 6, which includes the following:
description:
(1) Data migration involves a source database and a target database, although both databases may be connected at the same time using a RMAN command, if the versions are different, an RMAN-06618 error may result;
(2) An image backup technology of Oracle can be utilized, and a typical Oracle backup needs to execute a restore first and then execute a recovery to restore the backup data. The technology can directly use recovery under the condition of not executing a restore, and the speed is high; in addition, the theoretically backed-up files can be used in a cross-version mode, and for data migration among different versions, operation steps are relatively simplified;
step a: source database: the table space to be exported is set to be read-only, so that data modification of a source database is prevented in the migration process;
step b: source database: inquiring a user-defined user and a list of table spaces;
step c: source database: according to the user-defined table spaces obtained in the step b, image backup is carried out on the table spaces on a source database, paths are directly backed up to the corresponding directory of a target server (the step combines a duplicate technology and a TTS technology, TTS adopts a mode of leading out metadata, transferring data files to the target server and leading in three metadata, and the operation steps are complex, and the TTS step is simplified by the step of operation);
step d: source database: deriving, from the list of users obtained in step b, a creation statement (similar to a create user..statement) and an authorization statement (each user has its own rights, such as rights to create a table, rights to connect, etc.);
step e: target database: creating a user according to the created user statement obtained in the step d;
step f: target database: c, executing recovery according to the mirror image backup obtained in the step c (usually, the recovery needs to be executed first, then the recovery is executed, and one of the advantages of image backup is that the recovery is not needed to be executed, and the recovery is directly executed), so that the user-defined table space is recovered;
step g: target database: importing user authority information according to the user authority statement obtained in the step c;
step h: target database: and setting the table space of the source database and the target database as reading and writing.
By adopting the technical scheme, the configured database replication is realized, for an implementer, the operation steps are simple, only database software needs to be installed, and the advantages of TTS and database replication can be combined by means of configuration execution in the follow-up process, so that the complicated operation steps of the TTS and the limitation that the database replication technology cannot replicate across versions are simplified.
Based on the same inventive concept, the embodiments of the present application also provide an Oracle database replication device, which can be used to implement the method described in the above embodiments, as described in the following embodiments. Since the principle of the Oracle database replication device for solving the problem is similar to that of the above method, the implementation of the Oracle database replication device can be referred to the implementation of the above method, and the repetition is not repeated. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 8 is a block diagram of a structure of an Oracle database replication apparatus for a target database in an embodiment of the present invention. As shown in fig. 8, the Oracle database replication apparatus for a target database specifically includes: statement backup acquisition module 10, creation module 20, backup restoration module 30, and rights import module 40.
The sentence backup obtaining module 10 obtains the mirror image backup of the created user sentence, the user authorized sentence and the user-defined table space derived from the source database;
a creating module 20 for creating a user according to the creating user statement;
the backup recovery module 30 recovers the user-defined table space according to the mirror backup;
the rights import module 40 imports the user rights information according to the user authorization statement.
By adopting the technical scheme, the configured database replication is realized, and for an implementer, the operation steps are simple, only database software needs to be installed, and the subsequent execution can be carried out by means of configuration; the advantages of TTS and database replication are combined, the complicated operation steps of the TTS and the limitation that the database replication technology cannot replicate across versions are simplified, the operation is simple, the functions are powerful, and the Oracle database is updated.
The embodiment of the invention also provides an Oracle database replication device for a source database, referring to FIG. 9, the Oracle database replication device for the source database may include: a setup module 100, a backup module 200, and a statement export module 300.
A setting module 100 for setting the user-defined table space to be read-only;
the backup module 200 performs mirror backup on the user-defined table space;
statement derivation module 300 derives create user statements and user authorization statements.
By adopting the technical scheme, the configured database replication is realized, and for an implementer, the operation steps are simple, only database software needs to be installed, and the subsequent execution can be carried out by means of configuration; the advantages of TTS and database replication are combined, the complicated operation steps of the TTS and the limitation that the database replication technology cannot replicate across versions are simplified, the operation is simple, the functions are powerful, and the Oracle database is updated.
The apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is an electronic device, which may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
In a typical example the electronic device comprises in particular a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the steps of the Oracle database replication method described above when said program is executed.
Referring now to fig. 10, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present application is shown.
As shown in fig. 10, the electronic apparatus 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate works and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM)) 603. In the RAM603, various programs and data required for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on drive 610 as needed, so that a computer program read therefrom is mounted as needed as storage section 608.
In particular, according to embodiments of the present invention, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, an embodiment of the present invention includes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the Oracle database replication method described above.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present application.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. An Oracle database replication method, comprising:
obtaining a mirror image backup of a created user statement, a user authorized statement and a user-defined table space derived from a source database;
creating a user according to the user creating statement;
recovering a user-defined table space according to the mirror backup;
and importing user authority information according to the user authority statement.
2. The Oracle database replication method of claim 1 further comprising:
and setting the recovered user-defined table space as read-write, and sending an instruction for setting the user-defined table space in the source database as read-write to the source database.
3. The Oracle database replication method of claim 1 further comprising:
acquiring information of a source database;
accessing the source database according to the information of the source database to inquire the instance name, the memory size, the data block size, the connection maximum number, the database character set and the connection mode of the source database as installation parameters;
and inquiring the baseline version parameters, and installing a database by combining the installation parameters.
4. The Oracle database replication method of claim 3 wherein said baseline version parameters comprise: SYSTEM table space size, undo table space size, temporary table space size, SYSAUX table space size, number of redo log groups, and size.
5. An Oracle database replication method, comprising:
setting the user-defined table space to be read-only;
carrying out mirror image backup on the user-defined table space, and recovering the user-defined table space according to the mirror image backup;
and exporting a user creating statement and a user authorizing statement, wherein the user creating statement is used for creating a user according to the user creating statement, and importing user permission information according to the user authorizing statement.
6. The Oracle database replication method of claim 5 further comprising:
acquiring an instruction which is sent by a target database and sets a user-defined table space as read-write;
and setting the user-defined table space as read-write according to the instruction.
7. The method of claim 5, wherein the backup piece generated when mirror-image backup is performed on the user-defined tablespace comprises only user-defined data, independent of database version.
8. An Oracle database replication device, comprising:
the statement backup acquisition module acquires mirror image backup of a created user statement, a user authorized statement and a user-defined table space which are derived from the source database;
the creation module creates a user according to the creation user statement;
the backup recovery module is used for recovering the user-defined table space according to the mirror image backup;
and the permission importing module imports user permission information according to the user authorization statement.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the Oracle database replication method of any one of claims 1 to 7 when the program is executed by the processor.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the Oracle database replication method of any of claims 1 to 7.
CN202110352512.4A 2021-03-31 2021-03-31 Oracle database replication method and device and electronic equipment Active CN112860296B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110352512.4A CN112860296B (en) 2021-03-31 2021-03-31 Oracle database replication method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110352512.4A CN112860296B (en) 2021-03-31 2021-03-31 Oracle database replication method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112860296A CN112860296A (en) 2021-05-28
CN112860296B true CN112860296B (en) 2024-03-29

Family

ID=75992076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110352512.4A Active CN112860296B (en) 2021-03-31 2021-03-31 Oracle database replication method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112860296B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105005618A (en) * 2015-07-21 2015-10-28 杭州合众数据技术有限公司 Data synchronization method and system among heterogeneous databases
US10862872B1 (en) * 2020-04-30 2020-12-08 Snowflake Inc. Message-based database replication

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105005618A (en) * 2015-07-21 2015-10-28 杭州合众数据技术有限公司 Data synchronization method and system among heterogeneous databases
US10862872B1 (en) * 2020-04-30 2020-12-08 Snowflake Inc. Message-based database replication

Also Published As

Publication number Publication date
CN112860296A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
JP5931973B2 (en) Virtual database system
US5890165A (en) Method and apparatus for automatic discovery of databases
US9069800B2 (en) Parallel database backup and restore
US10089371B2 (en) Extensible extract, transform and load (ETL) framework
US11010401B2 (en) Efficient snapshot generation of data tables
KR20120098708A (en) Datacenter workflow automation scenarios using virtual databases
EP2329363A2 (en) Metadata driven mobile business objects
US9424265B1 (en) Method and system for backing up and restoring a multi-user relational database management system
CN111897623B (en) Cluster management method, device, equipment and storage medium
US9207966B2 (en) Method and system for providing a high-availability application
US10318330B2 (en) Data-persisting temporary virtual machine environments
US11645070B1 (en) Documentation enforcement during compilation
CN106990974B (en) APP updating method and device and electronic equipment
CN112860296B (en) Oracle database replication method and device and electronic equipment
US20070038590A1 (en) Minimizing computer resource usage when converting data types of a table column
AU2021268828B2 (en) Secure data replication in distributed data storage environments
US11675931B2 (en) Creating vendor-neutral data protection operations for vendors' application resources
CN112861185A (en) Data automatic deformation transmission method based on Hive data warehouse
US11336750B1 (en) Remote procedure calls that offload search pattern matching from clients to servers
US20210055996A1 (en) Migration of backup data
CN115297129B (en) Method and device for establishing data communication network
US11593498B2 (en) Distribution of user specific data elements in a replication environment
US11762812B2 (en) Detecting changes in a namespace using namespace enumeration endpoint response payloads
US20210334169A1 (en) Vendor-neutral models of vendors' application resources
US20180068003A1 (en) Updating a local instance of a shared drive

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