Oracle Database Full-Text Retrieval Statement Restoration and Synchronization Method and Device

By calling the search configuration object in the Oracle database and analyzing the system table operation statements, the problem of the inability to synchronize the full-text search statements is solved, and the data synchronization of the full-text search operation statements is realized to ensure the integrity of the backup data.

CN119862194BActive Publication Date: 2025-07-18DISJIE (BEIJING) DATA MANAGEMENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510322390.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-18
Estimated Expiration
2045-03-19

AI Technical Summary

Technical Problem

In the Oracle database disaster recovery system, the existing technology cannot synchronously backup the full-text search statements, resulting in incomplete backup data.

Method used

By calling the search configuration object in synchronous administrator mode to perform full-text search on the database, obtain the system table operation statement, analyze the name of the operation object, and find and restore the operation statement to be synchronized in the tracking log file, and send it to the target end.

Benefits of technology

It realizes synchronous backup of Oracle database full-text search statements, ensuring the integrity of the backup data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862194B_ABST
    Figure CN119862194B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for restoring and synchronizing full-text retrieval statements in an Oracle database, including: invoking a retrieval configuration object in the synchronization administrator mode to perform a full-text retrieval on the database for a preset retrieval target; obtaining system table operation statements; analyzing the system table operation statements; searching for the system table operation statements in a trace log file; when the system table operation statements are found, obtaining the name of the operation object based on the user name of the current user; determining the operation statements to be synchronized when invoking the retrieval configuration object to perform a full-text retrieval based on the current user according to the operation type in the system table operation statements; and sending the operation statements to be synchronized to the target end. The present invention can restore the operation statements of the full-text retrieval that need to be synchronized to complete the data synchronization of the full-text retrieval operation statements, ensuring 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of databases, and particularly to a method and device for restoring and synchronizing full-text retrieval statements in an Oracle database. Background Art

[0002] In the construction of a database disaster recovery system, establishing a primary and standby database architecture is a key measure to ensure business continuity and data security. The current system has realized the real-time synchronization of business data and DML (Data Manipulation Language) operation data, including data change operations such as insertion, modification, and deletion. These data can be synchronized from the primary database to the backup database in a timely manner, which to a certain extent guarantees the integrity and consistency of the data in the primary and standby databases. However, for the Oracle database, its full-text retrieval function is a powerful text search tool, and the full-text retrieval method is implemented by calling the ctx_ddl object. However, for database users, the operation statements for calling the ctx_ddl object cannot be directly obtained from the change log. When synchronizing data in the Oracle database, the full-text retrieval statements cannot be synchronized and backed up, resulting in incomplete backup data. Summary of the Invention

[0003] To solve the above problems existing in the prior art, the present invention provides a method and device for restoring and synchronizing full-text retrieval statements in an Oracle database. The technical problems to be solved by the present invention are realized through the following technical solutions:

[0004] The first aspect of the embodiment of the present invention provides a method for restoring and synchronizing full-text retrieval statements in an Oracle database, including the following steps:

[0005] A method for restoring and synchronizing full-text retrieval statements in an Oracle database, applied to a source end, includes the following steps:

[0006] Call a retrieval configuration object in the synchronization administrator mode to perform a full-text retrieval on the database for a preset retrieval target;

[0007] In response to the completion instruction of the full-text retrieval, obtain the system table operation statement;

[0008] 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;

[0009] When the DML operation information in the change log is updated, search for the system table operation statement in the trace log file;

[0010] When a system table operation statement is found, obtain the name of the operation object based on the user name of the current user;

[0011] Determine the operation statement to be synchronized when the full-text search is performed by calling the retrieval configuration object based on the current user 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;

[0012] Send the operation statement to be synchronized to the target end.

[0013] In an embodiment of the present invention, the obtaining the system table operation statement in response to the full-text search completion instruction includes:

[0014] In response to the full-text search completion instruction, obtain the current trace log file;

[0015] Parse the current trace log file to obtain the system table operation statement.

[0016] In an embodiment of the present invention, the searching for the system table operation statement in the trace log file when the DML operation information in the modification log is updated includes:

[0017] When DML operation information is added to the modification log, search for the system table operation statement in the trace log file.

[0018] In an embodiment of the present invention, the determining the operation statement to be synchronized when the full-text search is performed by calling the retrieval configuration object based on the current user 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 includes:

[0019] Determine the operation type when the full-text search is performed by calling the target retrieval configuration object 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;

[0020] Generate the operation statement to be synchronized when the full-text search is performed by calling the retrieval configuration object based on the current user according to the operation type when the full-text search is performed by calling the target retrieval configuration object.

[0021] A second aspect of the embodiments of the present invention provides an Oracle database full-text search statement restoration and synchronization device, including:

[0022] An execution module, configured to call a retrieval configuration object to perform a full-text search on the database for a preset retrieval target in the synchronization administrator mode;

[0023] A first obtaining module, configured to obtain a system table operation statement in response to a full-text search completion instruction;

[0024] The first determination module is configured to analyze the system table operation statement to determine the name of the operation object to be operated when retrieving the configuration object, where the name of the operation object is created based on the user name of the synchronization administrator;

[0025] The search module is configured to search for the system table operation statement in the trace log file when the DML operation information in the modification log is updated;

[0026] The second acquisition module is configured 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;

[0027] The second determination module is configured to determine the operation statement to be synchronized when the retrieval configuration object is called by the current user to perform a 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;

[0028] The sending module is configured to send the operation statement to be synchronized to the target end.

[0029] In an embodiment of the present invention, the obtaining the system table operation statement in response to the full-text retrieval completion instruction includes:

[0030] In response to the full-text retrieval completion instruction, obtain the current trace log file;

[0031] Parse the current trace log file to obtain the system table operation statement.

[0032] In an embodiment of the present invention, the searching for the system table operation statement in the trace log file when the DML operation information in the modification log is updated includes:

[0033] When the DML operation information is added to the modification log, search for the system table operation statement in the trace log file.

[0034] In an embodiment of the present invention, the determining the operation statement to be synchronized when the retrieval configuration object is called by the current user to perform a 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 includes:

[0035] Determine the operation type when the target retrieval configuration object performs a 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;

[0036] Generate the operation statement to be synchronized when the current user calls the retrieval configuration object to perform a full-text retrieval according to the operation type when the target retrieval configuration object performs a full-text retrieval.

[0037] A third aspect of the embodiments of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements an Oracle database full-text retrieval statement restoration and synchronization method provided by the first aspect of the embodiments of the present invention.

[0038] A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements an Oracle database full-text retrieval statement restoration and synchronization method provided by the first aspect of the embodiments of the present invention.

[0039] Advantages of the present invention:

[0040] By analyzing the system table operation statements, the present invention determines the name of the operation object that performs the operation when calling the retrieval configuration object in the system table operation statements. Furthermore, when it is necessary to synchronize the operation statements that call the retrieval configuration object to perform full-text retrieval, the operation type in the system table operation statements corresponding to the name of the operation object based on the user name of the current user is obtained from the system table operation statements. Then, the operation statements that call the retrieval configuration object to perform full-text retrieval and need to be synchronized can be restored, so that the operation statements can be synchronized to complete the data synchronization of the full-text retrieval operation statements, ensuring the integrity of the backup data.

[0041] Other features and advantages of the present invention will be described in the subsequent description. And, some of them will become obvious from the description, or be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the written description, claims, and drawings.

[0042] Next, through the drawings and embodiments, the technical solutions of the present invention will be further described in detail. Description of the Drawings

[0043] The drawings are used to provide a further understanding of the present invention, and constitute a part of the description. They are used to explain the present invention together with the embodiments of the present invention, and do not constitute a limitation to the present invention. In the drawings:

[0044] Figure 1 is a schematic flowchart of an Oracle database full-text retrieval statement restoration and synchronization method provided by an embodiment of the present invention;

[0045] Figure 2 is a schematic block diagram of an Oracle database full-text retrieval statement restoration and synchronization device provided by an embodiment of the present invention. Detailed Embodiments

[0046] The present invention will be further described in detail below in conjunction with specific embodiments, but the implementation manners of the present invention are not limited thereto.

[0047] As Figure 1 shown, in the first aspect of the embodiment of the present invention, a method for restoring and synchronizing full-text retrieval statements of an Oracle database is provided, which is applied to the source end and includes the following steps:

[0048] Step 11, in the synchronization administrator mode, call the retrieval configuration object to perform a full-text retrieval on the database for a preset retrieval target.

[0049] Step 12, in response to the completion instruction of the full-text retrieval, obtain the system table operation statement.

[0050] Step 13, 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.

[0051] Among them, the name of the operation object is created based on the user name of the synchronization administrator.

[0052] Step 14, when the DML operation information in the modification log is updated, search for the system table operation statement in the trace log file.

[0053] Step 15, when the system table operation statement is found, obtain the name of the operation object based on the user name of the current user.

[0054] Step 16, 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, determine the operation statement to be synchronized when calling the retrieval configuration object to perform a full-text retrieval based on the current user.

[0055] Step 17, send the operation statement to be synchronized to the target end.

[0056] In this embodiment, by analyzing the system table operation statement, the name of the operation object of the operation performed when calling the retrieval configuration object in the system table operation statement is determined. Furthermore, when it is necessary to synchronize the operation statement for calling the retrieval configuration object to perform a full-text retrieval, 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. Therefore, the operation statement for calling the retrieval configuration object to perform a full-text retrieval that needs to be synchronized can be restored, and thus this operation statement can be synchronized to complete the data synchronization of the full-text retrieval operation statement, ensuring the integrity of the backup data.

[0057] Based on the first aspect of the embodiments of the present invention, the second aspect of the embodiments of the present invention further elaborates on a method for restoring and synchronizing Oracle database full-text retrieval statements. The second aspect of the embodiments of the present invention provides a method for restoring and synchronizing Oracle database full-text retrieval statements, which is applied to the source end and includes the following steps:

[0058] Step 21, in the synchronization administrator mode, call the retrieval configuration object ctx_ddl to perform a full-text retrieval on the database for a preset retrieval target.

[0059] In this step, some of the operation statements in the operations performed by the Oracle database for the full-text retrieval function are associated with the user name. When performing the full-text retrieval in the synchronization administrator mode, the operation statements are associated with the user name of the synchronization administrator, so that the operation statements associated with the user name can be easily identified.

[0060] An example of the operation statement for calling ctx_ddl for full-text retrieval is exec ctx_ddl.create_preference('ctfs_lexer', 'chinese_vgram_lexer'). Among them, ctfs in 'ctfs_lexer' represents the user name of the user. However, this operation statement cannot be directly obtained from the redo log. The redo log is a log for recording data change DML operations such as insert, update, and delete on the database. The information of this operation statement needs to be restored through the method of this embodiment.

[0061] Step 22, in response to the full-text retrieval completion instruction, obtain the system table operation statement.

[0062] Specifically, in response to the full-text retrieval completion instruction, obtain the current trace log file; then parse the current trace log file to obtain the system table operation statement. The trace log file is a trace file. The trace file records the DML operation statements of the ctxsys.drXXX system tables (such as ctxsys.dr$index_set, ctxsys.dr$index_object, ctxsys.DR$PREFERENCE, etc.). By parsing the trace file, the system table operation statement can be obtained.

[0063] An example of a system table operation statement obtained is:

[0064] SQL>select * from ctxsys.DR$PREFERENCE where rowid='AAANh4AACAAACVPAAD';

[0065] PRE_ID PRE_OWNER# PRE_NAMEPRE_OBJ_ID PRE_CLA_ID PRE_VALID

[0066] 1064293 CTFS_LEXER46N

[0067] This operation indicates that when the database executes ctx_ddl.create_preference, a record is inserted into the DR$PREFERENCE table. Thus, it can be known that when performing full-text retrieval, the database will operate on system tables.

[0068] Step 23: Analyze the system table operation statement to determine the name of the operation object to be operated on when calling the retrieval configuration object in the system table operation statement.

[0069] Among them, the name of the operation object is created based on the username of the synchronization administrator.

[0070] In this step, search for and analyze the system table operation statement. There is a name in the system table statement that contains the username of the synchronization administrator and the operation object to be operated on when calling the retrieval configuration object. This name is related to the full-text retrieval operation. Therefore, it can be determined that when calling the retrieval configuration object for full-text retrieval, the system table operation statement can generate information related to full-text retrieval, and subsequent use of this information can restore the full-text retrieval operation statement for calling ctx_ddl.

[0071] For example, in the statement of Step 22,

[0072] SQL>select * from ctxsys.DR$PREFERENCE where rowid='AAANh4AACAAACVPAAD';

[0073] PRE_ID PRE_OWNER# PRE_NAMEPRE_OBJ_ID PRE_CLA_ID PRE_VALID

[0074] 1064293 CTFS_LEXER46N

[0075] CTFS_LEXER is also the name of the operation object to be operated on when calling the retrieval configuration object. Among them, CTFS is the username of the synchronization administrator, and LEXER is the operation object to be operated on when calling the retrieval configuration object, which is the same as ctfs_lexer in the example in Step 21.

[0076] Step 24, when the DML operation information in the modification log is updated, search for system table operation statements in the trace log file.

[0077] Specifically, when DML operation information is added to the modification log, search for system table operation statements in the trace log file. When the DML operation statements in the modification log redo are increased, it indicates that a change operation has been performed on the database, such as data change operations like insertion, modification, deletion, etc. At this time, it is necessary to start the database synchronization program to synchronize the modified content of the database to the target database. At this time, there is also a possibility that the database is performing a full-text search operation. If so, the relevant operations of the full-text search operation can also be synchronized to the target side.

[0078] Step 25, when the system table operation statements are found, determine whether there is a name of an operation object based on the username of the current user in the system table operation statements.

[0079] After obtaining the system table operation statements in the trace file, search for the name of the operation object based on the username of the current user in the system table operation statements. That is, when the current user uses the Oracle database to execute the full-text search function and calls the retrieval configuration object, the name of the operation object to be operated. As described in the above steps, this name is related to the username of the current user.

[0080] If the name is not found, it means that the database has not performed a full-text search and there is no need to synchronize this data. Just synchronize the newly added DML operation information. If the name is found, execute Step 26.

[0081] Step 26, if the name is found, determine the operation type when the target calls the retrieval configuration object to execute the full-text search according to the operation type in the system table operation statements corresponding to the name of the operation object based on the username of the current user.

[0082] In this step, if the name is found, the system table operation statements where the name is located can be obtained according to the name. Then, according to the correspondence between the operation type in the system table operation statements and the operation type when calling the retrieval configuration object to execute the full-text search, the operation type when the target calls the retrieval configuration object to execute the full-text search corresponding to the system table operation statements where the name is located can be obtained.

[0083] Among them, the correspondence between the operation type in the system table operation statements and the operation type when calling the retrieval configuration object to execute the full-text search can be a relationship mapping table.

[0084] Step 27, generate the operation statements to be synchronized when the current user calls the retrieval configuration object to execute the full-text search according to the operation type when the target calls the retrieval configuration object to execute the full-text search.

[0085] In this step, after obtaining the operation type, corresponding operation statements can be generated, that is, the operation statements when the retrieval configuration object is called to perform full-text retrieval are restored. For example, in the above example, the operation type create_preference when the target calls the retrieval configuration object to perform full-text retrieval, and the operation statement to be synchronized restored is ctx_ddl.create_preference. For example, if other operation types can restore 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, these statements indicate the corresponding operations when the retrieval configuration object is called to perform full-text retrieval.

[0086] Step 28, send the operation statement to be synchronized to the target end to complete the synchronization.

[0087] As Figure 2 shown, the third aspect of the embodiment of the present invention provides an Oracle database full-text retrieval statement restoration and synchronization device, including:

[0088] An execution module 31, configured to call a retrieval configuration object in the synchronization administrator mode to perform full-text retrieval on the database for a preset retrieval target;

[0089] A first acquisition module 32, configured to acquire system table operation statements in response to a full-text retrieval completion instruction;

[0090] A first determination module 33, configured to analyze the system table operation statements to determine the name of the operation object to be operated when the retrieval configuration object is called in the system table operation statements; wherein, the name of the operation object is created based on the user name of the synchronization administrator;

[0091] A search module 34, configured to search for system table operation statements in the trace log file when the DML operation information in the modification log is updated;

[0092] A second acquisition module 35, configured to acquire the name of the operation object based on the user name of the current user when the system table operation statements are found;

[0093] A second determination module 36, configured to determine the operation statement to be synchronized when the retrieval configuration object is called based on the current user according to the operation type in the system table operation statements corresponding to the name of the operation object based on the user name of the current user;

[0094] A sending module 37, configured to send the operation statement to be synchronized to the target end.

[0095] In an embodiment of the present invention, in response to a full-text retrieval completion instruction, obtaining a system table operation statement includes:

[0096] In response to a full-text retrieval completion instruction, obtaining the current trace log file;

[0097] Parsing the current trace log file to obtain a system table operation statement.

[0098] In an embodiment of the present invention, when the DML operation information in the modification log is updated, searching for a system table operation statement in the trace log file includes:

[0099] When DML operation information is added to the modification log, searching for a system table operation statement in the trace log file.

[0100] In an embodiment of the present invention, 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, determining the operation statement to be synchronized when the current user calls the retrieval configuration object to perform full-text retrieval includes:

[0101] 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, determining the operation type when the target calls the retrieval configuration object to perform full-text retrieval;

[0102] According to the operation type when the target calls the retrieval configuration object to perform full-text retrieval, generating the operation statement to be synchronized when the current user calls the retrieval configuration object to perform full-text retrieval.

[0103] A fourth aspect of the embodiments of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the Oracle database full-text retrieval statement restoration and synchronization method provided by the embodiments of the present invention.

[0104] A fifth aspect of the embodiments of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the Oracle database full-text retrieval statement restoration and synchronization method provided by the embodiments of the present invention.

[0105] Wherein, the memory may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0106] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware systems.

[0107] The method provided by the embodiments of the present invention can be applied to an electronic device. Specifically, the electronic device may be: a desktop computer, a portable computer, a smart mobile terminal, a server, etc. There is no limitation here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.

[0108] For the device / electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, please refer to the partial description of the method embodiments.

[0109] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0110] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the steps specified in one process or a plurality of processes and / or blocks Figure 1 one process or a plurality of processes and / or blocks Figure 1 steps for the functions specified in one block or a plurality of blocks.

[0112] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these changes and modifications.

Claims

1. A method for restoring and synchronizing full-text retrieval statements in an Oracle database, characterized in that, Applied to the source side, including the following steps: In the synchronization administrator mode, call the retrieval configuration object ctx_ddl to perform a full-text search on the database for a preset retrieval target; In response to the full-text search completion instruction, obtain the ctxsys 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 ctx_ddl in the system table operation statement; wherein, the name of the operation object is created based on the user name of the synchronization administrator; When the DML operation information in the modification log is updated, search for the system table operation statement in the trace log file trace; When the system table operation statement is found, obtain 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 corresponding to the name of the operation object based on the user name of the current user, determine the operation statement to be synchronized when calling the retrieval configuration object ctx_ddl to perform a full-text search based on the current user, including: 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, determine the operation type when calling the target retrieval configuration object ctx_ddl to perform a full-text search; According to the operation type when calling the target retrieval configuration object ctx_ddl to perform a full-text search, generate the operation statement to be synchronized when calling the retrieval configuration object ctx_ddl to perform a full-text search for the current user; Send the operation statement to be synchronized to the target side; The obtaining the system table operation statement in response to the full-text search completion instruction includes: In response to the full-text search completion instruction, obtain the current trace log file trace; Parse the current trace log file trace to obtain the system table operation statement.

2. The method according to claim 1, characterized in that, The searching for the system table operation statement in the trace log file trace when the DML operation information in the modification log is updated includes: When the DML operation information is added to the modification log, search for the system table operation statement in the trace log file trace.

3. An Oracle database full-text retrieval statement restoration and synchronization device, characterized in that, Including: An execution module for calling the retrieval configuration object ctx_ddl in the synchronization administrator mode to perform a full-text search on the database for a preset retrieval target; A first obtaining module for obtaining the ctxsys system table operation statement in response to the full-text search completion instruction; A first determination module for analyzing the system table operation statement to determine the name of the operation object to be operated when calling the retrieval configuration object ctx_ddl in the system table operation statement; wherein, the name of the operation object is created based on the user name of the synchronization administrator; A searching module for searching for the system table operation statement in the trace log file trace when the DML operation information in the modification log is updated; A second obtaining module for obtaining 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, configured to determine an operation statement to be synchronized when performing a full-text search by invoking a retrieval configuration object ctx_ddl based on the current user, 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, including: Determining the operation type when performing a full-text search by invoking a target retrieval configuration object ctx_ddl 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; Generating an operation statement to be synchronized when the current user invokes the retrieval configuration object ctx_ddl to perform a full-text search according to the operation type when the target retrieval configuration object ctx_ddl performs a full-text search; A sending module, configured to send the operation statement to be synchronized to a target end; The obtaining of the system table operation statement in response to a full-text search completion instruction includes: In response to a full-text search completion instruction, obtaining a current trace log file trace; Parsing the current trace log file trace to obtain a system table operation statement.

4. The device according to claim 3, characterized in that, The searching for a system table operation statement in the trace log file trace when the DML operation information in the modification log is updated includes: When DML operation information is added to the modification log, searching for a system table operation statement in the trace log file trace.

5. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, the Oracle database full-text retrieval statement restoration and synchronization method according to any one of claims 1 or 2 is implemented.

6. A computer-readable storage medium, having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the Oracle database full-text retrieval statement restoration and synchronization method according to any one of claims 1 or 2 is implemented.

Citation Information

Patent Citations

  • source end Oracle database DDL synchronization method and device based on log analysis

    CN109656934A