ALLBASE/SQL Reference Manual (36216-90216)

Chapter 10 401
SQL Statements A - D
DROP MODULE
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.