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 Guide—540435-005
10-58
Managing Modules of Embedded SQL/MX
Applications
For more information about similarity checks and automatic recompilation in NonStop
SQL/MX, see the
SQL/MX Programming Manual for C and COBOL.
Managing Modules of Embedded SQL/MX Applications
In NonStop SQL/MP, the SQL compiler, SQLCOMP, stores SQL object code and query
execution plans in the SQL program file. In NonStop SQL/MX, the SQL/MX compiler,
MXCMP, stores SQL object code and query execution plans in module files, which
exist separately from the program executable files. The module files are stored by
default in the OSS directory
/usr/tandem/sqlmx/USERMODULES. You can also co-
locate module files in the same OSS directory as the program executable. For more
information about generating locally placed modules, see the
SQL/MX Programming
Manual for C and COBOL.
In NonStop SQL/MP, SQL program files are registered in a catalog and dependencies
among the program and tables, views, and indexes are stored in metadata tables. In
NonStop SQL/MX, the module file of the application is not registered in SQL/MX
metadata tables. To track dependencies between modules and database objects, use
the SQL/MX DISPLAY USE OF command. This command is different from the
SQL/MP DISPLAY USE OF command because it displays the dependencies between
database objects and user modules and not the program executables. For more
information about managing SQL/MX user modules, see the
SQL/MX Installation and
Management Guide.
Catalog where table is registered Yes Yes, could be in
different schema
Number of columns—more columns at run time than
at compile time
Yes but with the
same attributes
and no SELECT
*
No
View definition different at run time than at compile
time when selecting a view
No for shorthand
views
Yes for qualified
protection views
No (ANSI views
are equivalent to
shorthand views)
N.A. for
protection views
Table 10-15. Comparison of Similarity Checks Between NonStop SQL/MP and
NonStop SQL/MX (page 3 of 3)
Difference Between Compile Time and Run Time
Similarity check
passes in
NonStop
SQL/MP?
Similarity check
passes in
NonStop
SQL/MX?