CN115174452A - Application migration method based on Oracle database protocol proxy - Google Patents

Application migration method based on Oracle database protocol proxy Download PDF

Info

Publication number
CN115174452A
CN115174452A CN202210765191.5A CN202210765191A CN115174452A CN 115174452 A CN115174452 A CN 115174452A CN 202210765191 A CN202210765191 A CN 202210765191A CN 115174452 A CN115174452 A CN 115174452A
Authority
CN
China
Prior art keywords
protocol
tns
database
oracle
agent program
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.)
Pending
Application number
CN202210765191.5A
Other languages
Chinese (zh)
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.)
TIANJIN SHENZHOU GENERAL DATA TECHNOLOGY CO LTD
Original Assignee
TIANJIN SHENZHOU GENERAL DATA 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 TIANJIN SHENZHOU GENERAL DATA TECHNOLOGY CO LTD filed Critical TIANJIN SHENZHOU GENERAL DATA TECHNOLOGY CO LTD
Priority to CN202210765191.5A priority Critical patent/CN115174452A/en
Publication of CN115174452A publication Critical patent/CN115174452A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • 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
    • G06F16/214Database migration support
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/289Object oriented databases
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

The invention relates to an application transplanting method based on an Oracle database protocol agent, which is technically characterized by comprising the following steps: intercepting and monitoring the original Oracle network by using a TNS protocol agent program; establishing connection between an application and a TNS protocol agent program, connection between the TNS protocol agent program and a Shentong database and mapping relation of the two connections; the application client side carries out authentication and authorization through a TNS protocol agent program; after authentication and authorization, the TNS protocol agent program analyzes the data packet sent by the application client and forwards the data packet to the Shentong database for processing, and the processing result is sent to the Oracle driver through the TNS protocol agent program after the Shentong database is processed. The invention adopts a protocol mode of translating and converting the communication protocol into the Shentong database, effectively solves the problem that the source code of the application system is not easy to transplant, and the application system developed by any language can access the Shentong database, thereby improving the development efficiency, reducing the development difficulty and expanding the application range.

Description

Application migration method based on Oracle database protocol proxy
Technical Field
The invention belongs to the technical field of databases, and particularly relates to an application migration method based on an Oracle database protocol proxy.
Background
Oracle is widely used as a common database. When an Oracle-based application system wants to replace a database management system to replace a shentong database management system, developers are usually required to use source codes of the application system to refer to a drive of the shentong database and modify a connection string for connecting the database, so that the application system can complete the switching of the database.
In the actual replacement process, if the source code of the application system cannot be found, the substitution and transplantation of the Shentong database are difficult to complete, because the system application adopts the drive of the Oracle database system, the drive can only interact with the Oracle database and cannot interact with the Shentong database, and under the condition, a user can not develop software again, and no technology can be used for realizing application access to the Shentong database at present. In addition, since Oracle has various application system development languages, such as C,. Net and oledb programming languages, this situation also causes inconvenience to the system replacement work.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide an application transplanting method based on an Oracle database protocol agent to realize the interaction function of an Oracle application system and a Shentong database management system.
The invention solves the technical problems in the prior art by adopting the following technical scheme:
an application migration method based on an Oracle database protocol proxy comprises the following steps:
step 1, intercepting and monitoring an original Oracle network by using a TNS protocol agent program;
step 2, establishing the connection between the application and the TNS protocol agent program, the connection between the TNS protocol agent program and the Shentong database and the mapping relation of the two connections;
step 3, the application client side carries out authentication and authorization through a TNS protocol agent program;
and 4, after authentication and authorization, the TNS protocol agent program analyzes the data packet sent by the application client and forwards the data packet to the Shentong database for processing, and the processing result is sent to the Oracle driver through the TNS protocol agent program after the Shentong database is processed.
Further, the specific implementation method of step 1 is as follows: the TNS protocol agent program intercepts the original Oracle network, uses a port of application access database to create a TCP network service end, and uses the port to create a TCP network service, and monitors the request of the application on the port.
Further, the specific implementation method of step 2 is as follows: after the application is started, the Oracle driver uses a port of the application access database to establish a network connection, and the application connection is entered into a TNS protocol agent program; and establishing a network connection between the TNS protocol agent program and the Shentong database, and mapping the connection between the application and the TNS protocol agent program and the connection between the TNS protocol agent program and the Shentong database one by one.
Further, in the implementation process of step 2, the method includes a negotiation stage, in the negotiation stage, when data information exchange is performed, the client sends the detailed version information to the TNS protocol agent program, and the TNS protocol agent program sends the adopted network protocol, the coding character set, the time zone and the database version to the application client after analysis.
Further, the step 3 authentication authorization comprises an osension protocol phase and an OAUTH protocol phase; processing key value pair information sent by a client side at the OSESSION protocol stage, and generating encryption condition information through the key value pair information; and the OAUTH protocol stage further acquires key login information of the user, and the TNS protocol agent program further decrypts data for authentication and responds to the application client.
Further, the processing of the key-value pair information sent by the client in the osesson protocol phase includes: user login information, user name information, client program name information, client machine information and program process ID information; the key user login information acquired in the OAUTH protocol stage comprises: the user secure login PASSWORDs AUTH _ PASSWORD, AUTH _ SESSKEY and AUTH _ PBKDF2_ SPEED _ KEY.
Further, the specific implementation method of step 4 is as follows: after user authentication and authorization, when a data packet sent by a client driver is received, the data packet follows a data packet header, a data packet protocol type identifier and a data packet data information format, and a TNS protocol agent program identifies the type of each data packet and analyzes the information of each data packet; and the protocol of the Shentong database is forwarded to the Shentong database for processing, the Shentong database returns a result to the TNS protocol agent program after processing, and the TNS protocol agent program analyzes the result data into a result set data form of the Oracle network protocol and sends the result set data form to the Oracle driver after receiving the response result.
Further, the TNS network protocol parsed by the TNS protocol agent includes: the protocol package resets the network connection protocol, continues receive flag protocol, interrupt connection protocol, cancel operation protocol, block protocol, close protocol, description protocol, indicator protocol, execute protocol, re-execute protocol, FETCH protocol package, large object protocol, release large object protocol, session protocol, release Session protocol, session state protocol, switch Session protocol, version information protocol, logout protocol, open transaction protocol, transaction commit protocol, transaction rollback protocol, notify protocol, and network ping protocol.
Further, the TNS protocol agent is a multithreading background service, which uses a thread pool technique to process multi-user requests, and the specific method is as follows: the TNS protocol agent program starts a monitoring network Socket port to receive user connection requests of a plurality of clients, starts a background thread to process the requests for receiving the user connection, and creates a thread pool work item task for each connection to process the connected logic after receiving the user connection.
The invention has the advantages and positive effects that:
the invention analyzes the network communication protocol between the Oracle database driver and the Oracle database, translates and converts the communication protocol into a protocol mode between the Oracle database driver and the Oracle database, realizes the interaction capacity between the application system and the Shentong database management system through the TNS protocol Agent program (TNS-Agent), effectively solves the problem that the source code of the application system is difficult to transplant, can cross-develop the language types, and the application system developed by any language can access the Shentong database, thereby improving the development efficiency, reducing the development difficulty and expanding the application range.
Drawings
FIG. 1 is a schematic diagram of the TNS-Agent application of the present invention;
FIG. 2 is a mapping between an Oracle driver, TNS-Agent, and a Shentong database;
FIG. 3 is an Oracle protocol flow diagram:
FIG. 4 is a flow chart of the TNS-Agent protocol of the present invention;
FIG. 5 is a diagram of the connection between the Oracle driver and the TNS-Agent and the connection between the TNS-Agent and the Shentong database;
FIG. 6 is a flow chart of an SQL statement execution query sent by an embodiment of the present invention;
FIG. 7 is a data packet of SELECT _ FROM DOTNET _ TAB _ TEST for an Oracle driver executing an SQL statement;
FIG. 8 is the data packet data obtained by parsing the SQL statement by the TNS-Agent;
FIG. 9 is the Shentong database data obtained after parsing;
FIG. 10 is Oracle TNS protocol response network data constructed by the TNS-Agent from the Shentong database data;
FIG. 11 is header information of Oracle TNS protocol response network data;
FIG. 12 is a depiction of Oracle TNS protocol response network data;
FIG. 13 is RowHeader information for the Oracle TNS protocol response network data;
FIG. 14 is a row data packet of the Oracle TNS protocol response network data;
FIG. 15 is an RPA packet of Oracle TNS protocol response network data;
FIG. 16 is an error message for the Oracle TNS protocol in response to network data;
FIG. 17 is a data description information of a data format parsed from a data stream by the TNS-Agent service
Fig. 18 is data value information of a data format parsed from a data stream by the TNS-Agent service;
fig. 19 is a flow diagram of TNS-Agent multithreading processing multi-user requests.
Detailed Description
The following describes embodiments of the present invention in detail with reference to the accompanying drawings.
The design idea of the invention is as follows: by analyzing the network communication protocol between the Oracle database driver and the Oracle database and analyzing the communication content, the communication protocol is translated and converted into a protocol mode between the Oracle database driver and the Oracle database, so that the interaction capacity between the application system and the Shentong database management system is achieved, the Oracle application system is changed into the Shentong database management system, the types of languages developed in a cross-application mode can be used, and the Shentong database can be accessed by the application system developed in any language.
In the present invention, a procedure for translating and forwarding a communication protocol between an Oracle driver and a database is called a TNS protocol Agent (TNS-Agent). As shown in fig. 1, the TNS protocol Agent (TNS-Agent) is able to receive, parse, forward Oracle protocol and convert application system conditions into a protocol for accessing the database of the courtesy.
The TNS protocol Agent (TNS-Agent) has the following functions:
(1) The application system is not modified, the application system is driven by Oracle (such as JDBC, ODBC, OCI and OleDB), but the application operation is forwarded to the Shentong database;
(2) The TNS-Agent can be used as a service and can receive a database request of any language type application system;
(3) The TNS-Agent performs thread-level one-to-one mapping of the application system to the connections (sessions) in the Oracle database, as shown in fig. 2.
By analyzing the difference between the Oracle protocol flow (as shown in FIG. 3) and the TNS-Agent protocol flow (as shown in FIG. 4), the main work of the TNS-Agent can be clearly understood. As can be seen from the TNS-Agent protocol flow chart, the TNS-Agent and the Shentong database completely replace an Oracle database, and a user can continuously use an Oracle driver to access and operate the Shentong database, so that the migration cost is greatly reduced for the user.
The TNS-Agent program transmits the database request driven by Oracle for the application program to the Shentong database, and the main work content is as follows:
(1) Transfer authentication (database connection) of a database user;
(2) Forwarding the database adding, deleting, modifying and checking operation;
(3) The analysis and forwarding of an Oracle specific execution plan and a cursor are supported;
(4) The method supports the operations of increasing, deleting, modifying and checking numerical values, characters, time, timestamps, binary systems and large object data;
(5) Concurrent operations are supported, and concurrent user operations are isolated from each other;
based on the above description, the present invention provides an application migration method based on an Oracle database protocol proxy, which comprises the following steps:
step 1, a TNS protocol Agent program (TNS-Agent) intercepts and monitors the original Oracle network.
In this step, the TNS-Agent needs to intercept the original Oracle network, so the TNS-Agent may use a port through which the application accesses the database to create a TCP network service end, for example, the port of the Oracle database is 1521, and the TNS-Agent also uses 1521 to create a TCP network service to monitor the request of the application on the 1521 port.
And 2, establishing connection between the application and the TNS-Agent and connection between the TNS-Agent and the Shentong database, and mapping the connection relation of the application and the TNS-Agent to one.
After the application is started, the Oracle driver establishes a network connection (Oracle Session connection) with the 1521 port, and at this time, the application connection enters the TNS-Agent program. At the moment, a network connection (Shentong Session connection) is also established between the TNS-Agent and the Shentong database, and the connection between the application and the TNS-Agent and the connection between the TNS-Agent and the Shentong database are in one-to-one mapping relation.
Because the interaction between the Oracle driver and the database is completed through connection, the driver can acquire the database version number and the server can acquire the version number of the driver in the process of establishing one connection. The purpose of this stage is mainly to detect whether the client and the server are compatible with the version protocol, for example, the database version does not support the network protocol driving the version too old, and the server cannot find a suitable network protocol and cannot create a network connection. This stage is called negotiation stage (new), after an initial connection is established, the Oracle driver and the TNS-Agent (database) exchange data information, for example, the client sends the detailed version information to the TNS-Agent and the TNS-Agent (after analysis, the network protocol, the code character set, the time zone, the detailed database version and other information are sent to the driver client together).
Part of data (such as a database version and the like) returned by the TNS-Agent to the Oracle driver are analog fixed values, and the values can be correctly identified by the Oracle driver, so that the Oracle driver can return a normal state to an application system, and the aim of correctly establishing network connection is fulfilled.
And 3, the application client performs authentication and authorization through the TNS protocol agent program.
After the Oracle driver completes the establishment of the initialization connection and the negotiation of the client server information, the Oracle driver starts to perform security authentication to ensure the security of the connection, the user identity is usually confirmed in a user and password mode, after the connection security is authenticated, the TNS-Agent authorizes the connection to be a safe and effective connection, then the connection can exchange data between the driver and a database in the following data transmission process, meanwhile, the TNS-Agent establishes a security connection communicated with the Shentong database, the security connection is used for data interaction between the TNS-Agent and the Shentong database, and meanwhile, the two connections are in one-to-one correspondence relation.
As shown in fig. 5, the connection (connection 1) between the Oracle driver and the TNS-Agent and the direct connection (connection 2) between the TNS-Agent and the shentong database jointly form a request context (RequestContext) object, and the TNS-Agent can perform a complete data request and response through the management request context (RequestContext) object.
Authentication and authorization are divided into osension and OAUTH protocol phases. The osension protocol stage processes key-value pair information (including user login information, user name information, client program name information, client machine information, program process ID information) sent by the client, and generates encryption condition information through the information, such as (AUTH _ VFR _ DATA, AUTH _ sessky, AUTH _ PBKDF2_ CSK _ SALT, AUTH _ PBKDF2_ VGEN _ COUNT, AUTH _ PBKDF2_ SDER _ COUNT, AUTH _ global _ UNIQUE _ DBID); the OAUTH protocol stage further acquires KEY login information of the user (such as a user security login PASSWORD AUTH _ PASSWORD, AUTH _ SESSKEY, AUTH _ PBKDF2_ SPEEDY _ KEY and the like), and the TNS-Agent further decrypts the data for authentication and responds to the client information AUTH _ SVR _ RESPONSE value. The two processes involve the technologies of code conversion, AES symmetric encryption and decryption, rfc2898 encryption and decryption and the like.
And 4, after authentication and authorization, the TNS protocol agent program analyzes the data packet sent by the client, forwards the data packet to the Shentong database for processing through the protocol of the Shentong database, returns the result to the TNS protocol agent program after the Shentong database is processed, analyzes the result data into a result set data form of the Oracle network protocol, and sends the result set data form to the Oracle driver.
In this step, after receiving the data packet sent by the client driver, the TNS-Agent follows the format of (packet header, packet protocol type identifier, packet data information), so that the TNS-Agent can identify the type of each data packet and can parse the information of each data packet.
After the TNS-Agent analyzes each data packet, the analyzed data is analyzed and then forwarded to the database for processing through the protocol of the Shentong database, the result is returned to the TNS-Agent after the database is processed, and after the TNS-Agent receives the response result, the result data is analyzed into a result set data form of an Oracle network protocol and sent to an Oracle driver, so that a simple execution flow is completed.
The table below shows the TNS network protocol package mainly analyzed by the shentong TNS-Agent service.
Figure BDA0003725184290000051
Figure BDA0003725184290000061
Next by way of example: the flow of how the TNS-Agent processes a simple SQL statement execution query sent by an application is shown in fig. 6.
The TNS-Agent parses the data packet ((1) in FIG. 6), and parses the data packet in the network stream into structured data, so that the TNS-Agent service can analyze the operation executed by the Oracle driver, such as executing SQL statement, passing parameter and other information.
And executing the SQL statement through an Oracle driver: SELECT FROM DOTNET TAB TEST, as shown in fig. 7. The TNS-Agent parses the packet format as shown in fig. 8.
After the command data sent by the Oracle driver can be obtained after the TNS-Agent is analyzed, and the rule sent to the Shentong database for execution is analyzed and specified ((2) in FIG. 6), so that the TNS-Agent executes the request forwarding service once. When the TNS-Agent receives the response result after the execution of the Shentong database (3 in figure 6), the TNS-Agent needs to construct the data into a network data packet of an Oracle TNS protocol and send the network data packet to an Oracle driver (4 in figure 6).
The data of the Shentong database is shown in FIG. 9; the TNS-Agent constructs the structured data in fig. 9 into Oracle TNS protocol response network data, the constructed protocol response network data is shown in fig. 10, and the constructed TNS protocol data packet includes result set description information, row data information, error information, and the like.
The following describes the respective components for constructing the TNS protocol network data, including: protocol header, description information, rowHeader information, row data, RPA information, and error information.
(1) Protocol header: the first ten bytes are the header part of the response protocol, including the total length of the entire data packet, the protocol packet type, etc., as shown in fig. 11.
(2) Description information: the data packet is a description information portion of the response data packet, and is divided into an upper portion (upper square portion) containing information such as a flag TAG, HASH, a maximum row number, and a result set column number, a middle portion (middle square portion) containing information such as a column name, a column data type, accuracy, a range, a maximum length, and character codes of each column of data, and a lower portion (lower square portion) containing compatible information of different protocols, as shown in fig. 12.
(3) RowHeader information: the first byte of the data packet is a flag bit of the packet, representing the RowHeader protocol packet, as shown in FIG. 13.
(4) Line data: the data packet includes the flag bit (the first byte) of the row data packet as shown in fig. 14, and each column of data values (each column of data format is value content byte length + value content byte data) as shown in fig. 14.
(5) RPA information: as shown in fig. 15, the first byte is a flag bit of the RPA, and includes scn, buffer, keyvalues, and other information.
(6) Error information: as shown in fig. 16, the first byte is an error packet flag 04, which contains result statistics, error information, and so on.
In the present invention, the Shentong TNS-Agent supports the following data types:
NUMBER types NUMBER, DECIMAL, INTEREGER, INT, FLOAT, DOUBLE PRECISION, REAL
Character types CHAR, NCHAR, VARCHAR, VARCHAR2, NVARCHAR2
DATE type is DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, INTERVAL YEAR TO MOTH, INTERVAL DAY TO SECOND
BINARY type of BINARY, VARBINAY, RAW
LONG, CLOB, BLOB, BFILE.
The Shentong TNS-Agent does a great deal of work for analyzing the data type, and in SQL execution, parameters sent by an Oracle driver need to be analyzed, and information such as the data type and the data value of the parameters need to be analyzed; meanwhile, the result set data of the Shentong database query needs to be constructed into a data packet of the TNS protocol.
The TNS-Agent analyzes the Oracle driver to send any data, and the description information of any data is analyzed in the network data stream as shown in the table below.
Serial number Byte size Data name Description of the invention
1 1 dataType Oracle data type
2 1 flag Type mark
3 1 precision Data type precision
4 1 scale Data type range
5 4 maxlength Maximum data type length
6 5 maxNoOfArrayElements Maximum number of array types
7 5/9 contFlag The acquisition byte length is affected by the old and new protocols.
8 4 - Fixed 4 bytes length
9 2 version Type version
10 2 characterSetId Character set code ID
11 1 characterSetForm Character set coding Form
12 4 maxLengthOfChars Data type string maximum length
And the TNS-Agent continuously acquires the value data of the data through the acquired data description information. Different data types and different data value obtaining modes, such as character strings, and the numerical value type obtaining mode is a byte length + byte array. However, the large object data type acquisition mode needs to acquire the length of 4 bytes first, and whether data exists is judged, and when the length is zero, the value of the large object is NULL; otherwise, obtaining the locator information of the large object, and judging whether to continue to obtain the prefetched large object data from the data stream or not from the locator byte information.
The Oracle driver executes a data format parsed from the data stream by the TNS-Agent service after inserting row data ID =1, name = "v1", and NUM =1, including description information and data value information, as shown in fig. 17 and fig. 18, respectively.
Similarly, the TNS-Agent service constructs the result packet of the response in a manner referred to the response data processing in the application request processing section described above.
In the invention, the TNS-Agent is a multi-thread background service, can simultaneously process a plurality of user requests, has the multi-task load capacity in direct proportion to the hardware configuration, and provides the maximum connection quantity of software level control. Multithreading mainly adopts a thread pool technology and simultaneously adopts a large number of asynchronous methods to improve the I/O swallowing performance.
As shown in fig. 19, the flow of the TNS-Agent multithread processing multi-user request is as follows: the TNS-Agent starts a Socket port (default 1521) of the monitoring network, receives user connection requests of a plurality of clients, starts a background thread to process the requests for receiving the user connection, and creates a thread pool work item task for each connection to process the logic after connection after the user connection is received. Therefore, the request of each connection can be received quickly, the created connection is distributed to the next background task of the connection pool to be completed no matter how long the created connection executes or how complex the created connection executes, the connection receiving of the next user of the current thread cannot be influenced, each connection cannot be influenced mutually, and the performance of the server can be fully utilized.
It should be emphasized that the embodiments described herein are illustrative and not restrictive, and thus the present invention includes embodiments not limited to the embodiments described herein, and that other embodiments derived from the teachings of the present invention by those skilled in the art are also within the scope of the present invention.

Claims (9)

1. An application migration method based on an Oracle database protocol proxy is characterized in that: the method comprises the following steps:
step 1, intercepting and monitoring an original Oracle network by using a TNS protocol agent program;
step 2, establishing the connection between the application and the TNS protocol agent program, the connection between the TNS protocol agent program and the Shentong database and the mapping relation of the two connections;
step 3, the application client side carries out authentication and authorization through a TNS protocol agent program;
and 4, after authentication and authorization, the TNS protocol agent program analyzes the data packet sent by the application client and forwards the data packet to the Shentong database for processing, and the Shentong database sends a processing result to the Oracle driver through the TNS protocol agent program after processing.
2. The Oracle database protocol agent based application migration method according to claim 1, wherein: the specific implementation method of the step 1 comprises the following steps: the TNS protocol agent program intercepts the original Oracle network, uses a port of application access database to create a TCP network service end, and uses the port to create a TCP network service, and monitors the request of the application on the port.
3. The Oracle database protocol agent based application migration method as claimed in claim 2, wherein: the specific implementation method of the step 2 comprises the following steps: after the application is started, the Oracle driver uses a port of the application access database to establish a network connection, and the application connection is entered into a TNS protocol agent program; and establishing a network connection between the TNS protocol agent program and the Shentong database, and mapping the connection between the application and the TNS protocol agent program and the connection between the TNS protocol agent program and the Shentong database one by one.
4. The Oracle database protocol agent based application migration method according to claim 3, wherein: in the implementation process of the step 2, the method comprises a negotiation stage, when the negotiation stage exchanges data information, the client sends the detailed version information to the TNS protocol agent program, and the TNS protocol agent program sends the adopted network protocol, the coding character set, the time zone and the database version to the application client after analysis.
5. The Oracle database protocol agent based application migration method as claimed in claim 1, wherein: the step 3 authentication authorization comprises an OSESSION protocol phase and an OAUTH protocol phase; processing key value pair information sent by a client side at the OSESSION protocol stage, and generating encryption condition information through the key value pair information; and the OAUTH protocol stage further acquires key login information of the user, and the TNS protocol agent program further decrypts data for authentication and responds to the application client.
6. The Oracle database protocol agent based application migration method according to claim 1, wherein: the key-value pair information sent by the osesson protocol stage processing client comprises: user login information, user name information, client program name information, client machine information and program process ID information; the key user login information acquired in the OAUTH protocol stage comprises: user secure login PASSWORDs AUTH _ PASSSWORD, AUTH _ SESSKEY and AUTH _ PBKDF2_ SPEEDY _ KEY.
7. The Oracle database protocol agent based application migration method as claimed in claim 1, wherein: the specific implementation method of the step 4 comprises the following steps: after user authentication and authorization, when a data packet sent by a client driver is received, the data packet follows a data packet header, a data packet protocol type identifier and a data packet data information format, and a TNS protocol agent program identifies the type of each data packet and analyzes the information of each data packet; and the protocol of the Shentong database is forwarded to the Shentong database for processing, the Shentong database returns a result to the TNS protocol agent program after processing, and the TNS protocol agent program analyzes the result data into a result set data form of the Oracle network protocol and sends the result set data form to the Oracle driver after receiving the response result.
8. The Oracle database protocol agent based application migration method as claimed in claim 7, wherein: the TNS network protocol analyzed by the TNS protocol agent program comprises the following steps: the protocol packet resets a network connection protocol, a continue receive flag protocol, an interrupt connection protocol, a cancel operation protocol, a block protocol, a close protocol, a description protocol, an indicator protocol, an execution protocol, a re-execution protocol, a FETCH protocol packet, a large object protocol, a release large object protocol, a Session protocol, a release Session protocol, a Session state protocol, a switch Session protocol, a version information protocol, a logout protocol, an open transaction protocol, a transaction commit protocol, a transaction rollback protocol, a notification protocol, and a network ping protocol.
9. The Oracle database protocol agent based application migration method according to any of claims 1 to 8, wherein: the TNS protocol agent program is a multithreading background service, and adopts a thread pool technology to process a multi-user request, and the specific method comprises the following steps: the TNS protocol agent program starts a monitoring network Socket port, receives user connection requests of a plurality of clients, starts a background thread to process the requests for receiving the user connection, and creates a thread pool work item task for each connection to process the connected logic after receiving the user connection.
CN202210765191.5A 2022-07-01 2022-07-01 Application migration method based on Oracle database protocol proxy Pending CN115174452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210765191.5A CN115174452A (en) 2022-07-01 2022-07-01 Application migration method based on Oracle database protocol proxy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210765191.5A CN115174452A (en) 2022-07-01 2022-07-01 Application migration method based on Oracle database protocol proxy

Publications (1)

Publication Number Publication Date
CN115174452A true CN115174452A (en) 2022-10-11

Family

ID=83488814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210765191.5A Pending CN115174452A (en) 2022-07-01 2022-07-01 Application migration method based on Oracle database protocol proxy

Country Status (1)

Country Link
CN (1) CN115174452A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116150250A (en) * 2023-04-20 2023-05-23 瀚高基础软件股份有限公司 PostgreSQL-based dual-port analysis method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388010A (en) * 2007-09-12 2009-03-18 北京启明星辰信息技术有限公司 Oracle database audit method and system
CN101630351A (en) * 2009-06-04 2010-01-20 中国人民解放军理工大学指挥自动化学院 Method for enhancing safety of Oracle database server by utilizing progress infusion and TNS protocol analysis
US20140201838A1 (en) * 2012-01-31 2014-07-17 Db Networks, Inc. Systems and methods for detecting and mitigating threats to a structured data storage system
CN111125218A (en) * 2019-12-13 2020-05-08 成都安恒信息技术有限公司 Database compatibility method based on protocol analysis and compatibility proxy device thereof
CN112905567A (en) * 2021-03-23 2021-06-04 杭州沃趣科技股份有限公司 Database replacement method, device, system and medium based on network protocol conversion

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388010A (en) * 2007-09-12 2009-03-18 北京启明星辰信息技术有限公司 Oracle database audit method and system
CN101630351A (en) * 2009-06-04 2010-01-20 中国人民解放军理工大学指挥自动化学院 Method for enhancing safety of Oracle database server by utilizing progress infusion and TNS protocol analysis
US20140201838A1 (en) * 2012-01-31 2014-07-17 Db Networks, Inc. Systems and methods for detecting and mitigating threats to a structured data storage system
CN111125218A (en) * 2019-12-13 2020-05-08 成都安恒信息技术有限公司 Database compatibility method based on protocol analysis and compatibility proxy device thereof
CN112905567A (en) * 2021-03-23 2021-06-04 杭州沃趣科技股份有限公司 Database replacement method, device, system and medium based on network protocol conversion

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
褚孔统;宋建宇;王国强;: "基于代理服务的Oracle数据库安全访问", 指挥信息系统与技术, no. 02, pages 142 - 144 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116150250A (en) * 2023-04-20 2023-05-23 瀚高基础软件股份有限公司 PostgreSQL-based dual-port analysis method and device
CN116150250B (en) * 2023-04-20 2023-07-11 瀚高基础软件股份有限公司 PostgreSQL-based dual-port analysis method and device

Similar Documents

Publication Publication Date Title
US6665674B1 (en) Framework for open directory operation extensibility
US7203927B2 (en) SQL debugging using XML dataflows
EP0972258B1 (en) Java-to-database connectivity server
US8321450B2 (en) Standardized database connectivity support for an event processing server in an embedded context
US8387076B2 (en) Standardized database connectivity support for an event processing server
US6012067A (en) Method and apparatus for storing and manipulating objects in a plurality of relational data managers on the web
US8560502B2 (en) Method and a system for replaying database workload with transactional consistency
US20080271049A1 (en) Method for facilitating transactions between thin-clients and message format service (mfs)-based information management system (ims) applications
KR20060126749A (en) Methods, apparatus and computer programs for enabling web-applications to access enterprise managed data
WO2022242415A1 (en) Rest interface specification packaging system based on network sniffing
WO2014206129A1 (en) Computing device and method for executing database operation command
US8032548B2 (en) Efficient network data transfer
US7689703B2 (en) Systems and methods of utilizing and expanding standard protocol
CN109213790A (en) A kind of data circulation analysis method and system based on block chain
CN115174452A (en) Application migration method based on Oracle database protocol proxy
CN114039792B (en) Data access authority control method, device, equipment and readable storage medium
WO2011145044A1 (en) Database translation system and method
CN109145009B (en) SQL-based method for searching ElasticSearch
CN109857757A (en) Sentence conversion method, system and terminal between database
US20120005175A1 (en) Method and a system for real time replaying of database workload at a fixed initial time delay
US20220277009A1 (en) Processing database queries based on external tables
CN105721507B (en) It is a kind of based on JDBC service-long message data sharing service platform base support system and method
CN107330089B (en) Cross-network structured data collection system
CN117648212B (en) RPC-based database calling method, device, equipment and storage medium
CN117033748B (en) Service query information acquisition method, service data query method and device

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