SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)
Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide—544536-007
11-5
Moving a Program Without Compiled Modules
•
If you fail to properly set up all DEFINEs for SQL/MP tables and the development
and production systems are on the same Expand network, the wrong tables might
be accessed.
Moving a Program Without Compiled Modules
When you move a program from a development system to a production system, you
should always compile module definitions (either embedded module definitions or
module definition files) on the production system.
Considerations
Before choosing this approach for moving the program files, consider:
•
Query Execution Plan on page 11-5
•
Default Settings on page 11-5
•
Name Resolution on page 11-5
Query Execution Plan
The SQL/MX compiler might produce plans on the production system that differ
significantly from those on the development system. Possible causes include:
•
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.










