Runtime SQL Script Converter for Mainframe Rehosting
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Mainframe application migration to open systems and cloud environments is hindered by complex and costly database access script conversion, particularly due to dynamic and non-static SQL scripts that are difficult to convert from DB2 to Oracle formats during rehosting.
Innovation Solution
A system and method for dynamically converting Data Manipulation Language (DML) code, including SQL scripts, by loading a target database schema and conversion rules, parsing the rehosted mainframe application, and converting each SQL statement in real-time before execution, using a database access script converter within the application runtime.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If database access scripts are converted using traditional static conversion methods, then conversion complexity is reduced, but dynamically generated SQL scripts cannot be converted accurately
Solution Approach 1:
The patent implements dynamic conversion by injecting a converter at runtime that intercepts and converts SQL statements as they are generated and executed, rather than using static pre-conversion methods. This allows the system to adapt to dynamically generated SQL scripts while maintaining conversion accuracy through real-time transformation based on the target database schema.
Solution Approach 2:
The patent introduces a database access script converter as an intermediary component between the source and target databases. This converter intercepts SQL statements, performs conversion based on conversion rules and schema information, and executes the converted statements against the target database, thereby resolving the contradiction between handling dynamic SQL and maintaining conversion accuracy.
2Manufacturing precision
If manual conversion of database access scripts is performed, then conversion accuracy is improved, but migration cost and time increase
Solution Approach 1:
The patent implements an automated conversion system that performs script conversion without manual intervention. The converter automatically loads the target database schema, generates conversion rules, intercepts SQL statements at runtime, and executes converted statements against the target database, thereby maintaining high conversion accuracy while significantly improving migration speed and reducing costs.
Solution Approach 2:
The patent performs preliminary loading of the target database schema and conversion rules before runtime conversion. This preparation allows the automated converter to accurately transform SQL statements in real-time without manual intervention, resolving the contradiction between automation and accuracy by pre-establishing the conversion framework.
3Ease of manufacture
If static SQL scripts are converted using pre-migration tools, then conversion process is simplified, but dynamically generated SQL scripts are not converted
Solution Approach 1:
The patent transitions from static pre-migration conversion to dynamic runtime conversion by injecting a converter that operates during application execution. This dynamic approach maintains the simplicity of automated conversion while enabling the system to handle dynamically generated SQL scripts that were previously inaccessible to static conversion tools.
Solution Approach 2:
The patent ensures continuous conversion of SQL statements throughout the application's runtime by injecting a converter that intercepts and converts statements as they are generated and executed. This continuous operation maintains conversion simplicity while providing comprehensive coverage of both static and dynamic SQL scripts.
Data Source
AI summary
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.


