Creating database objects

You can use the Properties view to define the attributes for a new database object and then generate and run a DDL script that creates that object in the database.

Before you begin

You must have the appropriate authority to an create object in the database. A connection to the database must also exist.

About this task

The steps in this task assume that you are creating an object in a database that is not a DB2® for Linux, UNIX, and Windows database. You can create only one object at a time.

Procedure

  1. In the Administration Explorer, find and expand the database that you want to create the object in. Right-click a data object type folder and click Create Object. Alternatively, you can right-click a data object folder in the Data Source Explorer and then click Create Object.
    Tip: If the Object List is already open for the database, you can use the Create a new object icon image (Create a new object icon image) icon in the Object List to create an object. An object that is the same type as the objects that are being displayed is created.
    Restriction: You can use the Administration Explorer or the Object List only for DB2 for z/OS® databases that are version 8 or later.
  2. Select the schema to create the object in.
    Important: Depending on the type of object that you are creating, you are not always prompted to specify a schema.

    The object is displayed in the Properties view.

  3. Use the tabs in the Properties view to define the attributes for the object.

    For more information about the attributes for an object, see Data object properties.

  4. When you are finished changing the attributes, click the Image of Review and deploy changes icon (Review and deploy changes) icon. The Review and Deploy dialog opens.
  5. 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. 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.

  6. 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 created according to the attributes in the Properties view. The SQL Results view displays the results, including any errors that occurred.

Feedback