Running database administration commands

You can open a task assistant to run database administration commands for objects that are displayed in the Administration Explorer and the Object List.

Before you begin

To run a database administration command for an object, you must have the appropriate permission or authorization for the object, and a connection to the database or database that contains the object must exist.

Procedure

To open the task assistant for the command, specify additional settings for the command, and run the commands, complete the following steps:

  1. Find the object that you want to work with and right-click it to display the context-sensitive menu.
    • For instances, right-click the instance in the Administration Explorer.
    • For databases, right-click the database in the Administration Explorer. You can click a database in the Administration Explorer to list all connected databases in the Object List and right-click a database in that list.
    • For table spaces, tables, indexes, and packages, click the corresponding object type folder in the Administration Explorer to display the list of objects for the database in the Object List. Find the object in the Object List and right-click it.

      If you are reorganizing tables, reorganizing indexes, or rebinding packages, you can select multiple objects.

  2. Use the context-sensitive menu to find and select the command to run.

    For detailed information about the context menu choices to use, see Context-sensitive menu choices for task assistants.

  3. Click each of the tabs in the Settings area to step through the process of specifying the settings and options with which to run the command. Some commands have no additional options or settings that can be specified.
  4. Click Preview Command to display the generated command in the Command section and review the command. The generated command will be displayed automatically if no additional options were required to be specified for the command.
  5. Optional: If you want to manually edit the command, click Edit to open the command in the SQL and XQuery Editor. Edit the command, and either run it from the SQL and XQuery Editor or save it.
    Important: Any changes that you make in the SQL and XQuery Editor are not saved to or reflected in the Command section.
  6. Optional: If you want to save the command to a script that is compatible to be run directly from the data server, click Save. Specify where to save the script. You can run or schedule these scripts to be run on the server through the DB2 Command Line Processor (CLP) shell interface.
    Restriction: Only Optim Database Administrator supports saving CLP-compatible scripts.
  7. Click Run to run the commands that are displayed in the Command section. The focus of the Change Management Script Editor shifts to the Messages section.
  8. In the Messages section, monitor the progress of the commands that are being run in the progress bar and review any messages that are issued. To view detailed information about any command that does not run successfully, click the message number or SQL code. The detailed message information is displayed in an information center that opens in a browser window.

Feedback