IP Library › Granted Patent US 10,970,277
Granted Patent B2
US 10,970,277 · App. 15/386,405 · Granted Apr 6, 2021

System and method for dynamic conversion of database accessing scripts during runtime in a mainframe rehosting platform

Inventors: Weixuan (Wade) Zhang (Beijing, CN); Hui Shen (Beijing, CN); Wei Wang (Beijing, CN); Jim Wang (Beijing, CN)
Assignee: ORACLE INTERNATIONAL CORPORATION
G06F16/2452G06F9/4552G06F16/213G06F16/258
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,970,277
App. No.
15/386,405
Granted
Apr 6, 2021
Kind
B2
Abstract

In accordance with an embodiment, described herein is a system and method for dynamically converting data manipulation language (DML) code embedded in a mainframe application rehosted in a mainframe rehosting platform. The DML code can include SQL scripts with SQL statements, and standalone SQL statements for accessing a source database in a mainframe computer. The DML code can be converted programmatically and immediately before the DML code is to be executed during the execution of the rehosted mainframe application. A database access script converter in an application runtime of the mainframe rehosting platform can load a database schema of a target database and a set of conversion rules, parse the rehosted mainframe application to identify the DML code, and convert each SQL statement based on one or more conversion rules and the database schema, for execution against the target database.

Claims (47)

1. A system for dynamic conversion of structured query language (SQL) statements embedded in a rehosted mainframe application, the system comprising:

a microprocessor;

a mainframe rehosting platform executing on the microprocessor, wherein the mainframe rehosting platform comprises an application runtime hosting a mainframe application migrated from an associated mainframe computer, wherein the mainframe application migrated from the associated mainframe computer comprises data manipulation language (DML) code comprising SQL scripts with SQL statements having a first format consistent with accessing data in an associated source database stored on the associated mainframe computer; and

a database access script converter in the application runtime, wherein the database access script converter is configured to:

retrieve a target database schema from a target database,

retrieve a plurality of conversion rules from the application runtime,

parse the mainframe application to identify SQL statements having the first format in the mainframe application, and

during execution of the mainframe application migrated from the associated mainframe, computer:

convert the SQL statements of the DML code having the first format before they are executed by the mainframe application migrated from the associated mainframe computer to a second format required by the target database based on the target database schema and one or more of the plurality of conversion rules; and

delay converting the SQL scripts of the DML code until immediately before each SQL script is to be executed, wherein at least one of the SQL scripts of the DML code is dynamically generated during the execution of the mainframe application migrated from the associated mainframe computer.

2. The system of claim 1 , wherein the database access script converter is further configured to provide each SQL statement converted to the second format for execution against the target database.

3. The system of claim 1 , wherein the source database is a DB2 database, and wherein the target database is an Oracle database.

4. The system of claim 1 , wherein the database access script converter operates to convert an SQL statement in an SQL script to the second format, wherein the SQL script comprises an input for a source database utility.

5. The system of claim 1 , wherein each of the SQL statements embedded in the mainframe application is a static SQL statement or is dynamically generated.

6. The system of claim 1 , wherein the database access script converter is implemented in JAVA.

7. The system of claim 1 , wherein each SQL statement identified for conversion is used in a DB2 utility to access a DB2 database.

8. The system of claim 7 , wherein converting the SQL statement comprises mapping the DB2 utility to an Oracle command by:

identifying one or more DB2 utilities in the mainframe application;

identifying one or more SQL scripts associated with the identified one or more DB2 utilities in the mainframe application; and

converting SQL statement of only the identified one or more SQL scripts associated with the identified one or more DB2 utilities to the second format required by the target database,

wherein the target database is an Oracle database.

9. The system of claim 1 , wherein the database access script converter is configured to parse the target database schema into a set of elements and save the elements in a memory buffer in the database access script converter.

10. The system of claim 1 , wherein the database access script converter is configured to select the one or more conversion rules from the plurality of conversion rules for use in converting each SQL statement having the first format, based on one or attributes of the SQL statement.

11. A method for dynamic conversion of structure query language (SQL) statements embedded in a rehosted mainframe application executing on a microprocessor, the method comprising:

executing, in an application runtime of a mainframe rehosting platform, a mainframe application migrated from an associated mainframe computer, wherein the mainframe application comprises data manipulation language (DML) code comprising SQL scripts with SQL statements having a first format consistent with accessing data in an associated source database stored on the associated mainframe computer;

retrieving, using a database access script converter in the application runtime, a target database schema from a target database;

retrieving a plurality of conversion rules from the application runtime;

parsing the mainframe application to identify SQL statements having the first format in the mainframe application; and

during the executing of the mainframe application migrated from the associated mainframe computer:

converting the SQL statements of the DML code having the first format before they are executed by the mainframe application migrated from the associated mainframe computer to a second format required by the target database based on the target database schema and one or more of the plurality of conversion rules; and

delaying converting the SQL scripts of the DML code until immediately before each SQL script is to be executed, wherein at least one of the SQL scripts of the DML code is dynamically generated during the execution of the mainframe application migrated from the associated mainframe computer.

12. The method of claim 11 , wherein the database access script converter is further configured to provide each SQL statement converted to the second format for execution against the target database.

13. The method of claim 11 , wherein the source database is a DB2 database, and wherein the target database is an Oracle database.

14. The method of claim 11 , wherein the converting by the database access script converter comprises converting an SQL statement in an SQL script to the second format, wherein the SQL script comprises an input for a source database utility.

15. The method of claim 11 , wherein each of the SQL statements embedded in the mainframe application is a static SQL statement or is dynamically generated.

16. The method of claim 11 , wherein the database access script converter is implemented in JAVA.

17. The method of claim 11 , wherein each SQL statement identified for conversion is associated with a DB2 utility.

18. The method of claim 17 , wherein converting the SQL statement comprises mapping the DB2 utility to an Oracle command.

19. The method of claim 11 , wherein the database schema is parsed into a set of elements and saved in a memory buffer in the database access script converter.

20. A non-transitory computer readable storage medium, including instructions stored thereon which when read and executed by one or more computers cause the one or more computers to perform steps comprising:

executing, in an application runtime of a mainframe rehosting platform, a mainframe application migrated from an associated mainframe computer, wherein the mainframe application comprises data manipulation language (DML) code comprising SQL scripts with SQL statements having a first format consistent with accessing data in an associated source database stored on the associated mainframe computer;

retrieving, using a database access script converter in the application runtime, a target database schema from a target database;

retrieving a plurality of conversion rules from the application runtime;

parsing the mainframe application to identify SQL statements having the first format in the mainframe application; and

during the executing of the mainframe application migrated from the associated mainframe computer:

converting the SQL statements of the DML code having the first format before they are executed by the mainframe application migrated from the associated mainframe computer to a second format required by the target database based on the target database schema and one or more of the plurality of conversion rules; and

delaying converting the SQL scripts of the DML code until immediately before each SQL script is to be executed, wherein at least one of the SQL scripts of the DML code is dynamically generated during the execution of the mainframe application migrated from the associated mainframe computer.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 21, 2016
From: ZHANG, WEIXUAN (WADE); SHEN, HUI; WANG, WEI; WANG, JIM
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 041151/0763 →
Continuity (2)
Provisional Application 62280815 · Jan 20, 2016
Related Publication 20170206245A1 · Jul 20, 2017
Cited By (1)
US 12,619,398