SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Adding, Altering, and Dropping SQL/MX Database
Objects
HP NonStop SQL/MX Installation and Management Guide—523723-004
9-24
Altering Tables
Altering Table Constraints
You cannot alter constraints, but you can change them by dropping an existing
constraint or by adding a new constraint to the table. Constraints reside in definition
only; therefore, they have no physical or security attributes to alter.
Adding a Table Constraint
See Adding Constraints on page 9-7.
Dropping a Table Constraint
See Dropping Constraints on page 9-30.
Altering Table File Attributes
To alter these physical file attributes of SQL/MX tables, use the ALTER TABLE
statement:
•
ALLOCATE/DEALLOCATE
•
AUDITCOMPRESS
•
CLEARONPURGE
•
MAXEXTENTS
Altering a table's file attributes neither invalidates any programs nor affects
dependencies of the table.
To alter security attributes of SQL/MX tables, however, use the GRANT and REVOKE
statements. (See Altering Table Privileges on page 9-25.)
Steps for Altering Table File Attributes
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 the table attribute you want to alter.
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 and the SQL/MX Programming Manual for
Java 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 and the SQL/MX Programming Manual for
Java. For information about using DISPLAY USE OF, see Checking Module
Dependencies With DISPLAY USE OF on page 11-20 and the SQL/MX Reference
Manual.