You can use the Data Source Explorer to
drop routines from a database server. Dropping a routine from the
database does not remove any local source code nor remove the routine
from any data development projects that contain it. If the source
of the routine is still in a data development project, you can deploy
the routine again and register it on the server. Not for PL/SQL routines.
Before you begin
To drop a routine from a DB2® database,
you must have the proper authority. If you do not own the routine,
you must have SYSADM or SYSCTRL authority, DELETE privilege, or the
DROPIN authority on the schema. Your DB2 database
administrator can provide you with the proper authority.
Procedure
To drop a routine from a database:
- In the Data Source Explorer, right-click
the routine that you want to drop, and click Drop.
A change plan is created and opens in the Object List.
- Review and run the change plan.
- Click the Generate DDL icon.
When it generates correctly, click the
(Review and deploy
changes) icon on the Object List toolbar. The Review
and Deploy dialog opens and displays the generated change
commands.
- Review the commands in the Review and Deploy dialog
and then specify how to deploy the changes to the database.
Tip: You can modify and then run generated commands in the SQL
and XQuery editor. You can also create a job and schedule
when to run the generated commands in the Job Manager.
Results
The routine is dropped from the database.