SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)

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” (page 167).)
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 more information about explicit and automatic recompilation, see the SQL/MX Programming
Manual for C and COBOL. For more information about using DISPLAY USE OF, see “Checking
Module Dependencies with DISPLAY USE OF” (page 226) 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.
Altering Table Privileges
To alter table privileges, use the GRANT and REVOKE statements.
For more information, see the SQL/MX Reference Manual.
Steps for Altering a Table’s Privileges
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 name of the table you want to alter and what privileges you want to change.
3. Enter the GRANT or REVOKE statement.
For more information, see the SQL/MX Reference Manual.
Altering Sequence Generators
To alter a sequence generator, use the ALTER SEQUENCE statement.
You can alter a sequence generator to change the ANSI logical name of the sequence generator,
increment by value, maxvalue, minvalue, and cycle attributes. For more information, see the
SQL/MX Reference Manual.
Altering Objects in an SQL/MX Database 167