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-24
Altering SQL/MX Tables
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 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 TABLE 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.
Examples of Altering Table File Attributes
These examples demonstrate altering the file attributes of a table:
>> ALTER TABLE CAT.SCH.EMPLOYEE
+> MAXEXTENTS 200;
--- SQL operation complete.
>> ALTER TABLE CAT.SCH.EMPLOYEE
+> ALLOCATE 175;
--- SQL operation complete.
>> ALTER TABLE CAT.SCH.EMPLOYEE
+> NO AUDITCOMPRESS;
--- SQL operation complete.