SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide—523723-004
11- 5
Moving a Program Without Compiled Modules
•
The SQL statements in the program refer to database objects on the development
system that differ in table structure (for example, indexes and partitions) and
distribution of data from those on the production system.
•
Differences in the data contained in the same tables on the development and
production systems cause differences in the statistics that the SQL/MX compiler
uses to optimize the plan.
Default Settings
If the SQL/MX compiler uses different defaults on the production system than on the
development system, program performance could be affected.
Name Resolution
The SQL statements in the program must refer to database object names that exist on
the production system or that enable compile-time name resolution. When you move a
program without compiled modules to the production system and SQL compile there,
follow these guidelines when referring to tables or views in embedded SQL statements:
•
If you expect the database object names to differ on development and production
systems, use class MAP DEFINEs (for SQL/MP objects only) or PROTOTYPE host
variables (for embedded SQL programs in C, C++, and COBOL only) in the SQL
statements of the program.
•
For hard-coded Guardian names of SQL/MP objects, make sure volume,
subvolume, and file names on the development system are the same as those on
the production system. Omit the node from the object names in the program. The
object names will be qualified with the node of the system on which the statements
are compiled.
•
If the volume and subvolume names on the development system differ from those
on the production system, omit the volume and subvolume from the SQL/MP
object names in the program. The object names are qualified with the default
volume and subvolume of the system on which the statements are compiled.
°
For SQLJ programs, you can override the default volume and subvolume of
unqualified objects by setting the volume and subvolume on the command line
during customization:
java sqlj.tools.Sqlj -mploc=\$vol.subvol MyProg.jar
°
For embedded SQL programs in C, C++, or COBOL, you can override the
default volume and subvolume of unqualified objects by setting the volume and
Note. This technique works only for database objects that exist in the same volume and
subvolume. If the program refers to database objects in different volumes and subvolumes,
you must hard code those volumes and subvolumes in the program.