Dropping modules is a task that can be done when you no
longer require any of the objects defined within the module or the
module itself.
Before you begin
Before
performing this task:
- The module must exist.
- You must have the authority to execute the DROP (Module) statement
in the schema.
About this task
This
topic shows you how to completely drop a module. If only some of the
objects in the module are no longer required you can optionally just
drop those objects. See: Dropping objects in a module
Restrictions
For
restrictions:
Procedure
- To drop a module and all of the objects defined in the
module, formulate a DROP (Module) statement:
- Specify the name of the module to be dropped.
- Execute the statement.
Results
If
the statement executes successfully, the specified module objects
are dropped from the module, the module is dropped from the schema,
and all objects dependent on the dropped module objects are invalidated.
Example
Consider
a module defined as: CREATE MODULE m @
ALTER MODULE m
PUBLISH PROCEDURE B() @
ALTER MODULE m
PUBLISH PROCEDURE A()
BEGIN
CALL B();
END @
ALTER MODULE m
ADD PROCEDURE B() BEGIN END @
The module and all
of the objects defined in the module can be dropped by executing the
following statement: DROP MODULE m @
What to do next
Once
you have successfully dropped the module, you might want to modify
applications that reference the module, create other modules, or drop
other modules.