Dropping database objects

You can use the Review and Deploy dialog to run a DDL script to drop an object from the database.

Before you begin

You must have the appropriate authority to drop objects in the database. A connection to the database must also exist.

About this task

The steps in this task assume that you are dropping an object that is not in a DB2® for Linux, UNIX, and Windows database.

Procedure

  1. Find the object that you want to drop in the Object List or in the Data Source Explorer.
    Restriction: You can use the Object List only for DB2 for z/OS® databases that are version 8 or later.
  2. Right-click the object and then click Drop.

    If other objects are impacted as a result of dropping the object, IBM® Data Studio automatically displays the list of impacted objects in the Drop Object dialog. Use this dialog to select the impacted objects that you want to drop in addition to the original dropped object.

    The Review and Deploy dialog opens.

  3. Review the generated DDL.

    You cannot type directly in the DDL section of the dialog. If you want to modify the generated DDL script, click Edit and schedule and then click Finish. The script opens in the SQL and XQuery editor, where you can modify and run the DDL. You can also use the editor to start the Job Manager, where you can schedule a time to run the script.

  4. If you are satisfied with the generated DDL and want to run the DDL immediately, click Run and then click Finish.

Results

The generated DDL is run on the database, and the database object is dropped. The SQL Results view displays the results, including any errors that occurred.

What to do next

Alter any impacted objects that you did not choose to also have dropped to reflect the appropriate changes for the dropped object.

Feedback