SQL/MX 2.x Database and Application Migration Guide (G06.23+, H06.04+, J06.03+)

Converting SQL/MP Applications to SQL/MX
Applications
HP NonStop SQL/MX Database and Application Migration Guide540435-005
10-8
Converting JDBC/MP Applications to NonStop
SQL/MX
Converting JDBC/MP Applications to NonStop SQL/MX
If you want a Java application, which uses NonStop SQL/MP, to take advantage of
SQL/MX functionality, you must change the application from using the HP JDBC Driver
for NonStop SQL/MP (the JDBC/MP driver) to either the HP JDBC Driver for NonStop
SQL/MX (the JDBC/MX driver) or the HP NonStop JDBC Type 4 driver (the Type 4
driver).
Both the JDBC/MP and JDBC/MX drivers are Type 2 drivers, which use proprietary
native APIs that run on NonStop servers only. Java applications that use a Type 2
driver cannot be called from client systems.
The JDBC/MP and JDBC/MX drivers are based on the JDBC 3.0 Data Access API.
When converting from JDBC/MP to JDBC/MX, you must make few changes to the
JDBC source code. To learn about the differences between JDBC/MP and JDBC/MX
functionality, see the
JDBC Driver for SQL/MP Programmer’s Reference and the
JDBC/MX Driver for SQL/MX Programmer’s Reference.
The Type 4 driver allows Java clients on other platforms to use SQL/MX Release 2.x to
access SQL/MX and SQL/MP databases on a NonStop system. Java applications that
use a Type 4 driver can be called from client systems.
To use the Type 4 driver, you must convert your JDBC/MP application to use SQL/MX
Release 2.x. You must also change the JDBC source code to comply with the API of
the Type 4 driver. For information about migrating to the Type 4 driver, see the
JDBC
Type 4 Driver Programmer’s Reference.
When migrating your Java application from the JDBC/MP driver to the JDBC/MX Type
2 or Type 4 driver, you must modify the SQL statements in the application to comply
with SQL/MX syntax. For more information, see Changes to SQL Syntax
on
page 10-16.
Converting SQLCI Scripts to NonStop SQL/MX
SQLCI scripts might contain SQL/MP DML statements or SQL/MP Report Writer
commands that you wish to convert to NonStop SQL/MX. This subsection describes
the changes that are required to convert such SQLCI scripts to MXCI scripts:
OBEY Command Files on page 10-9
Changes to SQL Syntax on page 10-9
Converting SQLCI Commands to MXCI Commands on page 10-9
Migrating From SQL/MP Report Writer to SQL/MX Report Writer on page 10-15
Some SQLCI scripts might contain DDL or utility commands that operate on SQL/MP
databases. If you do not plan to convert your SQL/MP database to SQL/MX tables,
keep your SQLCI utility scripts as they are. If your SQLCI scripts contain DDL and
utility operations and you plan to convert your SQL/MP database to SQL/MX tables,
see SQL/MX DDL Statements and Utilities
on page 11-14.