SQL/MX 3.2 Management Manual (H06.25+, J06.14+)

Table Of Contents
For more information, see the SQL/MX Query Guide. For more information about upgrading
SQL/MX databases, see the SQL/MX Installation and Upgrade Guide.
Displaying and Analyzing Query Execution Plans
Use the EXPLAIN function to display the query execution plans of a module. For more information,
see the SQL/MX Programming Manual for C and COBOL and the SQL/MX Reference Manual.
For details on how to analyze query execution plans and determine an optimal plan, see the
SQL/MX Query Guide.
Managing Modules
Topics in this subsection:
“Producing Locally Placed Modules or Globally Placed Modules” (page 220)
“Securing User Modules” (page 220)
“Checking Module Dependencies with DISPLAY USE OF” (page 223)
“Grouping Applications and Modules to Run Multiple DISPLAY USE OF Operations (page 225)
“Removing Modules” (page 228)
“Converting Globally Placed Modules to Locally Placed Modules” (page 229)
“Managing Module Files and Their Applications During Fallback From SQL/MX Release 3.2”
(page 230)
For SQL/MX Release 3.2, applications written in C, C++, or COBOL can use either globally placed
modules or locally placed modules.
A locally placed module can reside in any OSS directory other than the
/usr/tandem/sqlmx/USERMODULES directory and is co-located with its application executable.
The format and contents of locally placed modules are identical to globally placed modules.
Producing Locally Placed Modules or Globally Placed Modules
You can specify that locally placed modules always be produced by setting the
MXCMP_PLACES_LOCAL_MODULES attribute ON in the SYSTEM_DEFAULTS table. The
system-defined default value for this attribute is OFF, which means that by default all modules are
globally placed in the /usr/tandem/sqlmx/USERMODULES directory.
On a case-by-case basis, you can specify local and globally placed modules with these
command-line options:
mxCompileUserModule
-g moduleGlobal | -g moduleLocal
mxcmp
-g moduleGlobal | -g moduleLocal
To maintain compatibility with C, C++, and COBOL applications created in earlier releases, the
SQL/MX Release 3.2 SQL compiler produces a globally placed module. If required, the compiler
can produce a locally placed module.
For more information, see the SQL/MX Programming Manual for C and COBOL.
Securing User Modules
Because the SQL/MX executor runs in privileged mode and runs query plans in the compiled user
modules, it is important to properly control access to globally placed modules and locally placed
modules.
220 Managing Database Applications