[go: up one dir, main page]

CN119862194A - Oracle database full-text retrieval statement restoration synchronization method and device - Google Patents

Oracle database full-text retrieval statement restoration synchronization method and device Download PDF

Info

Publication number
CN119862194A
CN119862194A CN202510322390.2A CN202510322390A CN119862194A CN 119862194 A CN119862194 A CN 119862194A CN 202510322390 A CN202510322390 A CN 202510322390A CN 119862194 A CN119862194 A CN 119862194A
Authority
CN
China
Prior art keywords
statement
system table
full
name
search
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
CN202510322390.2A
Other languages
Chinese (zh)
Other versions
CN119862194B (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.)
Di Sijie Beijing Data Management Technology Co ltd
Original Assignee
Di Sijie Beijing Data Management Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Di Sijie Beijing Data Management Technology Co ltd filed Critical Di Sijie Beijing Data Management Technology Co ltd
Priority to CN202510322390.2A priority Critical patent/CN119862194B/en
Publication of CN119862194A publication Critical patent/CN119862194A/en
Application granted granted Critical
Publication of CN119862194B publication Critical patent/CN119862194B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

本发明公开了一种Oracle数据库全文检索语句还原同步方法,包括:在同步管理员模式下调用检索配置对象对数据库执行针对预设检索目标的全文检索;获取系统表操作语句;对系统表操作语句进行分析;在跟踪日志文件中查找系统表操作语句;当查找到系统表操作语句时,获取基于当前用户的用户名的操作对象的名称;根据系统表操作语句中的操作类型,确定基于当前用户调用检索配置对象执行全文检索时的待同步操作语句;将待同步操作语句发送至目标端。本发明可以还原得到需要同步的全文检索的操作语句,以完成对全文检索操作语句的数据同步,保证了备份数据的完整性。本发明还公开了用于实现上述方法的装置、电子设备和计算机可读存储介质。

The present invention discloses a method for restoring and synchronizing full-text search statements of an Oracle database, comprising: in a synchronization administrator mode, calling a search configuration object to perform a full-text search on a database for a preset search target; obtaining a system table operation statement; analyzing the system table operation statement; searching for the system table operation statement in a tracking log file; when the system table operation statement is found, obtaining the name of the operation object based on the user name of the current user; according to the operation type in the system table operation statement, determining the operation statement to be synchronized when the current user calls the search configuration object to perform a full-text search; and sending the operation statement to be synchronized to a target end. The present invention can restore the operation statement of the full-text search that needs to be synchronized, so as to complete the data synchronization of the full-text search operation statement, and ensure the integrity of the backup data. The present invention also discloses a device, an electronic device and a computer-readable storage medium for implementing the above method.

Description

Oracle database full-text retrieval statement restoration synchronization method and device
Technical Field
The invention relates to the technical field of databases, in particular to a method and a device for restoring and synchronizing full-text search sentences of an Oracle database.
Background
In the construction of a database disaster recovery system, the establishment of a main and standby database architecture is a key measure for ensuring service continuity and data security. The current system has realized the real-time synchronization of business data and DML (Data Manipulation Language, data operation language) operation data, including the data change operations of insertion, modification, deletion, etc., and these data can be synchronized from the main database to the backup database in time, which guarantees the integrity and consistency of the data of the main and backup databases to a certain extent. However, for the Oracle database, the full text search function is a powerful text search tool, and the full text search is implemented by calling the ctx_ddl object, but for the database user, the operation statement calling the ctx_ddl object cannot be directly obtained from the modification log, and when the Oracle database is subjected to synchronous data, synchronous backup cannot be performed on the full text search statement, so that the backup data is incomplete.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a method and a device for restoring and synchronizing full-text search sentences of an Oracle database. The technical problems to be solved by the invention are realized by the following technical scheme:
the first aspect of the embodiment of the invention provides a method for restoring and synchronizing full-text search sentences of an Oracle database, which comprises the following steps:
The Oracle database full-text retrieval statement reduction synchronization method is applied to a source end and comprises the following steps of:
invoking a search configuration object to execute full-text search aiming at a preset search target on a database in a synchronous manager mode;
responding to the full text retrieval completion instruction, and acquiring a system table operation statement;
Analyzing the system table operation statement to determine the name of an operation object to be operated when a search configuration object is called in the system table operation statement, wherein the name of the operation object is created based on the user name of the synchronous manager;
When the DML operation information in the modification log is updated, searching a system table operation statement in the tracking log file;
when a system table operation statement is found, acquiring the name of an operation object based on the user name of the current user;
Determining an operation sentence to be synchronized when the full text retrieval is executed based on the retrieval configuration object called by the current user according to the operation type in the system table operation sentence corresponding to the name of the operation object based on the user name of the current user;
And sending the operation statement to be synchronized to a target end.
In one embodiment of the present invention, the acquiring the system table operation sentence in response to the full text search completion instruction includes:
Responding to a full text retrieval completion instruction, and acquiring a current tracking log file;
And analyzing the current tracking log file to obtain a system table operation statement.
In one embodiment of the present invention, when the DML operation information in the modification log is updated, the searching the trace log file for the system table operation statement includes:
And when the DML operation information is added in the modification log, searching a system table operation statement in the tracking log file.
In one embodiment of the present invention, the determining, according to the operation type in the system table operation sentence corresponding to the name of the operation object based on the user name of the current user, the operation sentence to be synchronized when the full text search is performed based on the current user invoking the search configuration object includes:
Determining the operation type when the target call retrieval configuration object executes full-text retrieval according to the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user;
And generating an operation statement to be synchronized when the current user calls the search configuration object to execute the full text search according to the operation type when the target calls the search configuration object to execute the full text search.
A second aspect of the present invention provides an Oracle database full-text retrieval statement restoration synchronization device, including:
The execution module is used for calling the search configuration object to execute full-text search aiming at a preset search target on the database in a synchronous manager mode;
The first acquisition module is used for responding to the full text retrieval completion instruction and acquiring a system table operation statement;
The first determining module is used for analyzing the system table operation statement to determine the name of an operation object to be operated when the retrieval of the configuration object is called in the system table operation statement, wherein the name of the operation object is created based on the user name of the synchronous manager;
the searching module is used for searching the system table operation statement in the tracking log file when the DML operation information in the modification log is updated;
The second acquisition module is used for acquiring the name of the operation object based on the user name of the current user when the system table operation statement is found;
The second determining module is used for determining an operation sentence to be synchronized when the full text retrieval is executed based on the retrieval configuration object called by the current user according to the operation type in the system table operation sentence corresponding to the name of the operation object based on the user name of the current user;
And the sending module is used for sending the operation statement to be synchronized to a target end.
In one embodiment of the present invention, the acquiring the system table operation sentence in response to the full text search completion instruction includes:
Responding to a full text retrieval completion instruction, and acquiring a current tracking log file;
And analyzing the current tracking log file to obtain a system table operation statement.
In one embodiment of the present invention, when the DML operation information in the modification log is updated, the searching the trace log file for the system table operation statement includes:
And when the DML operation information is added in the modification log, searching a system table operation statement in the tracking log file.
In one embodiment of the present invention, the determining, according to the operation type in the system table operation sentence corresponding to the name of the operation object based on the user name of the current user, the operation sentence to be synchronized when the full text search is performed based on the current user invoking the search configuration object includes:
Determining the operation type when the target call retrieval configuration object executes full-text retrieval according to the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user;
And generating an operation statement to be synchronized when the current user calls the search configuration object to execute the full text search according to the operation type when the target calls the search configuration object to execute the full text search.
A third aspect of the embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor implements the method for restoring and synchronizing full-text search sentences in an Oracle database provided in the first aspect of the embodiment of the present invention when executing the program.
A fourth aspect of the embodiments of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for recovering and synchronizing full-text search sentences of an Oracle database provided in the first aspect of the embodiments of the present invention.
The invention has the beneficial effects that:
The invention analyzes the operation statement of the system table to determine the name of the operation object of the operation executed when the retrieval configuration object is called in the operation statement of the system table, further obtains the operation type in the operation statement of the system table corresponding to the name of the operation object based on the user name of the current user from the operation statement of the system table when the operation statement of the full text retrieval is required to be synchronously called in the operation statement of the system table, and further can restore the operation statement of the operation object of the retrieval configuration object which is required to be synchronously called in order to synchronize the operation statement, thereby completing the data synchronization of the full text retrieval operation statement and ensuring the integrity of backup data.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a schematic flow chart of an Oracle database full-text retrieval statement reduction synchronization method provided by an embodiment of the invention;
Fig. 2 is a schematic block diagram of an Oracle database full-text retrieval statement recovery synchronization device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to specific examples, but embodiments of the present invention are not limited thereto.
As shown in fig. 1, a first aspect of the embodiment of the present invention provides a method for restoring and synchronizing full-text search sentences of an Oracle database, which is applied to a source end, and includes the following steps:
And step 11, invoking a search configuration object to execute full-text search aiming at a preset search target on the database in a synchronous manager mode.
And step 12, responding to the full text retrieval completion instruction, and acquiring a system table operation statement.
And step 13, analyzing the system table operation statement to determine the name of the operation object to be operated when the retrieval configuration object is called in the system table operation statement.
Wherein the name of the operation object is created based on the user name of the synchronization manager.
And 14, when the DML operation information in the modification log is updated, searching the operation statement of the system table in the trace log file.
And step 15, when the system table operation statement is found, acquiring the name of the operation object based on the user name of the current user.
And step 16, determining the operation statement to be synchronized when the full text retrieval is executed based on the retrieval configuration object called by the current user according to the operation type in the operation statement of the system table corresponding to the name of the operation object based on the user name of the current user.
And step 17, sending the operation statement to be synchronized to the target end.
In this embodiment, by analyzing the system table operation statement, the name of the operation object of the operation executed when the search configuration object is called is determined to exist in the system table operation statement, and further, when the operation statement of the full text search is required to be synchronously called and executed by the search configuration object, the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user can be obtained from the system table operation statement, so that the operation statement of the full text search required to be synchronously called and executed by the search configuration object can be restored, and the operation statement can be synchronized, so that the data synchronization of the full text search operation statement is completed, and the integrity of backup data is ensured.
On the basis of the first aspect of the embodiment of the invention, a second aspect of the embodiment of the invention further provides a method for restoring and synchronizing full-text search sentences of an Oracle database, and the second aspect of the embodiment of the invention provides a method for restoring and synchronizing full-text search sentences of an Oracle database, which is applied to a source end and comprises the following steps:
Step 21, invoking the search configuration object ctx_ddl to execute full-text search for a preset search target on the database in the synchronous manager mode.
In this step, the user name is associated in some of the operation sentences of the operations performed by the Oracle database executing the full text search function, and the full text search is performed in the synchronous manager mode, wherein the operation sentences are associated with the user name of the synchronous manager, so that the operation sentences associated with the user names can be conveniently identified.
The exec ctx_ddl.create_reference (' ctfs _ lexer ', ' chinese _ vgram _ lexer ') is an operation statement for full text retrieval that invokes ctx_ddl, where ctfs in ' ctfs _ lexer ' indicates the user's user name, but the operation statement cannot be directly obtained from a redox log, which is a log for recording the DML operation of data changes such as database insertion, modification, deletion, etc., and the information of the operation statement needs to be restored by the method of the present embodiment.
Step 22, in response to the full text retrieval completion instruction, a system table operation statement is acquired.
The method comprises the steps of responding to a full text retrieval completion instruction, obtaining a current tracking log file, and then analyzing the current tracking log file to obtain a system table operation statement. The trace log file is a trace file. the trace file records DML operation statements of ctxsys.drxxx system table (ctxsys.dr$ index_set, ctxsys.dr$ index_object, ctxsys.dr$ PREFERENCE, etc.), and the system table operation statement can be obtained by parsing the trace file.
By way of example, a system table operation statement is obtained:
SQL>select * from ctxsys.DR$PREFERENCE where rowid='AAANh4AACAAACVPAAD';
PRE_ID PRE_OWNER# PRE_NAMEPRE_OBJ_ID PRE_CLA_ID PRE_VALID
1064293 CTFS_LEXER46N
This operation indicates that the database inserted a piece of data into the dr$ PREFERENCE table at the time ctx ddl. Create _ reference was performed, it follows that the database will operate on the system table when performing full text searches.
Step 23, analyzing the system table operation statement to determine that the name of the operation object to be operated when the retrieval configuration object is called exists in the system table operation statement.
Wherein the name of the operation object is created based on the user name of the synchronization manager.
In this step, the system table operation sentence is searched and analyzed, and there is a name in the system table sentence, the name includes the user name of the synchronization manager and the operation object to be operated when the search configuration object is called, and the name is related to the full text search operation. Therefore, when the retrieval configuration object is called for full-text retrieval, the system table operation statement can be determined to generate information related to full-text retrieval, and the full-text retrieval operation statement calling ctx_ddl can be restored by using the information.
By way of example, in the statement of step 22,
SQL>select * from ctxsys.DR$PREFERENCE where rowid='AAANh4AACAAACVPAAD';
PRE_ID PRE_OWNER# PRE_NAMEPRE_OBJ_ID PRE_CLA_ID PRE_VALID
1064293 CTFS_LEXER46N
CTFS _ LEXER is the name of the operation object to be operated when the search configuration object is called, wherein CTFS is the user name of the synchronization manager, LEXER is the operation object to be operated when the search configuration object is called, which is the same as ctfs _ lexer in the example in step 21.
And step 24, when the DML operation information in the modification log is updated, searching the operation statement of the system table in the trace log file.
Specifically, when DML operation information is added to the modification log, a system table operation statement is looked up in the trace log file. When the DML operation statement in the modification log redox is increased, it indicates that a change operation is performed on the database, for example, a data change operation such as insertion, modification, deletion, etc., and at this time, a database synchronization program needs to be started to synchronize the modified content of the database to the database at the target end, where the database may also perform a full-text search operation, and if so, the related operation of the full-text search operation may also be synchronized to the target end.
Step 25, when the system table operation sentence is found, it is determined whether the name of the operation object based on the user name of the current user exists in the system table operation sentence.
After the system table operation statement is obtained in the trace file, the name of the operation object based on the user name of the current user is searched in the system table operation statement, namely, when the current user uses the Oracle database to execute the full text retrieval function, the name of the operation object to be operated when the configuration object is retrieved is called, and the name is related to the user name of the current user as described in the steps.
If the name is not found, the fact that the database does not exist does not execute full text search is indicated, synchronization of the data is not needed, and synchronization of newly added DML operation information is needed. If the name is found, step 26 is performed.
And step 26, if the name is found, determining the operation type when the target call retrieval configuration object executes full-text retrieval according to the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user.
In this step, if the name is found, a system table operation sentence where the name is located may be obtained according to the name, and then, according to a correspondence between an operation type in the system table operation sentence and an operation type when the full text search is executed by the call search configuration object, an operation type when the full text search is executed by the target call search configuration object corresponding to the system table operation sentence where the name is located is obtained.
The corresponding relationship between the operation type in the operation statement of the system table and the operation type when the retrieval configuration object is called to execute full text retrieval can be a relationship mapping table.
And step 27, generating an operation statement to be synchronized when the current user calls the search configuration object to execute the full text search according to the operation type when the target calls the search configuration object to execute the full text search.
In this step, after the operation type is obtained, a corresponding operation sentence may be generated, that is, the operation sentence when the retrieval configuration object is invoked to perform full text retrieval is restored. For example, in the above example, the target calls the operation type create_reference when the search configuration object performs full-text search, and the operation statement to be synchronized obtained by restoration is ctx_ddl. For example, if other operation types can be restored to obtain operation statements to be synchronized, such as ctx_ddl.create_index_set、ctx_ddl.drop_index_set、begin ctx_ddl.add_index、ctx_ddl.remove_index、ctx_ddl.drop_shadow_index、ctx_ddl.drop_policy, the statements indicate corresponding operations when the retrieval configuration object is called to execute full-text retrieval.
And step 28, sending the operation statement to be synchronized to the target end to complete synchronization.
As shown in fig. 2, a third aspect of the embodiment of the present invention provides an Oracle database full-text retrieval statement restoration synchronization device, including:
An execution module 31, configured to invoke a search configuration object to execute full-text search for a preset search target on a database in a synchronization manager mode;
A first obtaining module 32, configured to obtain a system table operation sentence in response to the full text retrieval completion instruction;
A first determining module 33, configured to analyze the system table operation statement to determine that a name of an operation object to be operated when the search configuration object is called exists in the system table operation statement, where the name of the operation object is created based on a user name of the synchronization manager;
A searching module 34, configured to search the trace log file for a system table operation statement when the DML operation information in the modification log is updated;
a second obtaining module 35, configured to obtain, when the system table operation sentence is found, a name of an operation object based on a user name of a current user;
a second determining module 36, configured to determine, according to an operation type in the system table operation sentence corresponding to the name of the operation object based on the user name of the current user, an operation sentence to be synchronized when the full text search is performed based on the current user invoking the search configuration object;
And the sending module 37 is used for sending the operation statement to be synchronized to the target end.
In one embodiment of the present invention, in response to a full text retrieval completion instruction, obtaining a system table operation statement includes:
Responding to a full text retrieval completion instruction, and acquiring a current tracking log file;
And analyzing the current tracking log file to obtain the operation statement of the system table.
In one embodiment of the present invention, when the DML operation information in the modification log is updated, the system table operation statement is looked up in the trace log file, including:
When DML operation information is added in the modification log, the operation statement of the system table is searched in the trace log file.
In one embodiment of the present invention, determining an operation sentence to be synchronized when performing full text retrieval based on a retrieval configuration object called by a current user according to an operation type in a system table operation sentence corresponding to a name of the operation object based on a user name of the current user includes:
determining the operation type of the target call retrieval configuration object when the full text retrieval is executed according to the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user;
and generating an operation statement to be synchronized when the current user calls the search configuration object to execute the full text search according to the operation type when the target calls the search configuration object to execute the full text search.
A fourth aspect of the embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the above-mentioned method for restoring and synchronizing full-text search sentences in an Oracle database according to the embodiment of the present invention when executing the program.
The fifth aspect of the embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements the steps of the method for restoring and synchronizing full-text search sentences in an Oracle database provided by the embodiment of the present invention.
The Memory may include random access Memory (Random Access Memory, RAM) or Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor including a central Processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc., or may be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware system.
The method provided by the embodiment of the invention can be applied to electronic equipment. Specifically, the electronic device may be a desktop computer, a portable computer, an intelligent mobile terminal, a server, or the like. Any electronic device capable of implementing the present invention is not limited herein, and falls within the scope of the present invention.
For the apparatus/electronics embodiments, the description is relatively simple as it is substantially similar to the method embodiments, with reference to the description of the method embodiments in part.
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 will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1.一种Oracle数据库全文检索语句还原同步方法,其特征在于,应用于源端,包括以下步骤:1. A method for restoring and synchronizing a full-text search statement of an Oracle database, characterized in that it is applied to a source end and comprises the following steps: 在同步管理员模式下调用检索配置对象对数据库执行针对预设检索目标的全文检索;In synchronous administrator mode, call the search configuration object to perform a full-text search on the database for the preset search target; 响应于全文检索完成指令,获取系统表操作语句;In response to the full-text search completion instruction, obtaining a system table operation statement; 对所述系统表操作语句进行分析,以确定所述系统表操作语句中存在调用检索配置对象时所要操作的操作对象的名称;其中,所述操作对象的名称基于所述同步管理员的用户名创建;Analyze the system table operation statement to determine the name of the operation object to be operated when calling the retrieval configuration object in the system table operation statement; wherein the name of the operation object is created based on the user name of the synchronization administrator; 当修改日志中的DML操作信息更新时,在跟踪日志文件中查找系统表操作语句;When the DML operation information in the modification log is updated, the system table operation statement is searched in the tracking log file; 当查找到系统表操作语句时,获取基于当前用户的用户名的操作对象的名称;When a system table operation statement is found, the name of the operation object based on the user name of the current user is obtained; 根据所述基于当前用户的用户名的操作对象的名称对应的所述系统表操作语句中的操作类型,确定基于当前用户调用检索配置对象执行全文检索时的待同步操作语句;Determine, according to the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user, the operation statement to be synchronized when the current user calls the search configuration object to perform a full-text search; 将所述待同步操作语句发送至目标端。The to-be-synchronized operation statement is sent to the target end. 2.如权利要求1所述的方法,其特征在于,所述响应于全文检索完成指令,获取系统表操作语句,包括:2. The method according to claim 1, wherein the step of obtaining a system table operation statement in response to a full-text search completion instruction comprises: 响应于全文检索完成指令,获取当前跟踪日志文件;In response to the full-text search completion instruction, obtaining the current tracking log file; 解析所述当前跟踪日志文件,获取系统表操作语句。The current tracking log file is parsed to obtain system table operation statements. 3.如权利要求1所述的方法,其特征在于,所述当修改日志中的DML操作信息更新时,在跟踪日志文件中查找系统表操作语句,包括:3. The method according to claim 1, wherein when the DML operation information in the modification log is updated, searching the system table operation statement in the tracking log file comprises: 当修改日志中增加DML操作信息时,在跟踪日志文件中查找系统表操作语句。When DML operation information is added to the modification log, the system table operation statement is searched in the tracking log file. 4.如权利要求1所述的方法,其特征在于,所述根据所述基于当前用户的用户名的操作对象的名称对应的所述系统表操作语句中的操作类型,确定基于当前用户调用检索配置对象执行全文检索时的待同步操作语句,包括:4. The method according to claim 1, characterized in that the step of determining the operation statement to be synchronized when the current user calls the search configuration object to perform a full-text search based on the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user comprises: 根据所述基于当前用户的用户名的操作对象的名称对应的所述系统表操作语句中的操作类型,确定目标调用检索配置对象执行全文检索时的操作类型;Determine the operation type when the target calls the search configuration object to perform full-text search according to the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user; 根据所述目标调用检索配置对象执行全文检索时的操作类型,生成当前用户调用检索配置对象执行全文检索时的待同步操作语句。According to the operation type when the target calls the retrieval configuration object to perform full-text retrieval, an operation statement to be synchronized when the current user calls the retrieval configuration object to perform full-text retrieval is generated. 5.一种Oracle数据库全文检索语句还原同步装置,其特征在于,包括:5. An Oracle database full-text search statement restoration synchronization device, characterized by comprising: 执行模块,用于在同步管理员模式下调用检索配置对象对数据库执行针对预设检索目标的全文检索;An execution module, used to call the search configuration object in the synchronous administrator mode to perform a full-text search on the database for a preset search target; 第一获取模块,用于响应于全文检索完成指令,获取系统表操作语句;A first acquisition module, for acquiring a system table operation statement in response to a full-text search completion instruction; 第一确定模块,用于对所述系统表操作语句进行分析,以确定所述系统表操作语句中存在调用检索配置对象时所要操作的操作对象的名称;其中,所述操作对象的名称基于所述同步管理员的用户名创建;A first determination module is used to analyze the system table operation statement to determine the name of the operation object to be operated when calling the retrieval configuration object in the system table operation statement; wherein the name of the operation object is created based on the user name of the synchronization administrator; 查找模块,用于当修改日志中的DML操作信息更新时,在跟踪日志文件中查找系统表操作语句;A search module is used to search for system table operation statements in the tracking log file when the DML operation information in the modification log is updated; 第二获取模块,用于当查找到系统表操作语句时,获取基于当前用户的用户名的操作对象的名称;The second acquisition module is used to acquire the name of the operation object based on the user name of the current user when the system table operation statement is found; 第二确定模块,用于根据所述基于当前用户的用户名的操作对象的名称对应的所述系统表操作语句中的操作类型,确定基于当前用户调用检索配置对象执行全文检索时的待同步操作语句;A second determination module is used to determine the operation statement to be synchronized when the current user calls the search configuration object to perform full-text search according to the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user; 发送模块,用于将所述待同步操作语句发送至目标端。The sending module is used to send the operation statement to be synchronized to the target end. 6.如权利要求5所述的装置,其特征在于,所述响应于全文检索完成指令,获取系统表操作语句,包括:6. The device according to claim 5, wherein the step of obtaining a system table operation statement in response to the full-text search completion instruction comprises: 响应于全文检索完成指令,获取当前跟踪日志文件;In response to the full-text search completion instruction, obtaining the current tracking log file; 解析所述当前跟踪日志文件,获取系统表操作语句。The current tracking log file is parsed to obtain system table operation statements. 7.如权利要求5所述的装置,其特征在于,所述当修改日志中的DML操作信息更新时,在跟踪日志文件中查找系统表操作语句,包括:7. The device according to claim 5, wherein when the DML operation information in the modification log is updated, searching the system table operation statement in the tracking log file comprises: 当修改日志中增加DML操作信息时,在跟踪日志文件中查找系统表操作语句。When DML operation information is added to the modification log, the system table operation statement is searched in the tracking log file. 8.如权利要求5所述的装置,其特征在于,所述根据所述基于当前用户的用户名的操作对象的名称对应的所述系统表操作语句中的操作类型,确定基于当前用户调用检索配置对象执行全文检索时的待同步操作语句,包括:8. The device according to claim 5, characterized in that the step of determining the operation statement to be synchronized when the current user calls the search configuration object to perform a full-text search based on the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user comprises: 根据所述基于当前用户的用户名的操作对象的名称对应的所述系统表操作语句中的操作类型,确定目标调用检索配置对象执行全文检索时的操作类型;Determine the operation type when the target calls the search configuration object to perform full-text search according to the operation type in the system table operation statement corresponding to the name of the operation object based on the user name of the current user; 根据所述目标调用检索配置对象执行全文检索时的操作类型,生成当前用户调用检索配置对象执行全文检索时的待同步操作语句。According to the operation type when the target calls the retrieval configuration object to perform full-text retrieval, an operation statement to be synchronized when the current user calls the retrieval configuration object to perform full-text retrieval is generated. 9.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1至4任一项所述的Oracle数据库全文检索语句还原同步方法。9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the Oracle database full-text search statement restoration and synchronization method as described in any one of claims 1 to 4 is implemented. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至4中任一项所述的Oracle数据库全文检索语句还原同步方法。10. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the Oracle database full-text search statement restoration and synchronization method according to any one of claims 1 to 4 is implemented.
CN202510322390.2A 2025-03-19 2025-03-19 Oracle database full-text retrieval statement restoration synchronization method and device Active CN119862194B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510322390.2A CN119862194B (en) 2025-03-19 2025-03-19 Oracle database full-text retrieval statement restoration synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510322390.2A CN119862194B (en) 2025-03-19 2025-03-19 Oracle database full-text retrieval statement restoration synchronization method and device

Publications (2)

Publication Number Publication Date
CN119862194A true CN119862194A (en) 2025-04-22
CN119862194B CN119862194B (en) 2025-07-18

Family

ID=95392200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510322390.2A Active CN119862194B (en) 2025-03-19 2025-03-19 Oracle database full-text retrieval statement restoration synchronization method and device

Country Status (1)

Country Link
CN (1) CN119862194B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120030172A1 (en) * 2010-07-27 2012-02-02 Oracle International Corporation Mysql database heterogeneous log based replication
EP2891994A1 (en) * 2013-11-04 2015-07-08 Guangdong Electronics Industry Institute Ltd. Method for achieving automatic synchronization of multisource heterogeneous data resources
CN109656934A (en) * 2018-11-19 2019-04-19 武汉达梦数据库有限公司 Source oracle database DDL synchronous method and equipment based on log parsing
CN113792094A (en) * 2021-08-26 2021-12-14 广东电网有限责任公司 Data synchronization system, method, device and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120030172A1 (en) * 2010-07-27 2012-02-02 Oracle International Corporation Mysql database heterogeneous log based replication
EP2891994A1 (en) * 2013-11-04 2015-07-08 Guangdong Electronics Industry Institute Ltd. Method for achieving automatic synchronization of multisource heterogeneous data resources
CN109656934A (en) * 2018-11-19 2019-04-19 武汉达梦数据库有限公司 Source oracle database DDL synchronous method and equipment based on log parsing
CN113792094A (en) * 2021-08-26 2021-12-14 广东电网有限责任公司 Data synchronization system, method, device and medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
孙燕: "异构数据库数据同步的关键技术研究", 中国优秀硕士学位论文全文数据库 (信息科技辑), no. 2017, 15 February 2017 (2017-02-15), pages 138 - 2477 *
常俊超;: "基于Oracle Data Guard的数据灾备系统设计和实现", 河南水利与南水北调, no. 06, 20 June 2010 (2010-06-20), pages 128 - 130 *
王伟平;王子卿;: "Oracle用户SQL会话还原方法研究", 计算机工程与应用, no. 12, 21 April 2008 (2008-04-21), pages 158 - 160 *
秦森;杨艳;: "基于Oracle日志分析的数据还原操作的设计及实现", 电脑知识与技术(学术交流), no. 03, 28 February 2007 (2007-02-28), pages 44 - 46 *

Also Published As

Publication number Publication date
CN119862194B (en) 2025-07-18

Similar Documents

Publication Publication Date Title
CN108920698B (en) A data synchronization method, device, system, medium and electronic device
CN109829011B (en) Data synchronization method and device for distributed heterogeneous database
CN112286557B (en) Method and device for updating code content in non-coverage mode
WO2020207010A1 (en) Data backup method and device, and computer-readable storage medium
US20100082630A1 (en) Persisting external index data in a database
CN108205560B (en) Data synchronization method and device
US10303469B1 (en) Commit graph generation
CN111177165B (en) Method, device and device for data consistency detection
CN111538651B (en) Interface testing method, device, server and storage medium
CN111176887A (en) MySQL misoperation rollback method, equipment and system
CN111753141B (en) Data management method and related equipment
CN106648994B (en) A method, device and system for backing up operation logs
CN111046106A (en) Cache data synchronization method, device, device and medium
CN111651296A (en) Intercept backup method, device, device and storage medium for data deletion operation
CN112199443B (en) Data synchronization method and device, computer equipment and storage medium
CN102456051A (en) Method and device for importing/exporting data of database
US9922100B2 (en) Systems and methods for facilitating the development of an application that accesses data
CN106155832A (en) Method, device and the Android device that a kind of data are recovered
WO2019161620A1 (en) Application dependency update method, terminal and device, and storage medium
CN116775727B (en) Data delay statistics method, device, equipment and storage medium
CN107729541A (en) A kind of data processing method, device and computer-readable recording medium
CN118296076A (en) Data synchronization method, device, equipment and storage medium
CN114625751B (en) Data traceability query method and device based on blockchain
CN114637762A (en) A method, device and electronic device for generating an operation record
US11023449B2 (en) Method and system to search logs that contain a massive number of entries

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