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

Table Of Contents
Steps for Dropping an SQL/MP Alias
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 SQLMP alias that you wish to drop.
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 223) and the SQL/MX Reference Manual.
4. Enter the DROP 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, see the SQL/MX Reference Manual.
Dropping SPJs
For more information about and examples of dropping SPJs, see the SQL/MX Guide to Stored
Procedures in Java.
Dropping SQL/MX Tables
To remove a table and its dependent objects from the database, use the DROP TABLE statement.
Use the PURGEDATA utility to remove only the data from a table and its dependent objects and
leave the objects intact.
For more information, see the SQL/MX Reference Manual.
Dropping SQL/MX Tables and Their Data
To drop a table and its data, use the DROP TABLE statement. Dropping a base table with
dependencies is essentially dropping each of the dependent objects (indexes, constraints) separately.
SQL drops all the dependencies automatically.
If the table contains references to another object (for example, an RI constraint), the drop operation
fails if RESTRICT is specified. The drop operation should succeed if you use the CASCADE option
to drop these dependent objects.
Guidelines for Dropping an SQL/MX Table and its Data
If you plan to use the TMF subsystem to recover an SQL/MX table, see “Recovering Tables
(page 237).
To have the authority to drop a table, you must have all the security and authority required to
drop or invalidate all dependent objects, including access to all the catalogs describing all
the dependent objects.
You can use the DROP TABLE statement to drop a table with partitions, but not to drop individual
partitions within a table. For more information about using the MODIFY utility to drop the
individual partitions of a table, see “Dropping Partitions for SQL/MX Tables and Indexes
(page 170).
When you drop a table, the operation invalidates the programs that depend on that table.
To avoid expensive automatic recompilations of these programs, you should change them as
172 Adding, Altering, and Dropping SQL/MX Database Objects