Instead of remembering SQL, you can easily add a link to the Tables page to look up dependency information.
The pages in the Technology Explorer for DB2 are defined in XML profiles.
Each page has it's own XML profile stored within the web server.
The file displayed to the right is the XML definition for the Tables page.
The XML file controls the SQL to run, how the columns are displayed, cross reference links, and actions.
It even controls detailed information on the page itself, searching rules, how many rows to display, and much more.
Goal:
Add a reference within the Table page's XML table definition file. You can use the modified file displayed to the right as an example.
Steps to complete:
- Open a terminal and run the following command:
- “sudo gedit /var/www/tableDefinitions/tablecat.xml &”
- Add a new column to be displayed within the display_columns element.
The changes are outlined in the file to the right.
Refer to the legend below.
- Do this by:
- Copying the 'col' element below
- Changing the value of the 'name' attribute to 'Dependencies'
- Add a new reference
- Do this by:
- Copying the reference element with the attribute 'name' of the value 'indexes'
- Change the value of the element 'c_title' and the attribute 'name' to 'Dependencies'
- Change the value of the element 'refvalue' to 'SYSCAT.TABDEP' (case is sensitive).
- Change the foreign column names to match the corresponding names in the 'tabdep' table
- 'bschema' for the first 'ref' element
- 'bname' for the second 'ref' element
- Save the file
- Leave the editor open
The changes are indicated with the following:
- Indicated text has been removed
- Indicated text has been edited
- Indicated text has been added
- Indicated text is the source of a copy