Creating a custom property for the Object List

The columns in the Object List provide information about the objects that are being displayed. You can define a custom property if you need additional information about the objects. For example, you can create a custom property to see the last time statistics were run for the tables in a database or the last time a table was accessed.

Before you begin

You can create custom properties only for databases on DB2® Linux, UNIX, and Windows.

About this task

When you create a custom property, you retrieve the detail that the custom property will provide by selecting information from the DB2 system catalog. Custom properties can be displayed in the Object List and can be sorted and controlled just like the other columns in the Object List.

Procedure

To create a custom property, complete the following steps:

  1. Click the Graphic of the Arrange the contents icon. (Arrange the contents) icon. The Property Display Settings window opens.
  2. Click Create. The New Custom Property window opens, which initially contains a template for the query. For example, the initial query for tables is:
    select TABNAME
      from SYSCAT.TABLES
      where TABSCHEMA='$(schema)'
        and TABNAME='$(name)'
    If you want to see the last time that statistics were run for the tables in the database, you would change the query to:
    select STATS_TIME
    from SYSCAT.TABLES
    where TABSCHEMA='$(schema)'
    and TABNAME='$(name)' 
  3. Specify the name and query for the custom property, and click OK. The query must not return more than one row.
    Tip: You can specify the versions of the database that you want the property displayed for. Specifying versions can be useful when you use multiple versions of DB2 for Linux, UNIX, and Windows. For example, you might want to take advantage of a new column in a more recent version and do not want the property to show up for earlier versions.

    The Property Display Settings window opens again. The new property is displayed at the bottom of the list. By default, it is set to be displayed in the Object List

What to do next

To edit a previously defined custom property open the Property Display Settings window, select the custom property, and click Edit. To delete a custom property, open the Property Display Settings window, select the custom property, and clickDelete.


Feedback