CN112860296A - Oracle database copying method and device and electronic equipment - Google Patents

Oracle database copying method and device and electronic equipment Download PDF

Info

Publication number
CN112860296A
CN112860296A CN202110352512.4A CN202110352512A CN112860296A CN 112860296 A CN112860296 A CN 112860296A CN 202110352512 A CN202110352512 A CN 202110352512A CN 112860296 A CN112860296 A CN 112860296A
Authority
CN
China
Prior art keywords
user
database
statement
oracle
table space
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.)
Granted
Application number
CN202110352512.4A
Other languages
Chinese (zh)
Other versions
CN112860296B (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

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
    • 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

Abstract

The invention provides an Oracle database copying method and device and electronic equipment, wherein the method comprises the following steps: acquiring a creating user statement, a user authorization statement and a mirror image backup of a user-defined tablespace which are exported by a source database; creating a user according to the creating user statement; restoring a user-defined table space according to the mirror image backup; importing user authority information according to the user authorization statement to realize configured database copying, wherein for an implementer, the operation steps are simple, and the implementer can execute the configuration later only by installing database software; the advantages of TTS and database copying are combined, the complicated operation steps of the TTS are simplified, the limitation that the database copying technology cannot be copied across versions is overcome, the operation is simple, the function is strong, and the Oracle database upgrading is realized.

Description

Oracle database copying method and device and electronic equipment
Technical Field
The invention relates to the technical field of databases, in particular to an Oracle database copying method and device and electronic equipment.
Background
The existing Oracle upgrading and copying modes have two types:
1. data pump technology export and import
The principle of the export and import of the data pump technology is as follows: exporting the data of the source database into a dmp file, and then transmitting the data to the target server and importing the data. The whole process has simple operation steps, and fixed statements are led out and led in. However, if the data volume is large, it is time-consuming, so the data pump technology is only suitable for the case where the data volume is less than 500G.
TTS (transmissible table space)
The principle of TTS (transmissible table space) is: in the Oracle database, path information of a tablespace is defined in a control file, and metadata information in the tablespace is stored in a system tablespace. And importing the small amount of metadata information into the target database by exporting the metadata information of the small tablespace in the source database. The operation steps are complex, and the requirement on professional knowledge is high.
The two methods are the existing Oracle upgrading method and are suitable for upgrading the Oracle low version to the Oracle high version. In addition, for migration before the same version, and under the condition that operating systems are consistent, Oracle also provides a database replication technology (duplicate), in the technology, a target database only needs to be installed with Oracle software, then some simple configurations are made, a source database and the target database are connected through rman, and the whole source database can be replicated to the target database only by executing one command. The copying process does not need to be participated, and the copying can be directly used without needing to be repeated after the copying is finished. But only for replication between the same server, the same database version.
Disclosure of Invention
The invention provides an Oracle database replication method and device, 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 purpose, the invention adopts the following technical scheme:
in a first aspect, a method for copying an Oracle database is provided, which includes:
acquiring a creating user statement, a user authorization statement and a mirror image backup of a user-defined tablespace which are exported by a source database;
creating a user according to the creating user statement;
restoring a user-defined table space according to the mirror image backup;
and importing user authority information according to the user authorization statement.
Further, the Oracle database replication method further comprises the following steps:
and setting the recovered user-defined tablespace as read-write, and sending an instruction for setting the user-defined tablespace 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 an instance name, a memory size, a data block size, a maximum number of connections, a database character set and a connection mode of the source database as installation parameters;
and querying the baseline version parameters, and installing a database by combining the installation parameters.
Further, the baseline version parameters include: the size of the SYSTEM table space, the size of the undo table space, the size of the temporary table space, the size of the SYSAUX table space, the number and the size of redo log groups.
In a second aspect, a method for copying an Oracle database is provided, including:
setting a user-defined table space as read-only;
carrying out mirror image backup on the user-defined table space;
the export creates the user statement and the user authorizes the 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.
Furthermore, the backup slice generated when the user-defined table space is subjected to mirror image backup only contains user-defined data and is irrelevant to the database version.
In a third aspect, an Oracle database replication apparatus is provided, including:
the statement backup acquisition module is used for acquiring a created user statement, a user authorization statement and a mirror backup of a user-defined tablespace which are exported by the source database;
the creating module creates a user according to the creating user statement;
the backup recovery module is used for recovering a user-defined table space according to the mirror image backup;
and the authority import module imports user authority information according to the user authorization statements.
In a fourth aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the Oracle database replication method are implemented.
In a fifth aspect, a computer readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the Oracle database replication method described above.
The invention provides an Oracle database copying method, an Oracle database copying device and electronic equipment, wherein the method comprises the following steps: acquiring a creating user statement, a user authorization statement and a mirror image backup of a user-defined tablespace which are exported by a source database; creating a user according to the creating user statement; restoring a user-defined table space according to the mirror image backup; importing user authority information according to the user authorization statement to realize configured database copying, wherein for an implementer, the operation steps are simple, and the implementer can execute the configuration later only by installing database software; the advantages of TTS and database copying are combined, the complicated operation steps of the TTS are simplified, the limitation that the database copying technology cannot be copied across versions is overcome, the operation is simple, the function is strong, and the Oracle database upgrading is realized.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are 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. In the drawings:
FIG. 1 is a first flowchart illustrating an Oracle database replication method for a target database according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating an Oracle database replication method for a target database according to an embodiment of the present invention;
FIG. 3 is a third flowchart illustrating an Oracle database replication method for a target database according to an embodiment of the present invention;
FIG. 4 is a first flowchart illustrating an Oracle database replication method for a source database according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a second method for Oracle database replication for a source database according to an embodiment of the present invention;
FIG. 6 illustrates a database migration flow in an embodiment of the present invention;
FIG. 7 illustrates a database installation process in an embodiment of the invention;
FIG. 8 is a block diagram of an Oracle database replication apparatus for a source database according to an embodiment of the present invention;
FIG. 9 is a block diagram of an Oracle database replication apparatus for a source database according to an embodiment of the present invention;
fig. 10 is a block diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, 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 partial embodiments of the present application, but not all 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.
As will be appreciated by one skilled in the art, 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 this application and the above-described drawings, 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, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
First, it should be noted that the preconditions of the Oracle database replication technology for the source database provided by the embodiment of the present invention are:
1. a source server is required to be communicated with a target server through a network;
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 firstly
Fig. 1 is a first flowchart illustrating 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 a target database may include the following:
s100, acquiring mirror image backups of a user creating statement, a user authorization statement and a user custom tablespace which are exported by a source database;
s200, creating a user according to the user creating statement;
specifically, a user statement is created that resembles a create user.
S300, restoring a user-defined table space according to the mirror image backup;
specifically, according to the mirror backup, a recovery is executed (the restore is usually executed first, and then the recovery is executed, one of the advantages of the image backup is that the restore is not needed, and the recovery is directly executed), and the user-defined table space is recovered.
And step S400, importing user authority information according to the user authorization statement.
Specifically, each user has its own authority, such as the authority to create a table, the authority to enable connection, and the like, and the user information is restored integrally 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 and replication between Oracle versions with the same version (duplicate technology) through a configuration mode, realizes upgrading of the Oracle database through integration and simplification based on a rman technology, and has the advantages of simple operation and strong function.
In an alternative embodiment, referring to fig. 2, the Oracle database replication method for a target database may further include:
step S500: and setting the recovered user-defined tablespace as read-write, and sending an instruction for setting the user-defined tablespace in the source database as read-write to the source database.
Specifically, before copying the database, the user-defined tablespace 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 solved.
In an alternative embodiment, referring to fig. 3, the Oracle database replication method for a target database may further include:
step S600: acquiring information of a source database;
specifically, the information of the source database may include a name, an ID, a user name of the LINUX user, a password, operation information, and the like of the source database.
Step S700: accessing the source database according to the information of the source database to inquire an instance name, a memory size, a data block size, a maximum number of connections, a database character set and a connection mode of the source database as installation parameters;
step S800: and querying the baseline version parameters, and installing a database by combining the installation parameters.
Specifically, the baseline version parameters include: the size of the SYSTEM table space, the size of the undo table space, the size of the temporary table space, the size of the SYSAUX table space, the number and the size of redo log groups.
By adopting the technical scheme, an empty database can be created in the target database for the subsequent data migration process.
In an optional embodiment, the Oracle database replication method 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 first flowchart illustrating 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 a user-defined table space as 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 in the migration process is prevented.
Step S20: carrying out mirror image backup on the user-defined table space;
according to the table spaces defined by the user, image backup is executed on the table spaces on a source database, and paths are directly backed up to a corresponding directory of a target server (the step combines a duplicate technology and a TTS technology, the TTS adopts a mode of exporting metadata, migrating a data file to the target server and importing a metadata three-part, and the operation steps are complex;
it should be noted that the backup slice generated when the user-defined table space is subjected to mirror image backup only contains user-defined data, and is irrelevant to the database version.
Step S30: the export creates the user statement and the user authorizes the statement.
By adopting the technical scheme, the method is mainly applied to copying and upgrading of the Oracle database, by combining an Oracle TTS (transmissible table space) upgrading mode with copying between Oracle versions with the same version (duplicate technology) in a configuration mode, based on the rman technology, by integrating and simplifying, upgrading of the Oracle database is realized, and the method is simple to operate and powerful in function.
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 copying the database, the user-defined tablespace 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 solved.
In an optional 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.
In order to make the present application better understood by those skilled in the art, the following refers to fig. 6 and 7, and the implementation process of the present invention is described in addition:
the method comprises two parts of overall sub-database installation and data migration for Oracle database upgrading, wherein the steps of Oracle software installation and database creation comprise the following steps:
step I: using a root user to add an Oracle operating system user and setting an environment variable in a target database, wherein the value of the environment variable refers to a source server, and the environment variable comprises:
ORACLE _ BASE (Oracle BASE directory)
ORACLE _ HOME (Oracle Main directory)
ORACLE _ SID (database instance name)
NLS _ LANG (character set);
step II: installing Oracle software on a target server;
step III: inquiring the name of a source database instance, the size of a memory (including SGA and PGA), the size of a data block, the maximum number of connections, a database character set and a connection mode as installation parameters;
step V: query baseline version: SSYSTEM tablespace size, undoo tablespace size, temporary tablespace size, SYSAUX tablespace size, redo log group number and size. Installing a database by combining the parameters acquired in the step 102;
after the installation is completed, the target server has an empty database, and then data migration is performed, which is shown in fig. 6 and includes the following contents:
description of the drawings:
(1) data migration involves the source and target databases, although both databases may be connected simultaneously using RMAN commands, it may cause RMAN-06618 errors if the versions differ;
(2) the image backup technology of Oracle can be used, and the normal Oracle backup needs to execute restore first and then execute recovery to restore the backup data. The technology can directly use the receiver without executing restore, and the speed is higher; in addition, theoretically, backed-up files can be used across versions, and for data migration among different versions, operation steps are relatively simplified;
step a: a source database: the table space to be exported is set to be read only, so that data modification of a source database in the migration process is prevented;
step b: a source database: inquiring a user-defined user and a table space list;
step c: a source database: according to the user-defined tablespaces obtained in the step b, image backup is executed on the tablespaces on a source database, and paths are directly backed up to a corresponding directory of a target server (the step combines a duplicate technology and a TTS technology, the TTS adopts a mode of exporting metadata, migrating data files to the target server and importing three parts of metadata, and the operation steps are complex;
step d: a source database: according to the user list obtained in step b, deriving the creation statements (similar to create user statements) and authorization statements (each user has own authority, such as the authority to create the table, the authority to connect, etc.) of the users;
step e: a target database: creating a user according to the user creating statement obtained in the step d;
step f: a target database: according to the mirror image backup obtained in the step c, a recovery is executed (the restore is usually executed, the restore is usually executed first, and then the recovery is executed, wherein one of the advantages of the image backup is that the restore is not required to be executed, and the recovery can be directly executed), and the user-defined table space is recovered;
step g: a target database: importing user authority information according to the user authorization statements obtained in the step c;
step h: a target database: and setting the tablespaces 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, the advantage of combining TTS and database replication can be realized subsequently by means of configuration execution only by installing database software, and the limitation that the complicated operation steps of the TTS and the database replication technology cannot be subjected to cross-version replication is simplified.
Based on the same inventive concept, the embodiment of the present application further provides an Oracle database replication device, which can be used to implement the method described in the above embodiment, as described in the following embodiments. Because the principle of the Oracle database copying apparatus for solving the problems is similar to that of the method, the implementation of the Oracle database copying apparatus can be referred to the implementation of the method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 8 is a block diagram of an Oracle database replication apparatus for a target database according to an embodiment of the present invention. As shown in fig. 8, the apparatus for copying an Oracle database for a target database specifically includes: a sentence backup acquiring module 10, a creating module 20, a backup restoring module 30 and a permission importing module 40.
The statement backup obtaining module 10 obtains a mirror backup of a created user statement, a user authorization statement and a user-defined tablespace derived from a source database;
a creating module 20 for creating a user according to the creating user statement;
a backup recovery module 30 for recovering the user-defined tablespace according to the mirror image backup;
and the authority importing module 40 imports user authority information according to the user authorization statement.
By adopting the technical scheme, the configured database replication is realized, for an implementer, the operation steps are simple, only the database software needs to be installed, and the subsequent execution can be realized by depending on the configuration; the advantages of TTS and database copying are combined, the complicated operation steps of the TTS are simplified, the limitation that the database copying technology cannot be copied across versions is overcome, the operation is simple, the function is strong, and the Oracle database upgrading is realized.
An embodiment of the present invention further provides an Oracle database replication apparatus for a source database, and referring to fig. 9, the Oracle database replication apparatus for a source database may include: a setup module 100, a backup module 200, and a statement export module 300.
The setting module 100 sets the user-defined table space as read-only;
the backup module 200 is used for carrying out mirror image backup on the user-defined table space;
the statement derivation module 300 derives a create user statement and a user authorization statement.
By adopting the technical scheme, the configured database replication is realized, for an implementer, the operation steps are simple, only the database software needs to be installed, and the subsequent execution can be realized by depending on the configuration; the advantages of TTS and database copying are combined, the complicated operation steps of the TTS are simplified, the limitation that the database copying technology cannot be copied across versions is overcome, the operation is simple, the function is strong, and the Oracle database upgrading is realized.
The apparatuses, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. 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 specifically includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the steps of the Oracle database replication method described above.
Referring now to FIG. 10, shown is a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present application.
As shown in fig. 10, the electronic apparatus 600 includes a Central Processing Unit (CPU)601 that 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 necessary for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via 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, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; 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 driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted as necessary on the storage section 608.
In particular, according to an embodiment of the present invention, the processes described above with reference to the 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, implements the steps of the above-described Oracle database replication method.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, 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.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An Oracle database replication method, comprising:
acquiring a creating user statement, a user authorization statement and a mirror image backup of a user-defined tablespace which are exported by a source database;
creating a user according to the creating user statement;
restoring a user-defined table space according to the mirror image backup;
and importing user authority information according to the user authorization statement.
2. The Oracle database replication method of claim 1, further comprising:
and setting the recovered user-defined tablespace as read-write, and sending an instruction for setting the user-defined tablespace 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 an instance name, a memory size, a data block size, a maximum number of connections, a database character set and a connection mode of the source database as installation parameters;
and querying the baseline version parameters, and installing a database by combining the installation parameters.
4. The Oracle database replication method of claim 3, wherein the baseline version parameters include: the size of the SYSTEM table space, the size of the undo table space, the size of the temporary table space, the size of the SYSAUX table space, the number and the size of redo log groups.
5. An Oracle database replication method, comprising:
setting a user-defined table space as read-only;
carrying out mirror image backup on the user-defined table space;
the export creates the user statement and the user authorizes the 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 Oracle database replication method of claim 5, wherein the backup piece generated when mirroring backup is performed on the user-defined tablespace contains only user-defined data, regardless of the database version.
8. An Oracle database replication apparatus, comprising:
the statement backup acquisition module is used for acquiring a created user statement, a user authorization statement and a mirror backup of a user-defined tablespace which are exported by the source database;
the creating module creates a user according to the creating user statement;
the backup recovery module is used for recovering a user-defined table space according to the mirror image backup;
and the authority import module imports user authority information according to the user authorization statements.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the Oracle database replication method of any one of claims 1 to 7 are implemented when the processor executes the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the Oracle database replication method according to any one 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 true CN112860296A (en) 2021-05-28
CN112860296B 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
CN112860296B (en) 2024-03-29

Similar Documents

Publication Publication Date Title
US11860895B2 (en) Selectively replicating changes to hierarchial data structures
US20220043830A1 (en) Versioned hierarchical data structures in a distributed data store
US10025528B2 (en) Managing transformations of snapshots in a storage system
US8832028B2 (en) Database cloning
JP5931973B2 (en) Virtual database system
US20190187980A1 (en) Version control of applications
US10089371B2 (en) Extensible extract, transform and load (ETL) framework
CN111737227B (en) Data modification method and system
US20230074856A1 (en) Resolving data location for queries in a multi-system instance landscape
US7631020B1 (en) Method and system of generating a proxy for a database
US20170322792A1 (en) Updating of operating system images
CN112860296B (en) Oracle database replication method and device and electronic equipment
WO2021223628A1 (en) Secure data replication in distributed data storage environments
CN113419896B (en) Data recovery method, device, electronic equipment and computer readable medium
US11675931B2 (en) Creating vendor-neutral data protection operations for vendors' application resources
CN112861185A (en) Data automatic deformation transmission method based on Hive data warehouse
CN110888895B (en) Association-based access control delegation
US11520668B2 (en) Vendor-neutral models of vendors' application resources
US11762812B2 (en) Detecting changes in a namespace using namespace enumeration endpoint response payloads
CN115292097B (en) Database instance creation method, apparatus, device, storage medium, and program product
WO2017023255A1 (en) System and method for updating a local instance of a shared drive
CN117591341A (en) Data backup method and device, electronic equipment and readable storage medium
CN115543539A (en) Virtual machine password resetting method, device and medium
CN117724688A (en) Plug-in modeling management method and system supporting multi-scene code engineering generation
CN112579344A (en) Data processing method, device and equipment

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