SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)

Adding, Altering, and Dropping SQL/MX Database
Objects
HP NonStop SQL/MX Installation and Management Guide544536-007
9-22
Altering SPJs
3. Use the DISPLAY USE OF command to identify which user modules are
associated with this object. See the similarity check criteria in the SQL/MX
Programming Manual for C and COBOL to determine if your changes are likely to
cause similarly check to fail and force automatic recompilation. If they will, you
should SQL compile these modules after making the changes to avoid expensive
automatic recompilations at run time. SQL applications that are running while you
make these changes will still undergo automatic recompilation.
For information about explicit and automatic recompilation, see the SQL/MX
Programming Manual for C and COBOL. For information about using DISPLAY
USE OF, see Checking Module Dependencies with DISPLAY USE OF on
page 11-19 and the SQL/MX Reference Manual.
4. Enter the ALTER SQLMP ALIAS statement.
5. Revise the application source code as needed to reflect your changes to the
database. Process and compile the updated source file. For more information, see
the SQL/MX Programming Manual for C and COBOL.
For more information and examples of altering SQL/MP aliases, see the SQL/MX
Reference Manual.
Altering SPJs
For information and examples of altering SPJs, see the SQL/MX Guide to Stored
Procedures in Java.
Altering System Defaults
For information and examples of altering system defaults, see Section 6, Reviewing
and Setting System Defaults.
Altering SQL/MX Tables
You can use various statements and utilities to alter SQL/MX tables in many ways. For
detailed information about these statements and utilities, see the SQL/MX Reference
Manual.
Altering SQL/MX Table Columns
You cannot alter table columns directly. You can alter them indirectly, however, by
creating a new table with the different column sizes or data type definitions:
1. Start an MXCI session. Enter a LOG command to initiate a log file for statements
and commands entered in this session. Keep the log for your records.
2. Determine a name for the new table.
3. Query the system metadata to ensure the new table name is unique among
existing table, view, SQL/MP alias and SPJ names in the schema.