Creating a Db2 object view


Use the following procedure to create a view in a workspace. Each view contains a subset of Db2 objects retrieved from a Db2 subsystem. This topic also explains how to build an advanced search to use as the basis for the new view.

To create a Db2 object view

  1. Open or create a workspace.
  2. In the DB2 Navigator perspective, click the Add View NW_plus_circle_o.png menu arrow, and then click Add DB2 Object Set View.

    Tip

    The default value of the Add View menu is always the last option that you created. If you previously created a DB2 Object Set view, in this or a previous saved session, clicking NW_plus_circle_o.png creates a new DB2 Object Set view.

  3. In the Add DB2 Object Set View dialog box, complete the following fields or accept the displayed default values:


    Field

    Action

    DB2 Connection

    Select a DB2 Connection from the list.

    Tip: You can add DB2 connections to your list of favorite connections by clicking NW_plug_connect_square_green.png and specifying which connections to include.

    Object Type

    Select an object type.

    Filter

    Enter a filter pattern for the selected object type.

  4. Click OK.

    The view is now included in the DB2 navigation pane, in a hierarchical display organized by subsystem and type.

    Important

    Filter: identifies a view created from a basic search, and Search: identifies one created from an advanced search.

  5. When finished, save the workspace.

To build an advanced search clause for a view

The search clause is built from rows of search criteria in a grid. You can add, remove, and move rows to fine-tune the search clause. 

As you enter the search criteria and build the search clause, the clause is displayed in the Search Clause text area below the grid.

Important

By default, column names are displayed in catalog order. You can change to alphabetical order by clicking Options and changing the setting.

  1. In the Add DB2 Object Set View dialog box, click Advanced search.
  2. Click Insert a row NW_plus_circle_o.png.
  3. In the Add Expression dialog box, complete the following fields:

    Field

    Action

    Column

    Select a column name from the displayed list. The list includes all column names for the DB2 connection and object type.

    Operator

    Select an operator from the displayed list.

    Important

    The LIKE operator accepts only Db2 wildcards (% and _).

    Value

    Enter a value. The value is case sensitive and is automatically enclosed in the delimiter that you selected.

    Important

    BMC AMI Command Center requires a nonblank value but does not validate this value.

     

    Logic

    Select one of the following options:

    • AND
    • OR
  4. Click Save.
  5. Repeat steps 2 through 4 to continue adding rows until you have built the search clause.
  6. (Optional) If you want to make any changes, edit the search criteria.Use the following buttons to add, edit, remove, or move rows. (You can perform the same operations by right-clicking in a row and selecting the appropriate command.)


    Button

    Description

    NW_plus_circle_o.png

    Adds a row to the Search Clause criteria grid

    In the grid, selecting a row and clicking NW_plus_circle_o.png adds a row above the one that you selected.

    NW_pencil_adapt.png

    Lets you Edit a row in the Search Clause criteria grid

    NW_minus_circle_o.png

    Removes the selected row from the grid

    NW_arrow_up_circle.png

    Moves the selected row up

    NW_arrow_down_circle.png

    Moves the selected row down


    You can also edit the search clause directly by typing in the search-clause text area.

    Important

    Changes that you type into the text area are not synchronized with the search criteria in the grid. The grid is disabled.

    You can use the following buttons:

    Button

    Description

    Column

    Click in the clause and, from the menu, select a column name to add to the search clause.

    Operator

    Click and, from the menu, select an operator to add to the search clause.

    NW_refresh.png

    Click to discard any changes that you made in the text area and to re-synchronize the search clause with the search criteria in the grid. (Clicking this button again would restore your unsaved changes and disable the grid.)

    Important

    This button is available only after you begin making changes in the text area. Making any change in the search criteria grid disables this button.

  7. When finished building the search clause, click OK.



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*