DROP MODULE [ ALLBASE/SQL Reference Manual ] MPE/iX 5.5 Documentation
ALLBASE/SQL Reference Manual
DROP MODULE
The DROP MODULE statement deletes any sections associated with
preprocessed SQL statements from the ALLBASE/SQL system catalog.
Scope
ISQL or Application Programs
SQL Syntax
DROP MODULE [Owner.]ModuleName [PRESERVE]
Parameters
[Owner.]ModuleName identifies the module to be dropped.
PRESERVE causes ALLBASE/SQL to retain the module's
authorization records. If you preprocess a new
version of an application program, you do not
have to repeat the process of granting RUN
authority to everyone who will run the program.
If you do not specify the PRESERVE option, all
authority that had been granted for the module is
revoked.
Description
* When an application program is preprocessed, information needed
for efficient database access is stored as a module in the system
catalog. The system catalog also contains a record of the
module's owner and any GRANT statements that have been issued to
authorize other users to run the program. The DROP MODULE
statement deletes all this information unless the PRESERVE option
is specified; if the PRESERVE option is specified, the DROP MODULE
statement deletes all but the RUN authorization information.
* A module name can also identify a set of one or more dynamically
preprocessed statements created in the interactive environment
with the PREPARE statement. The DROP MODULE statement can be used
to drop such a set of dynamically preprocessed statements, and
optionally any associated authorization data, in addition to the
uses of the DROP MODULE statement described above.
* The DROP MODULE statement can invalidate stored sections. Refer
to the ALLBASE/SQL Database Administration Guide for additional
information on section validation.
Authorization
You can use the DROP MODULE statement if you have OWNER authority for the
module or if you have DBA authority.
Examples
1. Dropping preprocessed application programs
A module for the application program MyProg is created and stored
in the system catalog by one of the preprocessors.
GRANT RUN ON MyProg TO PUBLIC
DROP MODULE MyProg PRESERVE
Authorization information for MyProg is retained, but the module
is deleted from the system catalog. You can re-preprocess MyProg
and not have to redefine its authorization.
2. Dropping interactively prepared modules
Two sections for a module named Statistics are stored in the
system catalog.
PREPARE Statistics (1)
FROM 'UPDATE STATISTICS FOR TABLE PurchDB.Orders'
PREPARE Statistics (2)
FROM 'UPDATE STATISTICS FOR TABLE PurchDB.OrderItems'
This only executes Statistics(1). The statistics for table
PurchDB.Orders are updated:
EXECUTE Statistics
The statistics for table PurchDB.OrderItems are updated:
EXECUTE Statistics(2)
Both sections of the module are deleted.
DROP MODULE Statistics
MPE/iX 5.5 Documentation