Dropping routines from a database

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:

  1. 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.

  2. Review and run the change plan.
    1. Click the Review and deploy changes icon (Review and deploy changes) icon on the Object List toolbar.

      The Review and Deploy dialog opens and displays the generated change commands.

    2. 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.

Feedback