Sei sulla pagina 1di 178

IBM Optim Database Relationship Analyzer


Version 2 Release 1

User’s Guide

SC27-2716-00
IBM Optim Database Relationship Analyzer

Version 2 Release 1

User’s Guide

SC27-2716-00
Note
Before using this information and the products that it supports, read the information in “Notices” on page 155.

This edition applies to Version 2 Release 1 of IBM Optim Database Relationship Analyzer for Linux, UNIX, and
Windows (product number 5724-U77) and IBM Optim Database Relationship Analyzer for z/OS (product number
5655-U78) and to all subsequent releases and modifications until otherwise indicated in new editions.
© Copyright International Business Machines Corporation 2008, 2009.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Tables . . . . . . . . . . . . . . . v Uninstalling the Optim Database Relationship
Analyzer server . . . . . . . . . . . . 27
Figures . . . . . . . . . . . . . . vii Uninstalling the Optim Database Relationship
Analyzer server from Windows systems . . . 28
Uninstalling the Optim Database Relationship
About this information . . . . . . . . ix Analyzer server from UNIX systems . . . . 28
Service updates and support information . . . . ix Installing Optim Database Relationship Analyzer
Highlighting conventions . . . . . . . . . . x server for z/OS . . . . . . . . . . . . . 29
How to look up message explanations . . . . . . x Optim Database Relationship Analyzer server
Using LookAt . . . . . . . . . . . . . x software requirements for z/OS . . . . . . 30
How to send your comments . . . . . . . . . x Binding the DB2 JDBC (JCC) driver package on
z/OS . . . . . . . . . . . . . . . 30
Chapter 1. Optim Database Relationship Creating and configuring metadata information
Analyzer overview . . . . . . . . . . 1 for z/OS . . . . . . . . . . . . . . 31
Optim Database Relationship Analyzer architecture . 2 Defining the Optim Database Relationship
Benefits of using Optim Database Relationship Analyzer Java stored procedures to DB2 on z/OS 33
Analyzer. . . . . . . . . . . . . . . . 4 Establishing authorizations on a z/OS server . . 33
Scenario: Validating database changes by using Installing Optim Database Relationship Analyzer
Optim Database Relationship Analyzer . . . . . 5 client . . . . . . . . . . . . . . . . 34
Scenario: Discovering hard-to-find relationships by Optim Database Relationship Analyzer client
using Optim Database Relationship Analyzer . . . 7 software requirements . . . . . . . . . . 35
Scenario: Managing data governance with Optim Optim Database Relationship Analyzer client
Database Relationship Analyzer . . . . . . . 11 hardware requirements . . . . . . . . . 35
Optim Database Relationship Analyzer functions . . 13 | Installing the Optim Database Relationship
The Optim Database Relationship Analyzer | Analyzer client by using the installation wizard . 35
group discovery process . . . . . . . . . 13 Installing the Optim Database Relationship
The Optim Database Relationship Analyzer Trace Analyzer client by using the silent installation . . 37
Analyzer . . . . . . . . . . . . . . 14 Optim Database Relationship Analyzer client
The Optim Database Relationship Analyzer environment variables . . . . . . . . . . 38
integration APIs function . . . . . . . . . 16 Uninstalling the Optim Database Relationship
Summary of changes . . . . . . . . . . . 17 Analyzer client . . . . . . . . . . . . 38
Optim Database Relationship Analyzer Uninstalling the Optim Database Relationship
documentation and updates . . . . . . . . . 18 Analyzer client by using the silent uninstallation . 39
Accessibility . . . . . . . . . . . . . . 18 | Uninstalling IBM Installation Manager . . . . 39
Starting the Optim Database Relationship Analyzer
Chapter 2. Installing and configuring components . . . . . . . . . . . . . . 39
Optim Database Relationship Analyzer . 21
Installing the Optim Database Relationship Analyzer
Chapter 3. Discovering relationships
server for UNIX and Windows systems . . . . . 21 with Optim Database Relationship
Optim Database Relationship Analyzer server Analyzer . . . . . . . . . . . . . . 41
software requirements for UNIX and Windows Optim Database Relationship Analyzer process
systems. . . . . . . . . . . . . . . 21 overview . . . . . . . . . . . . . . . 41
Optim Database Relationship Analyzer server The Optim Database Relationship Analyzer
hardware requirements . . . . . . . . . 22 metadata database . . . . . . . . . . . 42
Installing the Optim Database Relationship | User databases . . . . . . . . . . . . 42
Analyzer server by using the installation wizard . 23 Sets, group discovery configurations, versions,
Optim Database Relationship Analyzer server and groups . . . . . . . . . . . . . 43
environment variables . . . . . . . . . . 24 | Creating a database connection to an Optim
Installing the Optim Database Relationship | Database Relationship Analyzer metadata database . 45
Analyzer server by using silent installation . . . 24 | Connecting to a user database . . . . . . . . 46
Setting up login credentials to Optim Database | Switching user databases . . . . . . . . . . 46
Relationship Analyzer server . . . . . . . 25 | Switching Optim Database Relationship Analyzer
Starting and stopping the Optim Database | metadata databases . . . . . . . . . . . . 47
Relationship Analyzer server . . . . . . . 26 | Creating sets and group discovery configurations. . 47
Setting up the group discovery process . . . . . 48

© Copyright IBM Corp. 2008, 2009 iii


Specifying group discovery options . . . . . 49 List of groups by schema stored procedure . . 106
Specifying starting point tables or a | Version compare stored procedure . . . . . 108
catalog-wide group discovery . . . . . . 51 Optim Database Relationship Analyzer database
Specifying relationship sources . . . . . . 51 object views . . . . . . . . . . . . . 109
Specifying boundaries for the group discovery Integrating Optim Database Relationship
process scope . . . . . . . . . . . . 65 Analyzer with other IBM Optim Solutions
Ignoring relationships during the group products . . . . . . . . . . . . . . 112
discovery process . . . . . . . . . . 67 Optim Database Relationship Analyzer sample data 114
| Adding an additional relationship . . . . . 68 Configuring Optim Database Relationship
| Running the group discovery process. . . . . . 68 Analyzer sample tables . . . . . . . . . 115
| Running the group discovery process in the Sample tables and table relationships . . . . 116
| background . . . . . . . . . . . . . 69 Scenario: Using Optim Database Relationship
| Checking the status of a job . . . . . . . . 70 Analyzer with sample data . . . . . . . . 120
| Finalizing a group discovery configuration . . . 70
Reviewing the results of the group discovery Chapter 5. Troubleshooting Optim
process . . . . . . . . . . . . . . . . 71 Database Relationship Analyzer
| Analyzing group discovery results. . . . . . 71
Refining the group discovery process . . . . . . 73
problems . . . . . . . . . . . . . 123
Changing the group discovery process options 73 Optim Database Relationship Analyzer trace
Merging groups . . . . . . . . . . . . 73 information . . . . . . . . . . . . . . 123
| Defining ignored relationships and boundary Optim Database Relationship Analyzer client
| tables from the Group Discovery Results window 74 log file . . . . . . . . . . . . . . 123
Validating changes by using version comparison . . 75 Optim Database Relationship Analyzer server
The Trace Analyzer process . . . . . . . . . 76 log and debug log files . . . . . . . . . 123
Running the Trace Analyzer on a DB2 for Linux, | Recovery procedures . . . . . . . . . . . 125
UNIX, and Windows server . . . . . . . . 77 | Recovering from a failure to connect to a user
Running the Trace Analyzer on an Oracle server 78 | database . . . . . . . . . . . . . . 125
Running the Trace Analyzer on a DB2 for z/OS | Opening the getting started view in the user
server . . . . . . . . . . . . . . . 80 | interface . . . . . . . . . . . . . . 125
| Starting a trace before running the Trace | Troubleshooting an empty Trace Analyzer
| Analyzer on a DB2 for z/OS server . . . . 81 | results set . . . . . . . . . . . . . 126
Starting a trace before running the Trace | Recovering from a failure to retrieve stored
Analyzer on a DB2 for z/OS server with | procedure information for z/OS servers . . . 126
OMEGAMON XE . . . . . . . . . . 82 | Recovering from the GRDG000 error . . . . 127
Changing user settings . . . . . . . . . . 83 | Recovering from a failure to load the
| Adding a user-defined relationship . . . . . . 83 | db2jcct2zos library. . . . . . . . . . . 127
Viewing and editing properties for sets, group | Recovering from a WLM error. . . . . . . 128
discovery configurations, and groups . . . . . . 84 | Recovering from the SLQCODE 471 error . . . 128
Copying a group discovery configuration . . . . 84 | Recovering from the SQLCODE 430 error . . . 129
Deleting sets, group discovery configurations, and | Recovering from the GRDG108 error . . . . 129
groups . . . . . . . . . . . . . . . . 85 | Recovering from SQLCODE 913 and 501 or the
Searching for tables. . . . . . . . . . . . 85 | ″dead statement″ error . . . . . . . . . 130
| Cancelling or stopping the group discovery
| process or Trace Analyzer from the user
Chapter 4. Optim Database | interface . . . . . . . . . . . . . . 130
Relationship Analyzer reference | Differences in the finished time on the Progress
information . . . . . . . . . . . . . 87 | view and the Job Status wizard . . . . . . 130
The Optim Database Relationship Analyzer for | Gathering diagnostic information . . . . . . . 131
Linux, UNIX, and Windows server security. . . . 87 Optim Database Relationship Analyzer messages 131
Optim Database Relationship Analyzer stored
procedure callable interface . . . . . . . . . 88 Glossary . . . . . . . . . . . . . 151
Group discovery stored procedure . . . . . . 88
Trace Analyzer stored procedure . . . . . . 95
Notices . . . . . . . . . . . . . . 155
Integration with Optim Database Relationship
Trademarks . . . . . . . . . . . . . . 157
Analyzer . . . . . . . . . . . . . . . 97
Predefined groups stored procedure . . . . . 99
Predefined group data stored procedure . . . 102 Index . . . . . . . . . . . . . . . 159
Server product information stored procedure 105

iv IBM Optim Database Relationship Analyzer User’s Guide


Tables
1. The values and descriptions for the | 20. Determining relationship source for table
GRD_USERPROPS table. . . . . . . . . 32 | reference information. . . . . . . . . . 93
2. Relationship sources used to determine groups 48 21. Group discovery stored procedure trace
3. System referential integrity relationships 52 reference relationship information result set. . 93
4. Trigger relationships . . . . . . . . . 56 | 22. Determining relationship source for trace
5. Package relationships . . . . . . . . . 58 | reference information. . . . . . . . . . 94
| 6. Trace Analyzer based on Application A and 23. GRDPREDEFGROUPS stored procedure
| Application B . . . . . . . . . . . . 61 result set. . . . . . . . . . . . . . 100
| 7. Tables discovered with the application level 24. Table information for a group . . . . . . 103
| granularity . . . . . . . . . . . . . 62 25. Table relationship information for a group 103
| 8. Column-based relationships discovered with | 26. Determining relationship source for
| the application level granularity. . . . . . 62 | column-based relationships.. . . . . . . 104
| 9. Trace context information discovered with the | 27. Determining relationship source for table
| application level granularity . . . . . . . 63 | reference information.. . . . . . . . . 105
| 10. Tables discovered with the application level 28. GRDPREDEFGROUPS stored procedure
| granularity . . . . . . . . . . . . . 63 result set. . . . . . . . . . . . . . 107
| 11. Column-based relationships discovered with 29. GRD_GROUPING group discovery
| the application level granularity. . . . . . 64 configuration columns . . . . . . . . 109
| 12. Trace context information discovered with the 30. GRD_RELATIONS view columns . . . . . 110
| application level granularity . . . . . . . 65 | 31. Determining relationship source for
13. Group discovery stored procedure group | column-based relationships. . . . . . . . 111
discovery configuration information result set. . 89 | 32. Determining relationship source for table
14. Group discovery stored procedure version | reference information. . . . . . . . . . 112
information result set. . . . . . . . . . 90 33. GRDSMPL.ORG. . . . . . . . . . . 116
15. Group discovery stored procedure job 34. GRDSMPL.STAFF . . . . . . . . . . 117
information result set. . . . . . . . . . 91 35. GRDSMPL.DEPARTMENT (departments in
16. Group discovery stored procedure group different locations) . . . . . . . . . . 117
information result set. . . . . . . . . . 91 36. GRDSMPL.EMPLOYEE (information on
17. Group discovery stored procedure table employees from different departments) . . . 118
information result set. . . . . . . . . . 91 37. GRDSMPL.EMP_ACT . . . . . . . . . 118
18. Group discovery stored procedure group 38. GRDSMPL.PROJECT . . . . . . . . . 119
relationship information result set. . . . . . 92 39. GRDSMPL.CL_SCHED (Class schedule) 119
| 19. Determining relationship source for 40. GRDSMPL.CL_ROSTER (List of students
| column-based relationships. . . . . . . . 93 enrolled in various scheduled classes) . . . 120

© Copyright IBM Corp. 2008, 2009 v


vi IBM Optim Database Relationship Analyzer User’s Guide
Figures
1. Uses for Optim Database Relationship Analyzer 2 13. SQL table definitions . . . . . . . . . 57
2. Optim Database Relationship Analyzer 14. SQL statements run by Package 1 . . . . . 57
architecture for a Linux, UNIX, and Windows 15. SQL statements run by Package 2 . . . . . 57
server.. . . . . . . . . . . . . . . 3 16. SQL statements run by Package 3 . . . . . 58
3. Optim Database Relationship Analyzer | 17. SQL table definitions . . . . . . . . . 60
architecture for a z/OS server. . . . . . . 4 | 18. SQL statements run by Application A . . . . 61
4. The Optim Database Relationship Analyzer | 19. SQL statements run by Application B . . . . 61
group discovery process . . . . . . . . 14 20. Optim Database Relationship Analyzer Java
5. Using the Trace Analyzer results with the API call example. . . . . . . . . . . 98
group discovery process. . . . . . . . . 15 21. Possible Linux, UNIX, and Windows system
6. Optim Database Relationship Analyzer sets environment . . . . . . . . . . . . 113
and configurations . . . . . . . . . . 43 22. Possible z/OS system environment . . . . 113
7. SQL table definitions . . . . . . . . . 54 23. Optim Database Relationship Analyzer
8. SQL statements run by Trigger 1: TRIG001 54 sample data environment setup. . . . . . 115
9. SQL statements run by Trigger 2: TRIG002 55 24. System-managed RI relationship . . . . . 117
10. SQL statements run by Trigger 3: TRIG003 55 25. System RI and user-defined relationships 119
11. SQL statements run by Trigger 4: TRIG004 55 26. System-managed RI relationship . . . . . 120
12. SQL statements run by Package 5: PROC005 56

© Copyright IBM Corp. 2008, 2009 vii


viii IBM Optim Database Relationship Analyzer User’s Guide
About this information
These topics contain information about IBM® Optim Database Relationship
Analyzer for z/OS®® and IBM Optim Database Relationship Analyzer for Linux®
UNIX®, and Windows®. Its purpose is to provide an overview of and its functions,
as well as tasks for installing, implementing, and using IBM Optim Database
Relationship Analyzer. This information includes:
v Steps for installing and configuring Optim Database Relationship Analyzer
v System requirements and prerequisites
v Processes for the effective use of Optim Database Relationship Analyzer

This book is designed to help database administrators, system programmers, and


application programmers perform these tasks:
v Plan for the installation of Optim Database Relationship Analyzer
v Install and operate Optim Database Relationship Analyzer
v Customize the Optim Database Relationship Analyzer environment
v Diagnose and recover from Optim Database Relationship Analyzer problems

This information is intended for those persons responsible for installing,


customizing, and using Optim Database Relationship Analyzer.

For a DB2® for z/OS server installation, this information also assumes a working
knowledge of:
v The OS/390® or z/OS® operating system
v SMP/E
v DB2 Universal Database™ for z/OS
v Microsoft® Windows

For an installation on a DB2 for Linux, UNIX, or Windows server, this information
assumes a working knowledge of:
v Linux, UNIX, or Windows operating systems
v DB2 Universal Database or Oracle Database for the appropriate operating system
v Microsoft Windows

Always check the Optim™ Solutions Library page for the most current version of
this publication:

www.ibm.com/software/data/data-management/optim/library.html

Service updates and support information


To find service updates and support information, including software fix packs,
PTFs, Frequently Asked Question (FAQs), technical notes, troubleshooting
information, and downloads, refer to the following Web page:

www.ibm.com/software/data/data-management/optim/support/

© Copyright IBM Corp. 2008, 2009 ix


Highlighting conventions
This information uses the following highlighting conventions:
v Boldface type indicates commands or user interface controls such as names of
fields, folder, icons, or menu choices.
v Monospace type indicates examples of text that you enter exactly as shown.
v Italic type indicates variables that you should replace with a value. It is also used
to indicate book titles and to emphasize significant words.

How to look up message explanations


You can use the LookAt utility to search for messages and codes:

Using LookAt
LookAt is an online facility that you can use to look up explanations for most of
the IBM messages you encounter, as well as for some system abends and codes.
Using LookAt to find information is faster than a conventional search because in
most cases LookAt goes directly to the message explanation.

You can use LookAt from the following locations to find IBM message
explanations for z/OS elements and features, z/VM®, VSE/ESA, and Clusters for
AIX® and Linux:
v The Internet. You can access IBM message explanations directly from the LookAt
Web site at http://www.ibm.com/eserver/zseries/zos/bkserv/lookat/.
v Your z/OS TSO/E host system. You can install code on your z/OS or z/OSe
systems to access IBM message explanations, using LookAt from a TSO/E
command line (for example, TSO/E prompt, ISPF, or z/OS UNIX System
Services running OMVS).
v Your Microsoft Windows workstation. You can install code to access IBM
message explanations on the z/OS Collection (SK3T-4269) using LookAt from a
Microsoft Windows command prompt (also known as the DOS command line).
v Your wireless handheld device. You can use the LookAt Mobile Edition with a
handheld device that has wireless access and an Internet browser (for example,
Internet Explorer for Pocket PCs, Blazer, or Eudora for Palm OS, or Opera for
Linux handheld devices). Link to the LookAt Mobile Edition from the LookAt
Web site.

You can obtain code to install LookAt on your host system or Microsoft Windows
workstation from a disk on your z/OS Collection (SK3T-4269) or from the LookAt
Web site (click Download, and select the platform, release, collection, and location
that suit your needs). More information is available in the LOOKAT.ME files
available during the download process.

How to send your comments


Your feedback is important in helping to provide the most accurate and
high-quality information. If you have any comments about this book or any other
Optim Database Relationship Analyzer documentation, use either of the following
options:
v Use the online reader comment form, which is located at:
www.ibm.com/software/data/rcf/
v Send your comments by e-mail to comments@us.ibm.com. Be sure to include the
name of the book, the part number of the book, the version of Optim Database

x IBM Optim Database Relationship Analyzer User’s Guide


Relationship Analyzer and, if applicable, the specific location of the text you are
commenting on (for example, a page number or table number).

About this information xi


xii IBM Optim Database Relationship Analyzer User’s Guide
Chapter 1. Optim Database Relationship Analyzer overview
IBM Optim™ Database Relationship Analyzer discovers, records, refines, and
manages groups of related objects (tables) that can represent a business application
or the structure of an enterprise environment.

Optim Database Relationship Analyzer is a client-server based product and can be


used to group tables, based on relationships, for DB2 for z/OS, for DB2 for Linux,
UNIX, and Windows, and for Oracle databases. The Optim Database Relationship
Analyzer for z/OS product works with DB2 for z/OS systems and the Optim
Database Relationship Analyzer for Linux, UNIX, and Windows product works
with DB2 for Linux, UNIX, and Windows and Oracle systems.

Optim Database Relationship Analyzer provides table relationship information as a


basis for consistent administrative management activities. The type of relationship
between tables is based on catalog information (primary key-foreign key
relationships, package information, and trigger information), Trace Analyzer results
(SQL trace), or the user-defined relationships that you specify.

The purpose of Optim Database Relationship Analyzer is to discover and save the
table relationship information in the form of groups, and to administer these
relationship groups for the enterprise environment. The groups are available for
any DBMS tools or DBMS applications that find the information vital for
performing administrative tasks. Optim Database Relationship Analyzer can help
you to:
v Discover the many relationships between tables in an enterprise environment,
including the relationships that are hard to find and manage, such as monthly or
year-end, dynamic, or transient applications
v Enable the grouping of related tables based on their usage in the environment,
such as inventory and sales tables
v Identify relationship groupings to keep data relationally intact for archiving,
recovering, testing, and replicating with other tools
v Flag changes between groups to help the DBA validate that the application
changes are correct

The following figure illustrates the uses for Optim Database Relationship Analyzer,
and how the tool receives and processes data.

© Copyright IBM Corp. 2008, 2009 1


Figure 1. Uses for Optim Database Relationship Analyzer

Optim Database Relationship Analyzer architecture


The Optim Database Relationship Analyzer architecture consists of a server
component, which connects to the user databases, and a client component, which
establishes a connection with the metadata database and provides the graphical
user interface.

Optim Database Relationship Analyzer for Linux, UNIX, and


Windows architecture

The Optim Database Relationship Analyzer metadata database, which holds all of
the Optim Database Relationship Analyzer metadata, exists on the Optim Database
Relationship Analyzer server. The Optim Database Relationship Analyzer client
connects to the Optim Database Relationship Analyzer metadata database through
the Apache Derby client/server connection. Then, Optim Database Relationship
Analyzer connects to the user databases through the DB2 and Oracle clients that
are found on the Optim Database Relationship Analyzer server system.

2 IBM Optim Database Relationship Analyzer User’s Guide


Figure 2. Optim Database Relationship Analyzer architecture for a Linux, UNIX, and Windows server.

Optim Database Relationship Analyzer for z/OS architecture

The Optim Database Relationship Analyzer client connects to the Optim Database
Relationship Analyzer server on z/OS through DB2 Connect™ with JDBC
connection. The Optim Database Relationship Analyzer metadata database is
created on the same system as the DB2 user database. The Optim Database
Relationship Analyzer client can access the Optim Database Relationship Analyzer
metadata database through the Optim Database Relationship Analyzer Java™
engine.

Chapter 1. Optim Database Relationship Analyzer overview 3


Figure 3. Optim Database Relationship Analyzer architecture for a z/OS server.

Benefits of using Optim Database Relationship Analyzer


Optim Database Relationship Analyzer provides a complete overview of
relationship data, which can be essential for such business tasks as archive and
backup planning, application upgrades, structural and informational changes,
database cleanup, migration, and testing.

Each time that you want to discover relationships between tables that are based on
a given set of parameters, Optim Database Relationship Analyzer creates a new
version of a group or groups. This process is called group discovery. You can run a
catalog-wide group discovery, or you can find only the tables that are related to
your starting point table. You can also take advantage of the group validation
feature to compare one version of a group of tables to another version of a group
of tables to determine if any changes have occurred in the DBMS environment or
in the applications that reference the tables in the groups. Understanding the
relationships that exist within your database can have numerous benefits, for
example:
v Finding table relationship data can help you to perform impact analysis across
databases before you delete or modify information (such as changing phone
numbers or renaming columns).
v The group validation feature helps you to analyze information before and after
you make such changes to the database as deleting or creating tables or making
application updates that affect runtime table interactions.
v The Trace Analyzer feature helps you find table relationships that are not
defined in the catalog and helps you to observe the runtime table interactions of
external applications that access your database.
v Understanding table relationships makes it much easier to identify and remove
duplicate or unused objects, which can increase system performance.
v A clear picture of table relationships can also help ensure data consistency by
keeping data relationally intact, which is essential for archiving, backup and
recovery, creating practical test environments, and understanding relationships
in replication subscriptions.

4 IBM Optim Database Relationship Analyzer User’s Guide


Scenario: Validating database changes by using Optim Database
Relationship Analyzer
This scenario describes how a DBA can use Optim Database Relationship Analyzer
to quickly validate that the correct changes were made to a database.

About this task

A senior DBA, Steve, at a banking company needs to support a banking inventory


application change by adding a new Customer_Info table to the corporate
database. Steve also needs to create a primary key-foreign key relationship to relate
the Customer_ID column in the existing Customer table to the Customer_ID
column in the new Customer_Info table. Steve decides to delegate the work to a
new member of the team, Sameer. When Sameer completes the work, Steve can use
Optim Database Relationship Analyzer to validate the changes that Sameer made.
By using Optim Database Relationship Analyzer’s group discovery process and
version comparison functionality, Steve can compare two versions of the database
relationships: one version that was created before the change and another version
that was created after the change to show that the new relationships are correct.

The high-level process consists of the following steps:


1. Steve creates an inventory application set. Within the set he can create one or
more group discovery configurations that he will use to work with the groups of
related tables.
2. Steve specifies the group discovery process options that he wants to use. These
options will guide the group discovery process to discover the related tables
and return them as a group.
3. Steve runs the group discovery process that will return the first version of the
group of related tables for his database. Steve will use this first version as a
baseline to compare with later versions.
4. After that baseline is captured, Sameer makes changes to the database. Sameer
adds the Customer_Info table and defines a relationship between the Customer
and Customer_Info tables.
5. After Sameer has finished his changes, Steve runs the group discovery process
again using the same group discovery configuration as before. Optim Database
Relationship Analyzer will create a new version of the group.
6. Steve then compares the groups within the two versions.
7. He reviews the results and verifies that the new table and primary key-foreign
key relationship exist. Is the table included in the group? Is it related by System
RI or are the tables related in an unexpected way?

The following task provides the detailed steps to complete this scenario:
1. Steve creates an Optim Database Relationship Analyzer inventory application
set. Within the set, Steve creates a group discovery configuration that contains
the specific options that will result in the discovery of a group of related tables.
Steve will:
a. Right-click the user database and select Create New Set or click the toolbar
icon and name the set in the Create New Set wizard.
b. Right-click the set and select Create New Group Discovery Configuration
from the menu options. He can also click the Create New Group Discovery
Configuration icon from the toolbar to complete this step.
c. Enter the name of the new configuration and click Finish. The Group
Discovery Configuration Editor opens.

Chapter 1. Optim Database Relationship Analyzer overview 5


2. Steve then specifies the options that he wants to use to define the group
discovery process. In the Group Discovery Configuration Editor, Steve will:
a. In the Set the Scope tab, select the Starting point tables radio button to
indicate that the group discovery process should base the search on the
starting point tables that are specified.
b. Click the Add Starting Point Tables button to bring up the Starting Point
Tables wizard. Use the wizard to select specific starting point tables from
the user database. For this example, the starting point table is the Customer
table.
c. For relationship sources, select Catalog and System Referential Integrity.
d. In the Restrict the Scope tab, Steve can specify boundary tables or
relationships to ignore if he does not want to include certain relationships.
e. In the Expand the Scope tab, Steve can specify additional relationships to be
included during the group discovery process.
f. Save the configuration by clicking File → Save or pressing Ctrl + S. Steve can
save the configuration at any time.
3. Steve runs the group discovery process. Steve will:
a. Select the group discovery configuration and click Run Group Discovery.
b. In the Run Group Discovery wizard, review the configuration, enter a job
description, and click Finish to start the group discovery process. A
meaningful job description can help Steve identify this group discovery job
at a later time.
Steve now has the first version of the group of tables for his application,
DefaultVersion_1. The Group Discovery Results window appears with
relationship information.
4. Now Steve will review the results of the group discovery process.
a. If Steve has closed the Group Discovery Results window, he can open it by
right-clicking the version and selecting View Relationships for this
Version. He can also right-click a group and select View Relationships for
this Group to view the relationships for that group. In the Group Discovery
Results window, Steve can click on the nodes the represent groups of tables
to explore the column based relationships within them. See “Analyzing
group discovery results” on page 71 for more information.
5. If the group discovery process accurately captured the tables that Steve wanted,
he will finalize the group discovery configuration by right-clicking the group
discovery configuration and selecting Finalize.
After Steve finalizes the group discovery configuration, each run of the group
discovery process that uses that group discovery configuration will create a
new version. If Steve did not finalize his group discovery configuration, each
new run of the group discovery process with that group discovery
configuration will replace the current version.
6. The junior DBA, Sameer, completes the following changes to the application
(outside of Optim Database Relationship Analyzer):
a. Adds the new Customer_Info table
b. Adds a Customer_ID column to the new Customer_Info table
c. Defines the relationship between the tables by creating a primary
key-foreign key relationship between the Customer_ID column in the new
Customer_Info table and the Customer_ID column in the existing Customer
table
7. After Sameer is finished, Steve can run the group discovery process again using
the same group discovery configuration that he ran before. Steve will:

6 IBM Optim Database Relationship Analyzer User’s Guide


a. Select the group discovery configuration and click Run Group Discovery.
b. In the Run Group Discovery wizard, review the configuration, enter a job
description, and click Finish to start the group discovery process. A
meaningful job description can help Steve identify this group discovery job
at a later time.
A new version, DefaultVersion_2, is created.
8. Steve then compares the groups in the first version to the groups in the latest
version of the group discovery configuration. He will:
a. Select DefaultVersion_1 in the navigation tree.
b. With the Ctrl key pressed, select DefaultVersion_2.
c. Right-click DefaultVersion_2 and select Compare with Each Other from the
menu options. The Version Comparison Results window opens.
d. Compare DefaultVersion_1 on the left side of the Version Comparison
Results window with DefaultVersion_2 on the right side of the window.
9. Steve then reviews the results of the comparison and verifies that the new
Customer_Info table exists, and that the primary key-foreign key relationship
exists between the Customer_ID column in the Customer table and the
Customer_ID column in the Customer_Info table.
Steve will determine if a table was added between DefaultVersion_1 and
DefaultVersion_2 or if a table was deleted. He can view the relationship type by
returning to the Group Discovery Results window.
He will verify the following results:
v That the new table is in the group.
v That the related tables are enforced by System RI. If they are related in an
unexpected way, Steve would double check Sameer’s work.

Results

The type of validation information that Steve discovers with Optim Database
Relationship Analyzer will help him to understand the changes that other people
make to the database and help him to catch inconsistencies or mistakes quickly.
Related tasks
“Validating changes by using version comparison” on page 75
You can validate changes that were made to your database or database application
by comparing different versions of your group discovery results.

Scenario: Discovering hard-to-find relationships by using Optim


Database Relationship Analyzer
This scenario describes how Optim Database Relationship Analyzer can help a
DBA to discover hard-to-find relationships within a database based on SQL trace
information.

About this task

Sameer is a new DBA who has just been hired by a banking company. Sameer
wants to change and restructure the Customer table of one of the company’s
databases. Specifically, Sameer wants to change the column data type in the
Customer table from varchar(18) to varchar(128), and he wants to break the
Customer table into two tables: Customer and Customer_Info.

Chapter 1. Optim Database Relationship Analyzer overview 7


The database is accessed daily by a number of applications that use dynamic SQL,
including checking account applications, savings account applications, credit card
applications, and loan applications. Sameer does not know which tables these
applications update or reference because this information does not exist in the
database catalog. Sameer needs to understand the relationships between the
applications and the tables within the database before he can make any changes.
Sameer will use Optim Database Relationship Analyzer to discover these
relationships.

The high-level process consists of the following steps:


1. To understand which tables the external applications update or reference,
Sameer turns on the SQL trace on the database for 24 hours. The trace
information is recorded into a file or database tables. During these 24 hours, all
of the SQL statements on the database are traced. For example, if a customer
withdraws money from a checking account, the withdrawal activity accesses
the Customer table in the database. Because Sameer enables the SQL trace, this
activity is traced.
2. Sameer can now use Optim Database Relationship Analyzer and run the Trace
Analyzer to understand the relationships between the applications and tables.
The Trace Analyzer examines the SQL trace information to determine which
tables are updated or referenced by the applications. The output of this process,
the Trace Analyzer results, is saved in the metadata for use during group
discovery.
3. If Sameer wants to make any structural changes to the Customer table, he can
now analyze the impact of such changes by running the group discovery
process with the Trace Analyzer results as a relationship source to generate the
groups of tables. Sameer specifies the Customer table as the starting point table
in the group discovery configuration and runs the group discovery process
with all of the possible relationship sources selected. The group discovery
process outputs a list of all the tables that are related to the Customer table.
4. Sameer examines the groups of related tables to determine the impact that the
changes to the Customer table will have on the database.
5. After impact analysis, Sameer and his team can change the Customer table
column data type to varchar(128), add the Customer_Info table, and make all of
the necessary changes to the tables that are related to the Customer table.
6. Sameer notifies the developers of the checking account application and other
applications that access the Customer table to update the code according to the
new database structure.

The following task provides the detailed steps to complete this scenario:
1. Sameer turns on the SQL trace on the user database for 24 hours. Depending
on the type of the database server, he has the following options:

8 IBM Optim Database Relationship Analyzer User’s Guide


Option Description
DB2 for Linux, UNIX, and Windows Create a DB2 event monitor and start the
trace. For example:
create event monitor monitor_name
for statements write to table
set event monitor monitor_name state=1

Where state=1 turns on the monitor. The


monitor name will be a part of the event
monitor statement table name that you will
need to specify to the Trace Analyzer. By
default, the statement table name is
STMT_monitor_name.
DB2 for z/OS Start the DB2 trace by using the Generalized
Trace Facility (GTF) or the System
Management Facilities (SMF). For example:
start trace(perfm) DEST(GTF) class(30)
ifcid(63)

See “Starting a trace before running the


Trace Analyzer on a DB2 for z/OS server”
on page 81.
Oracle Enable the audit trace. For example, you can
issue the following command:
ALTER SYSTEM SET audit_trail=xml,
extended SCOPE=SPFILE;

You can use either the xml,extended or the


db,extended parameters.

2. Sameer stops the trace after 24 hours.


3. He then starts the Optim Database Relationship Analyzer client.
4. Sameer creates an Optim Database Relationship Analyzer set. Within the set, he
creates a group discovery configuration with specific discovery options that
will result in the discovery of a group of related tables. Sameer will:
a. Right-click the user database and select Create New Set or click the toolbar
icon and name the set in the Create New Set wizard.
b. Right-click the set and select Create New Group Discovery Configuration
from the menu options. Sameer can also click the Create New Group
Discovery Configuration icon from the toolbar to complete this step.
c. Enter a name for the group discovery configuration and click Finish. The
Group Discovery Configuration Editor opens, but you will not use the
editor until after you have run the Trace Analyzer.
5. Sameer will then run the Trace Analyzer on the group discovery configuration
by completing the following steps:
a. Right-click the group discovery configuration and select Run Trace
Analyzer from the menu options.
b. Complete the appropriate step based on the type of database that he is
using:
v If Sameer is running on a DB2 for z/OS system, enter the IFCID 63
record table name and the date and time range for the results of the SQL
trace to be considered.

Chapter 1. Optim Database Relationship Analyzer overview 9


v If Sameer is running on a DB2 for Linux, UNIX, and Windows system,
select the event monitor statement table name and the date and time
range for the results of the SQL trace to be considered.
v If Sameer is running on an Oracle system, select the date and time range
for the results of the SQL trace to be considered. Optim Database
Relationship Analyzer obtains Oracle trace information from the audit
views in the Oracle catalog.
c. Enter a job description. A meaningful job description can help Sameer
identify this Trace Analyzer process job at a later time.
d. Click Finish to start the Trace Analyzer.
The Trace Analyzer examines the SQL trace results within the specified date
and time range and records the tables and other information into the Optim
Database Relationship Analyzer metadata database.
6. After the Trace Analyzer process has finished running, Sameer right-clicks his
group discovery configuration and selects View Trace Analyzer Results to
view the results of the Trace Analyzer process. Optim Database Relationship
Analyzer displays a list of tables with their IDs, table schema names, the date,
and the time.
7. Sameer then runs the group discovery process to find the relationship groups.
He will:
a. Customize the group discovery options.
1) Right-click the group discovery configuration and select Edit Group
Discovery Configuration.
2) In the Set the Scope tab, select the Starting point tables radio button to
indicate that the group discovery process should base its search on the
starting point tables that are specified.
3) Click the Add Starting Point Tables button to bring up the Starting
Point Tables wizard. Use the wizard to select specific starting point
tables from the user database. For this example, the starting point table
is the Customer table.
4) For relationship sources, select the Catalog checkbox and System
Referential Integrity, Trigger, and Package.
5) Select Trace Analyzer results as a relationship source and select the
default granularity: Application level. For more information about the
Trace Analyzer granularity options, see “Choosing between application
level and unit of work level granularity for Trace Analyzer results” on
page 59.
6) In the Restrict the Scope tab, Sameer can specify boundary tables or
relationships to ignore if he does not want to include certain
relationships.
7) In the Expand the Scope tab, Sameer can specify additional relationships
to be included during the group discovery process.
8) Save the configuration by clicking File → Save or pressing Ctrl + S.
Sameer can save the configuration at any time.
b. Right-click the group discovery configuration and select Run Group
Discovery from the menu options.
c. In the Run Group Discovery wizard, review the configuration, enter a job
description, and click Finish to start the group discovery process. A
meaningful job description can help Sameer identify this group discovery
job at a later time.

10 IBM Optim Database Relationship Analyzer User’s Guide


Optim Database Relationship Analyzer captures all of the tables that are related
to the starting point table, which is the Customer table in this example.

Results

Sameer can now examine the groups of related tables to determine the impact that
the changes to the Customer table will have on the database. After impact analysis,
Sameer and his team can change the Customer table column data type to varchar
(128), add the Customer_Info table, and make all of the necessary changes to the
tables that are related to the Customer table. Additionally, Sameer can now notify
the developers of the applications to update the applications according to the new
database structure.
Related concepts
“The Optim Database Relationship Analyzer Trace Analyzer” on page 14
The Trace Analyzer is a program that accesses trace information and finds tables
that are referenced within it. After running the Trace Analyzer, you can run the
group discovery process with the Trace Analyzer results as the relationship source
to discover the relationships between these tables.

Scenario: Managing data governance with Optim Database


Relationship Analyzer
This scenario describes how you can use Optim Database Relationship Analyzer
groups to ensure that all of your related data travels together in one complete unit
in order to meet the data governance demands of your organization.

About this task

Steve, a senior DBA at a banking company, asks Sameer, a junior DBA, to archive
the data for former customers. The archive will function as a restore point for the
customers who want to reopen their old accounts. Steve also wants to use the
archived tables as a test database for the new customer inventory application that
the company is developing. Sameer needs to archive the Customer table from the
company’s database and all of the related tables by using Optim Data Growth or
any other archiving or backup tool. However, Sameer does not know how many
tables are related to the Customer table, so he will use Optim Database
Relationship Analyzer to find the table relationships. Optim Database Relationship
Analyzer can help Sameer answer the following questions:
v How do I know what objects are related so that I can archive them together?
v How do I know what other database objects I need to restore to the same point?
v How do I identify all of the tables that are needed in a test database?

The high-level process includes the following steps:


1. Sameer uses the Optim Database Relationship Analyzer client to create a new
set and group discovery configuration for the company’s database.
2. He specifies the Customer table as the starting point table in the group
discovery configuration options, so that all of the related tables are returned as
a group.
3. Sameer runs the group discovery process, which will return the group of
related tables that are related to the Customer table. These tables must be
considered as a single unit for archiving or creating a test database.
4. Sameer can now use the provided Optim Database Relationship Analyzer
integration stored procedures and the group information with backup and

Chapter 1. Optim Database Relationship Analyzer overview 11


recovery tools such as Optim Data Growth to archive the group of objects. He
can also create a smaller database that will contain all of the necessary tables to
test the customer inventory application.

The following task provides the detailed steps to complete this scenario:
1. Sameer creates an Optim Database Relationship Analyzer set. Within the set, he
creates a group discovery configuration with specific discovery options that
will result in the discovery of a group of related tables:
a. Right-click the user database and select Create New Set or click the toolbar
icon and name the set in the Create New Set wizard.
b. Right-click the set and select Create new group discovery configuration
from the menu options. You can also click the Create New Group
Discovery Configuration icon from the toolbar to complete this step. The
Create New Group Discovery wizard is displayed.
c. In the Create New Group Discovery wizard, enter a name for the group
discovery configuration, an optional description, and then click Finish. The
Group Discovery Configuration Editor opens.
2. Sameer will then specify the options that he wants to use to define the group
discovery process. He will:
a. In the Group Discovery Configuration Editor, add the Customer table as the
starting point table and save the configuration. You can access the Group
Discovery Configuration Editor by selecting Create New Group Discovery
Configuration or by right-clicking the group discovery configuration and
selecting Edit group discovery configuration from the menu.
3. Run the group discovery process.
a. Right-click the group discovery configuration and select Run Group
Discovery from the menu options.
b. In the Run Group Discovery wizard, review the group discovery
configuration.
c. Enter a job description. A meaningful job description can help Sameer
identify this group discovery process job run at a later time.
d. Click Finish to start the group discovery process.
The Group Discovery Results window opens when the process is finished.
Sameer now has a version of the group of all of the tables that are related to
the Customer table.
4. Sameer can now review the results of the group discovery process. He will:
a. If Sameer has closed the Group Discovery Results window, he can open it
by right-clicking the version and selecting View Relationships for This
Version. He can also right-click a group and select View Relationships for
This Group to view the relationships for that group. In the Group
Discovery Results window, he can click on the nodes the represent groups
of tables to explore the column based relationships within them. See
“Analyzing group discovery results” on page 71 for more information.
5. If the group discovery process captured all of the tables that he wanted, Sameer
can finalize his group discovery configuration. He can right-click the
configuration and select Finalize.
After Sameer finalizes the group discovery configuration, each run of the group
discovery process that uses that configuration will create a new version. If he
does not finalize the configuration , each new run of the group discovery
process with that configuration will replace the current version.

12 IBM Optim Database Relationship Analyzer User’s Guide


6. Sameer can use the information about the tables that are related and that must
always be considered together outside of Optim Database Relationship
Analyzer to perform his archive, backup, and recovery operations as well as to
create test databases. To integrate with Optim Data Growth or another backup
and recovery tool, he can use the GRDPREDEFGROUP and
GRDPREDEFGROUPDATA stored procedures that are provided:
a. From his archive and recovery tool, Sameer can call the
GRDPREDEFGROUP stored procedure with the Customer table as the input
parameter. The stored procedure returns the list of groups related to the
Customer table.
b. Sameer can then examine the tables and table relationships within a group
by calling the GRDPREDEFGROUPDATA stored procedure to decide which
tables should be archived together.

Results

Optim Database Relationship Analyzer provides a convenient way to recognize the


groups of tables that need to be archived together. Understanding table
relationships can help you to easily create restore points for your database and to
set up test databases.
Related reference
“Predefined groups stored procedure” on page 99
Use the GRDPREDEFGROUPS stored procedure to retrieve a list of groups for a
specific table.
“Integration with Optim Database Relationship Analyzer” on page 97
Optim Database Relationship Analyzer provides integration functions so that other
database applications can integrate with Optim Database Relationship Analyzer
and access table relationships through the Optim Database Relationship Analyzer
metadata database.

Optim Database Relationship Analyzer functions


Optim Database Relationship Analyzer comes with several different functions.

The main Optim Database Relationship Analyzer functions are:


v The group discovery process
v Trace Analyzer
v Integration APIs

The Optim Database Relationship Analyzer group discovery


process
The group discovery process runs at the Optim Database Relationship Analyzer
server and discovers the relationships between tables in the database and then
creates groups of tables based on these relationships.

The discovered relationships come from the following sources:


v Database catalog, such as System RI (primary-foreign key referential integrity),
package, and trigger information
v Trace Analyzer results from SQL trace
You can also guide the group discovery process with the following local options:

Chapter 1. Optim Database Relationship Analyzer overview 13


v You can assign an entry point for the group discovery process by specifying one
or more starting point tables. If you don’t specify a starting point table, the
group discovery process will run through the entire catalog.
v You can restrict the scope of the group discovery process by specifying
boundary tables or ignored relationships (parent-child table relationships).
v You can expand the scope of the group discovery process by defining additional
relationships.

Relationship Sources
Starting point
tables
Database catalog

Group
Discovery

Group
SQL trace discovery
configuration
Trace Analyzer scope
results

Figure 4. The Optim Database Relationship Analyzer group discovery process

Related reference
“Group discovery stored procedure” on page 88
Use the GRDDISCRUN stored procedure to run the group discovery process.

The Optim Database Relationship Analyzer Trace Analyzer


The Trace Analyzer is a program that accesses trace information and finds tables
that are referenced within it. After running the Trace Analyzer, you can run the
group discovery process with the Trace Analyzer results as the relationship source
to discover the relationships between these tables.

When SQL trace is activated, the database trace monitors and records database
activity such as the SQL statements that are transmitted from the application to the
database using the database connection. The Trace Analyzer analyzes these SQL
statements and records the tables that are referenced within them into the Optim
Database Relationship Analyzer metadata database.

14 IBM Optim Database Relationship Analyzer User’s Guide


When you run the group discovery process with Trace Analyzer results as the
relationship source, Optim Database Relationship Analyzer groups tables that are
referenced within the same application or unit of work depending on the Trace
Analyzer results granularity selection.

Groups

output

Group
input Discovery
Process
DB

Optional: before running the group discovery process


input

Trace Analyzer
output results

input Trace
Analyzer

SQL Trace

Figure 5. Using the Trace Analyzer results with the group discovery process.

The Trace Analyzer can help the group discovery process to find relationships that
are not defined in the database catalog. For example, when an SQL application
regularly accesses and updates a certain number of tables that are not related in
any other way, the Trace Analyzer will still discover all of those tables by
analyzing the SQL statements. Through the group discovery process, you can use
the Trace Analyzer output to find the relationships between tables and the
applications within the database that access those tables. The Trace Analyzer
process supports DDL and DML statements such as, CREATE, ALTER, INSERT,
SELECT, DELETE, UPDATE and LOCK.

Trace Analyzer restrictions

The Trace Analyzer has the following restrictions:


v If the table name is missing the schema name in the trace SQL statements, then
the Trace Analyzer process will query the catalog and take into consideration all
of the tables that have that table name. The results might include multiple table
names with different schema names. For example, if the EMPLOYEE table exists
in your catalog with three different schema names : DSN8910.EMPLOYEE,
ADMF001.EMPLOYEE, and USRT001.EMPLOYEE, then for the query SELECT *
from EMPLOYEE, the Trace Analyzer will query the catalog and return all of the
tables that have the name EMPLOYEE. So, the tables for the three schema

Chapter 1. Optim Database Relationship Analyzer overview 15


names: DSN8910.EMPLOYEE, ADMF001.EMPLOYEE, and USRT001.EMPLOYEE,
will be returned by the Trace Analyzer process for that particular trace ID in this
example. The Trace Analyzer process does not process the SQL statement SET
CURRENT SCHEMA or SET CURRENT SQLID to determine the schema name of the
table.
v The Trace Analyzer assumes that the SQL statements run successfully. The SQL
trace contains only dynamic SQL statements, and does not contain the
information on whether or not the statement has been executed successfully. If
the SQL statement is not valid, then the Trace Analyzer can return results that
are not exactly correct either. For example, if table T1 contains the column C1
CHAR and table T2 contains the column C2 CHAR, a valid INSERT statement
would be INSERT INTO T1(C1) VALUES(’1’). If the SQL statement was
erroneously executed as INSERT INTO T2(C1) VALUES(’1’), it would fail with
SQLCODE -206 C1 is not valid. The Trace Analyzer, however, would still
consider table T2 as a valid table for this SQL statement.
Related tasks
“Scenario: Discovering hard-to-find relationships by using Optim Database
Relationship Analyzer” on page 7
This scenario describes how Optim Database Relationship Analyzer can help a
DBA to discover hard-to-find relationships within a database based on SQL trace
information.
Related reference
“Trace Analyzer stored procedure” on page 95
Use the TRACESPINNER stored procedure to run the Trace Analyzer process.

The Optim Database Relationship Analyzer integration APIs


function
You can use the Optim Database Relationship Analyzer integration APIs to retrieve
group and table relationship information.

The Optim Database Relationship Analyzer integration API function contains a set
of SQL views and stored procedures that are defined on the Optim Database
Relationship Analyzer metadata database. You can use these views and stored
procedures to retrieve group information and table relationship information.

Any DBMS tool or application can use the group discovery configurations to
retrieve information that might be helpful in administering your environment.
DBMS applications can call these stored procedures. Optim Database Relationship
Analyzer provides sample code statements that you can use to create a sample
program to call integration stored procedures.

16 IBM Optim Database Relationship Analyzer User’s Guide


Related reference
“Integration with Optim Database Relationship Analyzer” on page 97
Optim Database Relationship Analyzer provides integration functions so that other
database applications can integrate with Optim Database Relationship Analyzer
and access table relationships through the Optim Database Relationship Analyzer
metadata database.
“Optim Database Relationship Analyzer database object views” on page 109
The GRD_GROUPINGS and GRD_RELATIONS views, which are available on the
Optim Database Relationship Analyzer server, allow you to access the metadata
without querying multiple Optim Database Relationship Analyzer metadata tables.

Summary of changes
This topic summarizes the technical changes for this edition.

New and changed information is indicated by a vertical bar (|) to the left of a
change. Editorial changes that have no technical significance are not noted.

| Optim Database Relationship Analyzer v 2.1 includes the following new features:
| New Eclipse-based user interface
| Optim Database Relationship Analyzer client comes in an Eclipse v 3.4.2
| IDE-based user interface, which provides shell-shared capability with other
| Eclipse-based applications such as Optim Designer.
| Column-based table relationships
| Optim Database Relationship Analyzer now discovers column-based table
| relationships for package, trigger, and Trace Analyzer relationship sources.
| Version Comparison Results dialog improvements
| Icons are now used in the Version Comparison Results view to highlight
| the added, deleted, and starting point tables.
| Version comparison API
| Version comparison API provides the ability to run the option from a user
| application or from the command line.
| User-defined relationships and additional relationships sharing
| The group discovery process no longer consider the user-defined
| relationship information as a relationship source. You can specify
| user-defined relationships on the database level and import these
| relationships into your group discovery configuration as additional
| relationships. The user-defined relationship information is global, and it
| can be shared between the database users. You can also export your
| additional relationships into the list of user-defined relationships, so that
| they can be shared between users. You can also import from the
| user-defined relationships list into the ignored relationships list in the
| group discovery process. You can not export from the ignored relationships
| into the user-defined list because ignored relationships do not have column
| information.
| Terminology changes
| The term view used in Optim Database Relationship Analyzer v 1.1 has
| been changed to group discovery configuration.
| The term user-defined RI is no longer used because user-defined RIs are no
| longer a relationship source for the group discovery process. User-defined
| relationships are relationships that can be imported into your group
| discovery process as additional relationships or ignored relationships.

Chapter 1. Optim Database Relationship Analyzer overview 17


Optim Database Relationship Analyzer documentation and updates
This topic explains where to find Optim Solutions information on the Web, and
explains how to receive information updates automatically.

Optim Database Relationship Analyzer information on the Web

The Optim Solutions Library page provides current product documentation that
you can view, print, and download. To locate publications with the most
up-to-date information, refer to the following Web page:

http://www.ibm.com/software/data/data-management/optim/library.html

The Data Management Tools Solutions Web site shows how IBM solutions can help
IT organizations maximize their investment in DB2 and IMS™ databases while
staying ahead of today’s top data management challenges:

http://www.ibm.com/software/data/db2imstools/solutions/index.html

Receiving documentation updates automatically

To automatically receive a weekly email that notifies you when new technote
documents are released, when existing product documentation is updated, and
when new product documentation is available, you can register with the IBM My
Support service. You can customize the service so that you receive information
about only those IBM products that you specify.

To register with the My Support service:


1. Go to http://www.ibm.com/support/mysupport
2. Enter your IBM ID and password, or create one by clicking register now.
3. When the My Support page is displayed, click add products to select those
products that you want to receive information updates about. The DB2 and
IMS Tools category is located under Software → Data and Information
Management → Database Tools & Utilities.
4. Click Subscribe to email to specify the types of updates that you would like to
receive.
5. Click Update to save your profile.

Accessibility
Accessibility features are included to help users who have a physical disability,
such as restricted mobility or limited vision, to use this software product
successfully.

The major accessibility features in Optim Database Relationship Analyzer are:


v You can operate all features by using the keyboard instead of the mouse.
v You can change the system settings to specify a higher contrast for all user
interface controls.
v You can change the font settings to a larger font size.

Important: In the Version Comparison Results view, any row with a blank entry in
the Comments column indicates that the table in that row is common
to the two versions. A screen reader program might read the table,

18 IBM Optim Database Relationship Analyzer User’s Guide


even if the Hide Similarities check box is checked. Therefore, the
notation in the Comments column determines if the table is common
or not.

Chapter 1. Optim Database Relationship Analyzer overview 19


20 IBM Optim Database Relationship Analyzer User’s Guide
Chapter 2. Installing and configuring Optim Database
Relationship Analyzer
The general process of installing and configuring Optim Database Relationship
Analyzer consists of installing the server and client components, and configuring
the client to connect to the server metadata database.

About this task


1. Install the Optim Database Relationship Analyzer server component. You can
install Optim Database Relationship Analyzer server on Windows, UNIX, or
z/OS systems depending on the product you have purchased.
2. Install the Optim Database Relationship Analyzer client component. You can
install Optim Database Relationship Analyzer client on Windows systems only.
You can use the Windows client to connect to an Optim Database Relationship
Analyzer server on Windows, UNIX, or z/OS.
3. Configure the Optim Database Relationship Analyzer client to connect to the
metadata database that was created during the server installation.
Related concepts
“The Optim Database Relationship Analyzer metadata database” on page 42
The Optim Database Relationship Analyzer metadata database (GRDDBV2) is a
collection of program configuration data, user database connections, user actions,
trace information, and other data that is used by Optim Database Relationship
Analyzer.
Related tasks
“Installing the Optim Database Relationship Analyzer server by using the
installation wizard” on page 23
You can install the Optim Database Relationship Analyzer server on Windows and
UNIX systems by using the installation wizard.
“Creating and configuring metadata information for z/OS” on page 31
For z/OS systems, you need to create and configure the Optim Database
Relationship Analyzer metadata information.

Installing the Optim Database Relationship Analyzer server for UNIX


and Windows systems
These topics list the prerequisites, requirements, and steps for installing the Optim
Database Relationship Analyzer server component for UNIX and Windows
systems.

Optim Database Relationship Analyzer server software


requirements for UNIX and Windows systems
You can install Optim Database Relationship Analyzer only on a supported
platform.

The following platforms are supported for the Optim Database Relationship
Analyzer server installation:
v Windows XP, 2003, 2008, and Vista (32 bit)
v AIX Version 5.3, and 6.1 (64 bit)

© Copyright IBM Corp. 2008, 2009 21


v Solaris 9 and 10 (64 bit)

To install Optim Database Relationship Analyzer server, you must have one or
more of the following clients installed on your system (check the product
README file for the latest maintenance information):
v IBM DB2 UDB client V9.7 for Linux, UNIX, and Windows or later
v IBM DB2 UDB client V9.5 for Linux, UNIX, and Windows or later
v IBM DB2 UDB client V9.1 for Linux, UNIX, and Windows Fix Pack 4 or later
v Oracle Database 10g client

Attention: The JDBC driver for Oracle needs to be in the classpath on the server
for Optim Database Relationship Analyzer to be able to connect to an Oracle
database.

Optim Database Relationship Analyzer supports the following user databases


(check the product README file for the latest maintenance information):
v IBM DB2 UDB for Linux, UNIX, and Windows V9.7
v IBM DB2 UDB for Linux, UNIX, and Windows V9.5
v IBM DB2 UDB for Linux, UNIX, and Windows V9.1
v Oracle Database 10g

| Restriction: Optim Database Relationship Analyzer is only able to access the


| database directory of the default DB2 client. If you want to access DB2
| 9.5 databases when the DB2 9.7 client is the default, you need to
| catalog these databases in the DB2 9.7 client as remote databases
| either through the Configuration Assistant or with the catalog tcpip
| node and the catalog database commands.

Optim Database Relationship Analyzer server hardware


requirements
Ensure that your system has enough resources. Check the RAM and available disk
space.

The Optim Database Relationship Analyzer server has the following hardware
requirements:
v Memory and disk space sufficient to fulfill DB2 or Oracle minimum
requirements
v Temporary disk space for product installation:
– Approximately 250 MB on Windows
– Approximately 360 MB on AIX
– Approximately 400 MB on Solaris

Important: For Windows systems, the installation program uses the directory in
the TEMP environment variable to store the temporary files. For
UNIX, the installer uses /tmp as the default temporary directory.
Prior to running the installation program, ensure that you have
enough disk space in these directories.
v Disk space requirements for installing the product files:
– Approximately 150 MB on Windows
– Approximately 175 MB on AIX
– Approximately 210MB on Solaris

22 IBM Optim Database Relationship Analyzer User’s Guide


Installing the Optim Database Relationship Analyzer server by
using the installation wizard
You can install the Optim Database Relationship Analyzer server on Windows and
UNIX systems by using the installation wizard.

Before you begin

To install the Optim Database Relationship Analyzer server on UNIX systems, you
must be logged in as a database instance owner with root authority.
1. Place the Optim Database Relationship Analyzer CD into the CD drive or
unzip the install archive into a temporary directory and run the installation file
draxxxsvrsetup where xxx stands for the specific platform that you want to use.
For example, the installation file for Windows systems is drawin32svrsetup.exe
.
2. On the Introduction page, click Next to continue the installation. If the Optim
Database Relationship Analyzer server is already installed on the machine, you
will be asked to exit the installation program.
3. On the next page, accept the terms of the license agreement and click Next
4. Choose the destination folder on the next page and click Next. The default
installation location is set to C:\Program Files\IBM\ for Windows and /opt/IBM
for UNIX.
5. Enter the schema names for the metadata tables and stored procedures for the
Optim Database Relationship Analyzer metadata database and click Next. The
default value for both fields is GRDV2.
6. If the installation process cannot automatically reserve a port number for the
Optim Database Relationship Analyzer metadata database, enter a new port
number. By default, the installation wizard will try to reserve port 49953. If this
port is not available, the process will try the next 24 consecutive port numbers
from 49954 to 49977. If none of the port numbers are available, you will need to
enter a different port number between 50000 and 60000. If the host name and
the port number are identified, the installation wizard will display the values
on the Collect Configuration Information page and ask if you want to start the
network server.
7. Click Yes if you want to start the Optim Database Relationship Analyzer server
after the installation.
8. On the summary page, verify that you have enough disk space and click
Install. The Optim Database Relationship Analyzer server installation process
starts. After copying the files, the installation program will create the Optim
Database Relationship Analyzer metadata database and start the Optim
Database Relationship Analyzer server if you chose to start the server during
the installation.
9. When the installation is complete, click Done to exit the wizard.

Results

All of the files will be installed to the destination directory in the


DatabaseRelationshipAnalyzer2.1\server subdirectory. A grdserver.properties
file with all of the server settings will be created in the
DatabaseRelationshipAnalyzer2.1\server\config directory. You can refer to the
read-only properties file when you configure the Optim Database Relationship
Analyzer client to connect to the metadata database on this server.

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 23


What to do next

After installation, go to the server directory to verify that the metadata database is
created successfully. View the grddbcreate.out and grdnetwork.out log files in the
DatabaseRelationshipAnalyzer2.1\server\log directory. If the grddbcreate.out file
has errors, you should correct them and reinstall Optim Database Relationship
Analyzer. If there are errors in the grdnetwork.out file, you can rerun the
grdStartNetworkServer script.
Related concepts
“The Optim Database Relationship Analyzer metadata database” on page 42
The Optim Database Relationship Analyzer metadata database (GRDDBV2) is a
collection of program configuration data, user database connections, user actions,
trace information, and other data that is used by Optim Database Relationship
Analyzer.
Related tasks
“Creating and configuring metadata information for z/OS” on page 31
For z/OS systems, you need to create and configure the Optim Database
Relationship Analyzer metadata information.
Chapter 2, “Installing and configuring Optim Database Relationship Analyzer,” on
page 21
The general process of installing and configuring Optim Database Relationship
Analyzer consists of installing the server and client components, and configuring
the client to connect to the server metadata database.

Optim Database Relationship Analyzer server environment


variables
The Optim Database Relationship Analyzer server installation creates an
environment variable on your machine.

The environment variable is:


GRDV2SERVERHOME
The installation program creates GRDV2SERVERHOME as a system-level
environment variable, and its value will be set to the Optim Database
Relationship Analyzer server installation directory appended by
\DatabaseRelationshipAnalyzer2.1\server. For example, if you specify
C:\Program Files\IBM\ in the destination panel, GRDV2SERVERHOME
will point to C:\Program Files\IBM\DatabaseRelationshipAnalyzer2.1\
server, and all of the Optim Database Relationship Analyzer server files
will be placed in this directory.

Installing the Optim Database Relationship Analyzer server by


using silent installation
If you cannot use the graphical wizard to install Optim Database Relationship
Analyzer server, or if you need to install Optim Database Relationship Analyzer
server on multiple systems, you can run the set up program with the silent option
for Windows and UNIX systems. If you have multiple systems, you can use a
silent installation to do concurrent and unattended installations.
1. Create an ASCII text response file that contains all of the required information.
A typical response file for Windows systems is shown in the following example
(for UNIX systems, substitute C:\\Program Files\\IBM with a UNIX installation
directory) :

24 IBM Optim Database Relationship Analyzer User’s Guide


# Replay feature output
# ---------------------
# This file was built by the Replay feature of InstallAnywhere.
# It contains variables that were set by Panels or Consoles.

INSTALLER_UI=silent
LICENSE_ACCEPTED=true
#Choose Install Folder
#---------------------
USER_INSTALL_DIR=C:\\Program Files\\IBM

#Get User Input


#--------------
# schema name for metadata database
USER_SCHEMA_1=GRDV2
# schema name for stored procedure
USER_SCHEMA_2=GRDV2
#start network server
USER_NETWORK_RESULTS_1=Yes

In the response file, the lines that start with a pound symbol (#) are comments,
the USER_INSTALL_DIR parameter defines the installation directory, the
USER_SCHEMA_1 parameter defines the schema name for the metadata
database tables, the USER_SCHEMA_2 parameter defines the schema name for
the metadata database stored procedures, and the
USER_NETWORK_RESULTS_1 parameter defines if you want to start the
network server after the installation.
2. Save the response file. For example, you can save it as server.properties.
3. Start the silent installation by adding the -f option with the response file name
to the installation command. For example, for Windows systems, type:
drawin32svrsetup.exe -f C:\server.properties

Where C:\server.properties is the absolute path to the response file.


For UNIX systems, type:
draxxxsvrsetup.bin -f server.properties

Where xxx is the platform that you want to use and server.properties is the
absolute path to the response file.

Results

All of the files will be installed to the destination directory in the


DatabaseRelationshipAnalyzer2.1\server subdirectory. The silent installer will
start the Optim Database Relationship Analyzer Network Server automatically
after the installation if you set the USER_NETWORK_RESULTS_1 parameter to
Yes.

Setting up login credentials to Optim Database Relationship


Analyzer server
Optim Database Relationship Analyzer administrator with root authority can
change the default user password or add more user entries to manage access to the
Optim Database Relationship Analyzer server.
1. Open the derby.properties file, which is located in the server installation
directory.
2. Change the password for the default user APP. For example, change
derby.user.APP=temp4now to derby.user.APP=mynewpassword

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 25


3. Add a new user entry according to the template:
derby.user.user_name=user_password. For example:
derby.user.johnsmith=temp4now

to add johnsmith as a user with a password of temp4now. The user name and
the password are case sensitive.
4. Restart the Optim Database Relationship Analyzer server.
Related concepts
“The Optim Database Relationship Analyzer for Linux, UNIX, and Windows server
security” on page 87
Because the Optim Database Relationship Analyzer for Linux, UNIX, and Windows
server uses an Apache Derby database to store metadata information, the Optim
Database Relationship Analyzer for Linux, UNIX, and Windows server follows the
Apache Derby security policy to protect the database.
Related tasks
“Starting and stopping the Optim Database Relationship Analyzer server”
To start the Optim Database Relationship Analyzer server manually, run the
grdStartNetworkServer script while you are logged in as the database instance
owner. Use the grdStopNetworkServer script to stop the Optim Database
Relationship Analyzer network server.

Starting and stopping the Optim Database Relationship


Analyzer server
To start the Optim Database Relationship Analyzer server manually, run the
grdStartNetworkServer script while you are logged in as the database instance
owner. Use the grdStopNetworkServer script to stop the Optim Database
Relationship Analyzer network server.

Before you begin

For UNIX systems, the instance owner will need root authority to run the
grdStartNetworkServer and grdStopNetworkServer scripts.

About this task

The Optim Database Relationship Analyzer network server, which holds all of the
user metadata, serves as a connection between your Oracle or DB2 databases and
the Optim Database Relationship Analyzer client. When you first install the Optim
Database Relationship Analyzer server application, the installation program will
ask you if you want to start the Optim Database Relationship Analyzer server
automatically. If you click Yes, the Optim Database Relationship Analyzer server
will start, and you can run Optim Database Relationship Analyzer immediately.
The Optim Database Relationship Analyzer network server stops whenever the
system is shut down, so you need to restart the server manually every time you
restart the system.
1. Change to the DatabaseRelationshipAnalyzer2.1\server\config directory for a
Windows system or change to the DatabaseRelationshipAnalyzer2.1/server/
config directory for UNIX systems. For Windows platforms, you can also click
Start → All Programs → IBM Optim Database Relationship Analyzer Server 2.1
and select the Start Server or Stop Server options.
2. Run either the start or stop scripts for your system.

26 IBM Optim Database Relationship Analyzer User’s Guide


v To start the Optim Database Relationship Analyzer server, run the
grdStartNetworkServer.bat script for Windows systems or the
grdStartNetworkServer.sh script for UNIX systems.

UNIX: For UNIX systems, you must have a database instance owner with
root authority to start the network server.
If you want to use Optim Database Relationship Analyzer with a DB2
database, you need to be in a DB2 environment (for example, you need to
have an environment set up by the db2profile script). To use Optim Database
Relationship Analyzer with an Oracle database, you must verify that the
ORACLE_HOME environment variable is set up.

Important: If you install Oracle on the same machine that you want to
install the Optim Database Relationship Analyzer server and that
machine has a dynamic IP address, then you must start the
network server with 0.0.0.0 as the HostName, which is the third
parameter inside the start and stop server scripts. You must do
this because Oracle requires that a loopback adapter is installed
for this kind of configuration. However, the Optim Database
Relationship Analyzer server, Derby, assumes that you are using
a local system if there is a loopback. That would mean that only
a client on the same system could access the server using
localhost. In order for remote clients to access to this kind of
server system (dynamic IP and Oracle installed), the 0.0.0.0 needs
to be set when you start the Optim Database Relationship
Analyzer server.
v To stop the Optim Database Relationship Analyzer server, run the
grdStopNetworkServer.bat script for Windows systems or the
grdStopNetworkServer.sh script for UNIX systems.

Important: For UNIX systems, you need to have root authority to stop the
Optim Database Relationship Analyzer server.
Related concepts
“The Optim Database Relationship Analyzer for Linux, UNIX, and Windows server
security” on page 87
Because the Optim Database Relationship Analyzer for Linux, UNIX, and Windows
server uses an Apache Derby database to store metadata information, the Optim
Database Relationship Analyzer for Linux, UNIX, and Windows server follows the
Apache Derby security policy to protect the database.
Related tasks
“Setting up login credentials to Optim Database Relationship Analyzer server” on
page 25
Optim Database Relationship Analyzer administrator with root authority can
change the default user password or add more user entries to manage access to the
Optim Database Relationship Analyzer server.

Uninstalling the Optim Database Relationship Analyzer server


About this task

When you uninstall the Optim Database Relationship Analyzer server, the
uninstallation removes all of the files created by the installation process as well as
the metadata database.

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 27


Uninstalling the Optim Database Relationship Analyzer server
from Windows systems
Use the automatic uninstaller to remove Optim Database Relationship Analyzer
server from your machine.

Before you begin

Restriction: You must be logged in as a Windows administrative user to perform


this procedure.

About this task

Uninstalling the Optim Database Relationship Analyzer server will also shut down
the Optim Database Relationship Analyzer network server if it is running.
1. Launch the uninstaller. You have the following options:
v Select IBM Optim Database Relationship Analyzer Server 2.1 from the list
of programs in the Add or Remove Programs window in Windows Control
Panel and click Change/Remove.
v Run Uninstaller.exe from the uninst folder in your Optim Database
Relationship Analyzer server home directory.
2. Follow the instructions of the uninstallation wizard.
Attention: If you used silent installation to install Optim Database
Relationship Analyzer server, the uninstallation process will also be performed
silently without displaying the uninstallation wizard.

Results

The Optim Database Relationship Analyzer server is removed from your system.

Uninstalling the Optim Database Relationship Analyzer server


from UNIX systems
Use the automatic uninstaller to remove Optim Database Relationship Analyzer
server from your machine.

Before you begin

Restriction: You must be logged in as the root user to perform this procedure.

About this task

Uninstalling the Optim Database Relationship Analyzer server will also shut down
the Optim Database Relationship Analyzer network server if it is running.
1. Change to the $GRDV2SERVERHOME/uninst directory.
2. Launch the uninstaller by running ./Uninstaller. The initial uninstallation
window is displayed for all supported platforms.
3. Follow the instructions of the uninstallation wizard.
Attention: If you used silent installation to install Optim Database
Relationship Analyzer server, the uninstallation process will also be performed
silently without displaying the uninstallation wizard.

Results

The Optim Database Relationship Analyzer server is removed from your system.

28 IBM Optim Database Relationship Analyzer User’s Guide


Installing Optim Database Relationship Analyzer server for z/OS
The Optim Database Relationship Analyzer is installed by using SMP/E.
Instructions for installing the Optim Database Relationship Analyzer server, as well
as hardware, software, and maintenance requirements, are documented in the
Program Directory that is provided with the product.
1. Verify that your system is ready for Optim Database Relationship Analyzer
server installation:
a. Verify that your system meets the Optim Database Relationship Analyzer
server software requirements.
b. Verify that your USS environment is available by issuing the ishell or the
omvs command from TSO Option 6.
c. Verify that the Java SDK for z/OS is installed properly by issuing the java
-version command from the USS environment.
d. Verify that DB2 JDBC/SQLJ is installed properly.
e. Verify that the files db2jcc.jar, db2jcc_javax.jar,
db2jcc_license_cisuz.jar, and sqlj.zip, which are located in the
jcc/classes subdirectory of the DB2 install directory, have the permission
755 by issuing the ls -l command from the USS environment.
f. Verify that the WLM application environment for Java stored procedures is
configured properly. Refer to the DB2 Application Programming Guide and
Reference for Java to define a separate WLM environment for Optim Database
Relationship Analyzer Java stored procedures.

| Important: If you want to run two different versions of Optim Database


| Relationship Analyzer on the same z/OS system:
| v If you want to run both Optim Database Relationship
| Analyzer versions at the same time, create different WLM
| applications for each version.
| v If you can run one Optim Database Relationship Analyzer
| version at a time, then both Optim Database Relationship
| Analyzer versions can share the same WLM application.
| However, you need to create two data sets with language
| environment runtime options for the Optim Database
| Relationship Analyzer Java stored procedures (one set for each
| version). The data sets will contain the WLM application
| environment that can be specified as JAVAENV DD statement
| in the WLM startup procedure.
2. Install the Optim Database Relationship Analyzer server by using the
instructions in the program directory.
3. Configure your Optim Database Relationship Analyzer server installation:
a. Bind the DB2 JDBC (JCC) driver package.
b. Create and configure the Optim Database Relationship Analyzer metadata
database information.
c. Create the Optim Database Relationship Analyzer integration view.
d. Define the Optim Database Relationship Analyzer Java stored procedures to
DB2.
e. Grant the appropriate authorizations on z/OS.

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 29


Optim Database Relationship Analyzer server software
requirements for z/OS
You can install Optim Database Relationship Analyzer only on a supported
platform.

The Optim Database Relationship Analyzer server has the following software
requirements:
v IBM z/OS Version 1 Release 9 or later, with UNIX System Services (USS),
Workload Manager (WLM), and Resource Recovery Services (RRS)
v DB2 UDB for z/OS V8 or V9 with a DB2 JDBC/SQLJ driver
v REXX language support for DB2
v Java 6 SDK for z/OS

Binding the DB2 JDBC (JCC) driver package on z/OS


You must bind your DB2 Universal JDBC (JCC) driver packages on your z/OS
systems.

About this task

The Universal JDBC driver does not use the same JDBC packages as the z/OS
JDBC drivers. It also uses a different process for binding its packages. The
Universal JDBC driver uses a DRDA-based connection to the target DB2 system
when creating the required packages (JCC).

To bind the JCC drivers, you can either run the supplied GRDJBIND member in
SGRDSAMP data set, or you can bind the drivers manually, which requires UNIX
System Services (USS) access. To bind the drivers manually, complete the following
steps.
1. Update your CLASSPATH, PATH, and LIBPATH.
If you are using your own USS directory to bind the packages, make sure that
you have the correct CLASSPATH, PATH, and LIBPATH settings to run the JCC
Binder. You can avoid manually updating the CLASSPATH by ensuring that the
USS profile is updated correctly with the CLASSPATH, PATH, and LIBPATH
information or by ensuring that your USERIDs profile contains the correct
CLASSPATH, PATH, and LIBPATH information. You can update the
CLASSPATH, PATH, and LIBPATH statements in the /etc/profile file or in the
.profile file in your home directory. The following examples show the proper
settings for the CLASSPATH, PATH, and LIBPATH environment variables:
CLASSPATH
CLASSPATH=/usr/lpp/db2/db2810/jcc/classes/db2jcc_license_cisuz.jar
CLASSPATH=/usr/lpp/db2/db2810/jcc/classes/db2jcc.jar:$CLASSPATH
export CLASSPATH
PATH
PATH=/usr/lpp/java160/J6.0/bin:$PATH
PATH=/usr/lpp/db2/db2810/jcc/bin:$PATH
export PATH
LIBPATH
LIBPATH=/usr/lpp/db2/db2810/lib:$LIBPATH
LIBPATH=/usr/lpp/db2/db2810/jcc/lib:$LIBPATH
export LIBPATH
2. Invoke the JDBC bind from the command line, for example:

30 IBM Optim Database Relationship Analyzer User’s Guide


java com.ibm.db2.jcc.DB2Binder
-url jdbc:db2://server_name:port_number/database_name
-user user
-password pswd
-collection collection
-size size
Where:
url
The URL that identifies the target DB2 system. The variable parts of the
URL are:
v server_name: the IP address or domain name of the host system where
the target DB2 system resides.
v port_number: the server port number that is configured for the TCP/IP
communications on the target DB2 system.
v database_name: the database name of the target DB2 system. On DB2 for
z/OS systems, the database name is referred to as a location name.
user
The user name that you will use to connect to the target DB2 system. The
user name that you specify must have bind authority.
password
The password that you will use to connect to the target DB2 system.
collection
The collection ID for the JDBC packages. You must use NULLID.
size
The size parameter controls the number of Statement, PreparedStatement,
or CallableStatement objects that can be opened concurrently. The default
size value is 3, which is adequate in most cases. If Optim Database
Relationship Analyzer returns SQLExceptions with -805 SQLCODEs,
increase the -size value.
For example, look at the following invocation:
java com.ibm.db2.jcc.DB2Binder
-url jdbc:db2://stlmvs1.ibm.com:446/stlec1 -user SYSADM
-password PASSWRD -collection NULLID -size 6

What to do next

For information about Java in USS and WLM environments, see the DB2 for z/OS
Stored Procedures: Through the CALL and Beyond at http://www.redbooks.ibm.com/
Redbooks.nsf/RedbookAbstracts/sg247083.html?Open.

Creating and configuring metadata information for z/OS


For z/OS systems, you need to create and configure the Optim Database
Relationship Analyzer metadata information.
1. Create the metadata database, table spaces, and tables by running the
GRDCRMET member in the SGRDSAMP data set.
2. Customize the GRDCRMET member by completing the following substeps:
a. Required: Set the BUFFERPOOL and STOGROUP parameters to the
appropriate settings for your environment to handle Optim Database
Relationship Analyzer objects.

Tip: It is recommended to create a new STOGROUP parameter for Optim


Database Relationship Analyzer version 2.

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 31


b. Optional: Change the table space names that you want to use for
maintaining Optim Database Relationship Analyzer objects.
c. Optional: Review and change the primary and the secondary quantities for
the table space.
d. Optional: For optimal performance, ensure that the metadata table space is
segmented. Additional information is provided in the member.

Tip: Use the default schema name GRDV2 without any change. If, however,
for any reason a different schema name is required, be sure to change
the schema names consistently in the copies of all members of the
SGRDSAMP target library that have the GRDV2 schema names.
3. Set up the default properties in the GRD_USERPROPS table by running the
GRDDEFPR member in the SGRDSAMP data set. Optim Database Relationship
Analyzer adds a new row with the user name into GRD_USERPROPS table
while connecting from client to server. The following information can help you
configure the member:
Table 1. The values and descriptions for the GRD_USERPROPS table.
Property Default value Description
USERID DRA_DEFAULT_PROPS The authorization ID to
access to the Optim Database
Relationship Analyzer
metadata database
GRD_METADATA_OWNER GRDV2 The schema name for the
Optim Database Relationship
Analyzer metadata tables
GRD_STORPROC_SCHEMA GRDV2 The schema name for the
Optim Database Relationship
Analyzer stored procedure
LOGFILE USERID The default high-level
qualifier that Optim
Database Relationship
Analyzer uses to allocate log
files; with the default
USERID value, the log files
will be named
user_ID.GRDLOG and
user_ID.GRDDBG.LOG
LOGLEVEL 2 Provides the logging level for
the Optim Database
Relationship Analyzer log
files. You can use the
following values:
v 1 for log execution,
warning, and error
information
v 2 for warning, and error
information
v 3 for error information
only

4. Create the integration view by running the GRDCFISH member in the


SGRDSAMP data set.

32 IBM Optim Database Relationship Analyzer User’s Guide


Related concepts
“The Optim Database Relationship Analyzer metadata database” on page 42
The Optim Database Relationship Analyzer metadata database (GRDDBV2) is a
collection of program configuration data, user database connections, user actions,
trace information, and other data that is used by Optim Database Relationship
Analyzer.
Related tasks
“Installing the Optim Database Relationship Analyzer server by using the
installation wizard” on page 23
You can install the Optim Database Relationship Analyzer server on Windows and
UNIX systems by using the installation wizard.
Chapter 2, “Installing and configuring Optim Database Relationship Analyzer,” on
page 21
The general process of installing and configuring Optim Database Relationship
Analyzer consists of installing the server and client components, and configuring
the client to connect to the server metadata database.

Defining the Optim Database Relationship Analyzer Java


stored procedures to DB2 on z/OS
You need to define the Optim Database Relationship Analyzer Java stored
procedures before using Optim Database Relationship Analyzer on a DB2 for z/OS
server.
1. Set up your WLM application environment. Optim Database Relationship
Analyzer delivers 13 jar files. Due to the length restriction for the data set that
the JAVAENV DD statement points to, you need to create a z/OS UNIX System
Service (USS) data set that contains the CLASSPATH for the jar files and has
the data set that the _CEE_ENVFILE parameter points to in the data set that
the JAVAENV DD statement points to. Other settings for the environment
variables, if wanted, can also be moved into this data set pointed to by the
_CEE_ENVFILE parameter. For example:
v Specify the content of the data set by JAVAENV DD statement in the WLM
startup procedure:
XPLINK(ON),
ENVAR("JAVA_HOME=/usr/lpp/java160/J6.0",
JCC_HOME=/usr/lpp/db2/db2810/jcc
"_CEE_ENVFILE=/u/sysadm/usr/lpp/grd/v2r1/classpath.txt”,
RESET_FREQ=-1),
MSGFILE(JSPDEBUG,,,,ENQ)
v The content of the USS data set (classpath.txt) that the _CEE_ENVFILE
parameter points to needs to include the CLASSPATH variable that has all
the 13 jar files. See the Program Directory for the post-installation editing of
the classpath.txt file.
2. Customize the GRDCRSTP member by specifying the WLM ENVIRONMENT
name for your installation.
3. Run the GRDCRSTP member in the SGRDSAMP data set to create the Optim
Database Relationship Analyzer Java stored procedures. Ensure that the WLM
information is correct in the GRDCRSTP member.

Establishing authorizations on a z/OS server


You need to grant proper authorizations to Optim Database Relationship Analyzer
users before using the product on a z/OS server.
1. Establish the metadata table privileges by running the GRDGRMET member in
SGRDSAMP data set.

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 33


2. Customize the GRDGRMET member by completing the following substeps:
Attention: The schema name for the Optim Database Relationship Analyzer
metadata tables is GRDV2. Changing the schema name can cause errors when
running Optim Database Relationship Analyzer.
a. Optional: Specify the Optim Database Relationship Analyzer user IDs to be
authorized to access the Optim Database Relationship Analyzer metadata
tables.
3. Establish the stored procedure privileges by running the GRDGRSTP member
in SGRDSAMP data set.
4. Customize the GRDGRSTP member by completing the following substeps:
Attention: The schema name for the Optim Database Relationship Analyzer
metadata tables is GRDV2. Changing the schema name can cause errors when
running Optim Database Relationship Analyzer.
a. Optional: Specify the Optim Database Relationship Analyzer user IDs to be
authorized to access the Optim Database Relationship Analyzer stored
procedures.
5. Establish the catalog tables privileges by running the GRDGRCAT member in
SGRDSAMP data set.
6. Customize the GRDGRCAT member by completing the following substeps:
a. Optional: Specify the Optim Database Relationship Analyzer user IDs to be
authorized to access the DB2 catalog tables.

Installing Optim Database Relationship Analyzer client


These topics list the prerequisites, requirements, and steps for installing the Optim
Database Relationship Analyzer client, which runs on Windows systems only.

Optim Database Relationship Analyzer client is based on Eclipse, an open source


Integrated Development Environment (IDE). Optim Database Relationship
Analyzer client uses an installation strategy that allows you to share the same
Eclipse shell with other products that are also based on Eclipse. When you use
shared Eclipse resources and install products into the same package group, all of
the features of the products that you have installed are available in the same user
interface.

The Optim Database Relationship Analyzer client installation program requires


IBM Installation Manager. If the installation program cannot find IBM Installation
Manager, it prompts you to install IBM Installation Manager, which is included
with the installation program.

When you install Optim Database Relationship Analyzer client, you have the
option of:
v Creating a new Eclipse installation (also called a package group)
Using a new Eclipse installation is recommended if you are a new user of Optim
Database Relationship Analyzer client because it is the simplest and easiest way
to install Optim Database Relationship Analyzer client.
v Using an existing package group that was created for other products that were
installed with IBM Installation Manager
v Extending an existing Eclipse installation (version 3.4.2)
Extending an existing Eclipse installation is recommended only if you have a
complete understanding of your environment and requirements.

34 IBM Optim Database Relationship Analyzer User’s Guide


Optim Database Relationship Analyzer client software
requirements
You can install Optim Database Relationship Analyzer only on a supported
platform.

The following platforms are supported for the Optim Database Relationship
Analyzer client:
v Windows XP (32 bit)
v Windows Vista (32 bit)

If you want to connect to an Optim Database Relationship Analyzer server for


z/OS, you will also need one the following programs:
v IBM DB2 Connect V9.1 for Linux, UNIX, and Windows Fix Pack 4 or later
v IBM DB2 Connect V9.5 for Linux, UNIX, and Windows
v IBM DB2 Connect V9.7 for Linux, UNIX, and Windows

Optim Database Relationship Analyzer client hardware


requirements
Ensure that your system has enough resources. Check the RAM and available disk
space.

The Optim Database Relationship Analyzer client has the following hardware
requirements:
v Approximately 750 MB of temporary disk space for product installation

Important: The installation program uses the directory in the TEMP


environment variable to store the temporary files. Prior to running
the installer, ensure that you have enough free space in this
directory.
v Approximately 500 MB of disk space for installing the product files

| Installing the Optim Database Relationship Analyzer client by


| using the installation wizard
| You can install the Optim Database Relationship Analyzer client on a Windows
| system by using the Installation Manager.
| 1. Start the Launchpad program.
| If you are installing from a CD, place the CD into the CD-ROM device. The
| Launchpad program starts automatically if the drive is set for autoplay. If the
| Launchpad program does not start automatically, use File Manager or
| Windows Explorer to locate your CD-ROM drive, and double-click the
| setup.exe file.
| If you are installing from a downloaded package and you have administrator
| privileges on your system, complete the following steps:
| a. Download the compressed .zip files to your hard drive.
| b. Extract the downloaded files into one temporary folder on your hard
| drive.
| c. Double-click the setup.exe file.
| The Welcome panel of the Launchpad program is displayed.

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 35


| Attention: If you don’t have administrator privileges, double-click the
| userinst.exe file in the disk1\InstallerImage_win32 directory of the
| installation package or CD and skip to Step 3. You will be using IBM
| Installation Manager V1.3.0 for non-administrator accounts.
| 2. Click Release Information to read information about the release. Click Install
| Product to start the installation.
| 3. If IBM Installation Manager version 1.3.0 is not already installed on your
| system, a program to install IBM Installation Manager runs automatically.
| Complete the following steps to install IBM Installation Manager:
| a. On the Welcome page, click Next.
| b. On the Destination Folder page, specify the folder where you want to
| install IBM Installation Manager. You can accept the default folder or
| specify your own. Click Next.
| c. On the Ready to Install the Program page, click Install.
| d. When the installation of IBM Installation Manager is complete, click
| Finish.
| 4. When IBM Installation Manager starts, click Next. The Optim Database
| Relationship Analyzer client is automatically preselected to be installed.
| 5. On the Location page, specify where to install the shared resources files and
| Optim Database Relationship Analyzer client specific files. The shared
| resource files are the common set of Eclipse plugins that other products that
| are based on Eclipse can use. You will be prompted to specify a location for
| the shared resources only if you have not used IBM Installation Manager to
| install other products. You can choose one of the following options:
| v If Optim Database Relationship Analyzer is the first Eclipse package on
| your system that was installed with IBM Installation Manager:
| a. Specify the shared directory. The default directory is C:\Program
| Files\IBM\SDPShared. You can accept the default directory or specify a
| different one.
| b. Specify the new package directory for the Optim Database Relationship
| Analyzer client. The default directory is C:\Program
| Files\IBM\DRAClient2.1. You can accept the default directory or specify
| a different one.
| v If some other Eclipse packages already exist on your system, you will not
| be prompted to enter a location for shared resources, and you can choose
| from the following options:
| a. Specify Use the existing package group to share the directory with an
| existing package group. If there is more than one existing package
| group, you can select one from the list. Once you select a package
| group, all your product files that can be shared will be installed in the
| shared resources directory, and the files that are specific to your product
| will be installed into the package group directory that you specify.
| b. Specify Create a new package group to install all your product specific
| files into a singe directory. The default directory is C:\Program
| Files\IBM\DRAClient2.1. You can accept the default directory or specify
| a different one.

| Remember: If you install Optim Database Relationship Analyzer into an


| existing Eclipse installation, any other installation directories
| that you might have specified earlier are ignored because the
| location will default to the existing Eclipse directory.

36 IBM Optim Database Relationship Analyzer User’s Guide


| 6. If you choose to install Optim Database Relationship Analyzer as a new
| package group, you can use an existing Eclipse IDE by specifying its location
| in the Eclipse IDE field. Leave the default value in the Eclipse IDE JVM
| field. If you do not specify an existing Eclipse IDE location, Optim Database
| Relationship Analyzer will install its own Eclipse IDE.
| 7. Click Next.
| 8. On the Features page, click Next. Optim Database Relationship Analyzer
| consists of a single feature. No additional optional features can be installed.
| 9. On the Summary page, verify the information. Click Back to change any
| specifications that were made on previous pages. Click Install to begin
| installing Optim Database Relationship Analyzer on your system.
| 10. When the installation completes, click Finish. Before you click Finish, you can
| click View the Log to see the installation details.
| 11. Close the Launchpad program.

| Results

| You are now ready to start Optim Database Relationship Analyzer.

Installing the Optim Database Relationship Analyzer client by


using the silent installation
If you can not use the graphical wizard to install the Optim Database Relationship
Analyzer client, or if you need to install the Optim Database Relationship Analyzer
client on multiple systems, you can run the set up program with the silent option.
If you have multiple systems, you can use a silent installation to do concurrent and
unattended installations.
1. Unzip the client installable to a directory on your system. For example,
C:\tmp\dra210win32.
2. Create a response file and install the product:
v To install both IBM Installation Manager and the Optim Database
Relationship Analyzer client at the same time:
a. Change directory to C:\tmp\dra210win32\disk1\InstallerImage_win32.
b. In the command prompt, type install.exe -record C:\tmp\imdra.res
-skipInstall C:\tmp\DRA. Where C:\tmp\DRA is a directory where have
the permission to create files.
Attention: C:\tmp\DRA is used to store template files for the installation.
You can reuse this directory after the installation.
c. When IBM Installation Manager starts, follow the prompts on the screen
and select all the default options.
The installation program creates the response file imdra.res in C:\tmp.
d. Change directory to C:\tmp\dra210win32\disk1\InstallerImage_win32.
e. In the command prompt, type installc.exe -nosplash
--launcher.suppressErrors -silent -input C:\tmp\imdra.res -log
C:\tmp\DRA\silentimdra.log.
f. Click Enter to complete the process.
Attention: You might see an error message in the command line, for
example Cannot find repository C:\Documents and Settings\john\Local
Settings\Temp\installerRepository18648.tmp. You can ignore this
message.
v To install the Optim Database Relationship Analyzer client if you already
have IBM Installation Manager installed:

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 37


a. Open your IBM Installation Manager installation directory. For example,
C:\Program Files\IBM\Installation Manager\eclipse.
b. In the command prompt, type IBMIM.exe -record C:\tmp\dra.res
-skipInstall C:\tmp\DRA. Where C:\tmp\DRA is a directory where have
the permission to create files.
Attention: C:\tmp\DRA is used to store template files for the installation.
You can reuse this directory after the installation.
c. When IBM Manager starts, click File → Preferences and add
C:\tmp\dra210win32\disk1\repository.config as a new repository.
d. Select the repository and click OK.
e. Click Install and select Optim Database Relationship Analyzer for
installation.
Once the process is completed, the installation program creates the
response file dra.res in C:\tmp.
f. Change directory to C:\Program Files\IBM\Installation
Manager\eclipse.
g. In the command prompt, type IBMIMc.exe -nosplash
--launcher.suppressErrors -silent -input C:\tmp\dra.res -log
C:\tmp\DRA\silentdra.log.
h. Click Enter to complete the process.

Results

All of the files are installed into the destination directory in the
DatabaseRelationshipAnalyzer1.1\client subdirectory.

Optim Database Relationship Analyzer client environment


variables
The Optim Database Relationship Analyzer client installation creates environment
variables on your machine.

The environment variable is:


GRDV2CLIENTHOME
The installation program creates GRDV2CLIENTHOME as a system-level
environment variable, and its value will be set to the Optim Database
Relationship Analyzer client installation directory. For example, if you
accept the default installation directory, GRDV2CLIENTHOME will point
to C:\Program Files\IBM\DRAClient2.1.

Uninstalling the Optim Database Relationship Analyzer client


Use the automatic uninstaller to remove Optim Database Relationship Analyzer
client from your machine.
1. Click Start → Programs → IBM Installation Manager → IBM Installation
Manager.
2. Click the Uninstall icon. The wizard to uninstall packages starts.
3. On the Uninstall Packages page, select Optim Database Relationship Analyzer
client, and click Next.
4. Review the summary information, and click Uninstall.
5. When the uninstall wizard completes, click Finish.

38 IBM Optim Database Relationship Analyzer User’s Guide


Results

The Optim Database Relationship Analyzer client is removed from your system.

Tip: You can also uninstall the Optim Database Relationship Analyzer client from
the Windows Control Panel. Click Start → Control Panel → Add/Remove
programs → IBM Optim Database Relationship Analyzer client and click
Remove.

Uninstalling the Optim Database Relationship Analyzer client


by using the silent uninstallation
You can use a response file to remove Optim Database Relationship Analyzer client
from your machine.
1. Open your IBM Installation Manager installation directory. For example,
C:\Program Files\IBM\Installation Manager\eclipse.
2. In the command prompt, type IBMIM.exe -record C:\tmp\dra.res
-skipInstall C:\tmp\DRA. Where C:\tmp\DRA is a directory where have the
permission to create files.
3. When IBM Manager starts, click Uninstall, select Optim Database Relationship
Analyzer and begin the uninstallation process. Once the process is completed,
the uninstallation program creates the response file drauninst.res in C:\tmp.
4. Change directory to C:\Program Files\IBM\Installation Manager\eclipse.
5. In the command prompt, type IBMIMc.exe -nosplash
--launcher.suppressErrors -silent -input C:\tmp\drauninst.res -log
C:\tmp\DRA\silentuninst.log.
6. Click Enter to complete the process.

Results

The Optim Database Relationship Analyzer client is removed from your system.

| Uninstalling IBM Installation Manager


| You can uninstall IBM Installation Manager from your system.
| 1. Click Start → Settings → Control Panel.
| 2. In the Control Panel window, double-click Add or Remove Programs.
| 3. In the Add or Remove Programs window, select IBM Installation Manager and
| click Remove.
| 4. In the confirmation message window, click OK.

| Results

| IBM Installation Manager is removed from your system.

Starting the Optim Database Relationship Analyzer components


After you have installed the Optim Database Relationship Analyzer server and
client components, you can start Optim Database Relationship Analyzer.
1. Configure the Optim Database Relationship Analyzer server login credentials.
See “Setting up login credentials to Optim Database Relationship Analyzer
server” on page 25 for more information about the Optim Database
Relationship Analyzer server for Linux, UNIX, and Windows, and “Establishing

Chapter 2. Installing and configuring Optim Database Relationship Analyzer 39


authorizations on a z/OS server” on page 33 for more information about the
Optim Database Relationship Analyzer server for z/OS.
2. For the Optim Database Relationship Analyzer server for Linux, UNIX, and
Windows, start the Optim Database Relationship Analyzer server if it is
necessary. See “Starting and stopping the Optim Database Relationship
Analyzer server” on page 26 for more information.
3. Start and configure the Optim Database Relationship Analyzer client to login to
the server. See“Creating a database connection to an Optim Database
Relationship Analyzer metadata database” on page 45 and “Connecting to a
user database” on page 46 for more information.

40 IBM Optim Database Relationship Analyzer User’s Guide


Chapter 3. Discovering relationships with Optim Database
Relationship Analyzer
The following topics contain instructions for using Optim Database Relationship
Analyzer to effectively discover relationships between your tables.

Optim Database Relationship Analyzer process overview


You can use Optim Database Relationship Analyzer to discover relationships
within your application.

Optim Database Relationship Analyzer can help you to:


v Understand the current condition of the database by discovering groups of
related tables
v Identify tables that are related by dynamic or static SQL statements
v Find tables that are no longer used and identify them for clean up
v Find related tables for data warehousing
v Identify related tables so that they can be used in a test environment
v Ensure that all of the related tables are backed up and archived together
v Validate changes in your application by comparing groups of related objects
v Analyze the impact of changes and how those changes will affect any related
tables

The process

The following process describes the high-level steps that you will take to discover
relationships with Optim Database Relationship Analyzer:
1. Create a new database connection to the Optim Database Relationship Analyzer
metadata database.
2. Connect to a user database.
3. Configure the options that you want to use during the group discovery process.
4. Run the group discovery process.
5. Review the results of the group discovery process.
6. Turn on the SQL trace on your database and run the Trace Analyzer to find
tables that are referenced within trace information. After running the Trace
Analyzer, you can run the group discovery process with the Trace Analyzer
results as the relationship source to discover relationships between these tables.
7. Edit, change, and modify the options for the group discovery process to fit
your needs.
8. Finalize the group discovery configuration for reuse.
9. Use the relationships that Optim Database Relationship Analyzer discovers to
make informed decisions when working with your database and database
applications.

© Copyright IBM Corp. 2008, 2009 41


The Optim Database Relationship Analyzer metadata database
The Optim Database Relationship Analyzer metadata database (GRDDBV2) is a
collection of program configuration data, user database connections, user actions,
trace information, and other data that is used by Optim Database Relationship
Analyzer.

Linux, UNIX, and Windows

The Optim Database Relationship Analyzer metadata database for Linux, UNIX,
and Windows is an Apache Derby database, and it is serviced by the Derby
Network Server, which is started by the Optim Database Relationship Analyzer
server. The Optim Database Relationship Analyzer metadata database is configured
during the server installation process and resides in the server subdirectory of
your main installation directory.

To use an Optim Database Relationship Analyzer server for Linux, UNIX, and
Windows and to configure the Optim Database Relationship Analyzer client to
connect to it, you need to start the Derby Network Server first. You can start the
Derby Network Server after you have finished configuring the Optim Database
Relationship Analyzer metadata database during the Optim Database Relationship
Analyzer server installation. The Derby Network Server will stop every time you
shut down the server system. Therefore, you will need to restart the Derby
Network Server to continue using Optim Database Relationship Analyzer.

z/OS

The Optim Database Relationship Analyzer metadata database for z/OS is a DB2
database, and it is configured during the installation process.
Related concepts
“Optim Database Relationship Analyzer server log and debug log files” on page
123
Use Optim Database Relationship Analyzer server log and debug log files to detect
problems and collect diagnostic information before you contact IBM Software
Support.
Related tasks
“Installing the Optim Database Relationship Analyzer server by using the
installation wizard” on page 23
You can install the Optim Database Relationship Analyzer server on Windows and
UNIX systems by using the installation wizard.
“Creating and configuring metadata information for z/OS” on page 31
For z/OS systems, you need to create and configure the Optim Database
Relationship Analyzer metadata information.
Chapter 2, “Installing and configuring Optim Database Relationship Analyzer,” on
page 21
The general process of installing and configuring Optim Database Relationship
Analyzer consists of installing the server and client components, and configuring
the client to connect to the server metadata database.

| User databases
| User databases are databases that contain user objects that Optim Database
| Relationship Analyzer can analyze to discover relationships. Optim Database
| Relationship Analyzer metadata database stores connections to user databases.

42 IBM Optim Database Relationship Analyzer User’s Guide


| Optim Database Relationship Analyzer supports the following types of user
| databases:
| v DB2 for Linux, UNIX, and Windows
| v DB2 for z/OS
| v Oracle

Sets, group discovery configurations, versions, and groups


You can use Optim Database Relationship Analyzer sets, group discovery
configurations, versions, and groups to work with your database relationships.

A set is a collection of one or more group discovery configurations. A group


discovery configuration is the place where you specify the options that guide the
group discovery process. When the group discovery process is completed, a
version is created with a list of groups. Groups are collections of related tables that
are discovered by the group discovery process and make up a version.

Sets

A set is a collection of group discovery configurations. You can create a set with
group discovery configurations that apply to the same application or that have
similar functions or purposes. For example, you can create one set to work with
accounting applications and another set for product order related work. Under the
same set you can create several group discovery configurations to discover
relationships with different discovery options.

The following figure shows that a set can contain various group discovery
configurations with different names.

Configuration 1 Configuration 2 ...Configuration n

Set

Figure 6. Optim Database Relationship Analyzer sets and configurations

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 43


Group discovery configurations

A group discovery configuration is a collection of settings that guide the group


discovery process. You can have multiple configurations within a set.
Configurations within a set should be similar in context and used for a similar
purpose. A configuration can be in the pre-finalized or in the finalized state:
v Every group discovery configuration is created in the pre-finalized state. You can
specify or update configuration options when the configuration is in the
pre-finalized state. A new version of each run of the group discovery process
will replace the previous version. When you are satisfied with your
configuration options, you can move the configuration to the finalized state.
v When the group discovery configuration is in the finalized state, you cannot
update the group discovery options. The group discovery process will create a
different version with each run. The multiple versions from running a given
group discovery configuration can be used to reflect different processes or
changes in your database that happen over time.

You can perform the following tasks with group discovery configurations:
v Refine the group discovery configuration in a pre-finalized state
v Rerun the group discovery process
v Run the Trace Analyzer and view the results
v Copy or delete group discovery configurations
v Update the properties of group discovery configurations
v Lock or unlock group discovery configurations
v Finalize group discovery configurations

Versions

A version is the result of running the group discovery process. Each version
contains a collection of different groups that are created by running the group
discovery process with a certain configuration. Each version appears in the tree
navigation view under the configuration that was used to create it.

If a group discovery configuration is in the pre-finalized state, a new version will


replace the existing version every time that you run the group discovery process
for that configuration. If a group discovery configuration is in the finalized state, a
different version is created every time that you run the group discovery process for
that configuration.

Groups

In Optim Database Relationship Analyzer, groups are created under versions by


the group discovery process. Within a group you will find a list of related tables. If
you specify starting point tables, the groups are created based on the starting point
tables. If you specify the catalog-wide discovery option, the groups are created
based on all the tables in the user database.

You can view the table relationships that were returned by the group discovery
process. The options that you specify in the Group Discovery Configuration Editor
determine what is returned in your groups. While the group discovery
configuration is in the pre-finalized state, you can refine those options until you
have the desired groups of related tables.

44 IBM Optim Database Relationship Analyzer User’s Guide


| Creating a database connection to an Optim Database Relationship
| Analyzer metadata database
| Before using the Optim Database Relationship Analyzer, you must establish a
| database connection to an Optim Database Relationship Analyzer metadata
| database.
| 1. In the Optim Database Relationship Analyzer perspective, click on the Data
| Source Explorer tab.
| 2. Right-click the Database Connections folder and select New. The New
| Connection Profile wizard opens.
| 3. Select the appropriate database manager:
| v For the Optim Database Relationship Analyzer for Linux, UNIX, and
| Windows server, select Derby.
| v For the Optim Database Relationship Analyzer for z/OS server, select DB2
| for z/OS.
| 4. Select the appropriate JDBC driver:
| v For the Optim Database Relationship Analyzer for Linux, UNIX, and
| Windows server, the Derby client driver version 10.3.3 is required. To
| configure a database connection from the New Connections wizard:
| a. Select Derby Client JDBC Driver default from the JDBC driver list. You
| can select either version 10.1 or 10.2
| b. Click the Edit Jar List icon to open the Edit Jar List wizard.
| c. Remove the existing derbyclient.jar from the list.
| d. Click Add JAR/Zip.
| e. Find the derbyclient.jar file in the grd subdirectory of your Optim
| Database Relationship Analyzer client installation directory and add it to
| the list.
| f. Click OK.
| v For the Optim Database Relationship Analyzer for z/OS server:
| a. Select IBM Data Server Driver for JDBC and SQLJ Default from the JDBC
| driver list.
| b. Click the Edit Jar List icon to validate the jar information.
| c. Click OK.
| 5. Enter the Optim Database Relationship Analyzer metadata database connection
| information:
| a. In the Properties section, enter the database location, host name, port
| number, user name, and password. This information depends on your
| Optim Database Relationship Analyzer server configuration.
| Attention:
| v For the Optim Database Relationship Analyzer for Linux, UNIX, and
| Windows server, enter GRDDBV2 in the Database field.
| v For the Optim Database Relationship Analyzer for z/OS server, database
| location is the subsystem name.
| b. For the Optim Database Relationship Analyzer for Linux, UNIX, and
| Windows server, uncheck Create database.
| c. Click Finish.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 45


| Results

| The connection has been saved under your database connections. From now on,
| you can right-click the database connection and select Connect to connect to the
| metadata database.

| Connecting to a user database


| For the Optim Database Relationship Analyzer for Linux, UNIX, and Windows
| servers, you must connect to your user database before using Optim Database
| Relationship Analyzer.

| Before you begin

| Before you can connect to a user database, you must configure an Optim Database
| Relationship Analyzer metadata database connection, and your user database must
| be set up.

| You can set up your user database in one of the following ways:
| v From the Data Source Explorer tab, create a DB2 for Linux, UNIX, and Windows
| or Oracle database connection.
| v From the Optim Database Relationship Analyzer server system, define the user
| database by using DB2 Configuration Assistant or Oracle Net Configuration
| Assistant. Refer to DB2 or Oracle documentation for more information on how
| to use the appropriate configuration assistant.
| 1. In the Optim Database Relationship Analyzer perspective, click on the Data
| Source Explorer tab.
| 2. Right-click your Optim Database Relationship Analyzer metadata database in
| the Database Connections folder and select Connect. Now you are connected to
| your Optim Database Relationship Analyzer metadata database.
| 3. Click on the Discovery Explorer tab and click on the Select a Metadata
| Database icon.
| 4. Select your Optim Database Relationship Analyzer metadata database from the
| list and click Next. A list of user databases is displayed.
| 5. Follow the instructions in the wizard to establish the connection.

| Results

| You can now start using Optim Database Relationship Analyzer.

| Switching user databases


| Optim Database Relationship Analyzer for Linux, UNIX, and Windows gives you
| the ability to switch between user databases listed in your Optim Database
| Relationship Analyzer metadata database.

| About this task

| The user database that you are currently logged into is the first object that is
| shown in the Discovery Explorer view. The expandable sections show the sets,
| group discovery configurations, versions, and groups for the user database that
| Optim Database Relationship Analyzer analyzes. If this is not the user database
| that you want to work with, you can switch to another database.

46 IBM Optim Database Relationship Analyzer User’s Guide


| 1. Select Switch User Database from the drop-down menu of the Discovery
| Explorer tab. The Switch User Database wizard opens. The table in the wizard
| will be populated with the user databases that are available from the metadata
| database that you are connected to and with supported databases from the
| Data Source Explorer view.
| 2. Select the user database that you want to analyze, enter your user name and
| password, and click Finish.

| Results

| The user database is now the root of the navigation tree in the Discovery Explorer
| view.

| Switching Optim Database Relationship Analyzer metadata databases


| Optim Database Relationship Analyzer gives you the ability to select a different
| Optim Database Relationship Analyzer metadata database to work with.

| About this task

| The user database or subsystem that you are currently logged into is the first
| object that is shown in the Discovery Explorer view. If this is not the subsystem or
| the user database that you want to analyze, you can switch to a different Optim
| Database Relationship Analyzer metadata database.
| 1. Select Select a Metadata Database from the drop-down menu of the Discovery
| Explorer tab or select the corresponding toolbar item. The Select a Metadata
| Database wizard opens.
| 2. If you have already configured a metadata database, select that database from
| the list of metadata databases in the Select a Metadata Database wizard and
| click Connect. If the metadata database that you want to use is not shown in
| the list, you need to connect to it through the database connection in the Data
| Source Explorer view. See “Creating a database connection to an Optim
| Database Relationship Analyzer metadata database” on page 45 for more
| information.
| 3. If the metadata database is on a Linux, UNIX, and Windows system, click Next.
| A list of user databases is displayed. Select the user database that you want to
| analyze and enter your user name and password.

| Remember: For z/OS systems, the metadata database and the user database
| that you are analyzing are in the same subsystem.
| 4. Click Finish

| Results

| Depending on your platform, the user database or the subsystem is now the root
| of the navigation tree in the Discovery Explorer view.

| Creating sets and group discovery configurations


| You need to create a set and a group discovery configuration to start using Optim
| Database Relationship Analyzer.
| 1. Right-click the user database and select Create New Set. The wizard opens
| where you can view and edit properties for the new set.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 47


| 2. Enter the name for your set and type any comments that you want to use in
| the Description field.
| 3. Click Finish.
| 4. Right-click the new set and select Create New Group Discovery
| Configuration. The wizard opens where you can view and edit properties for
| the new configuration.
| 5. Enter the name for your group discovery configuration and type any comments
| that you want to use in the Description field.
| 6. Click Finish. Repeat these steps to create more sets or group discovery
| configurations.

| Important: The new group discovery configuration is created in pre-finalized


| state and locked with your user ID. You will need to unlock it to let
| other users edit it.
|
Setting up the group discovery process
The group discovery process for the group discovery configuration discovers the
relationships between your tables to place those tables into meaningful groups.

You can specify options for the group discovery configuration, and Optim
Database Relationship Analyzer uses those options to search the database catalog
and Trace Analyzer results. Optim Database Relationship Analyzer discovers
related tables and returns these tables in a group.

Optim Database Relationship Analyzer uses different types of relationship sources


during the group discovery process. The following table shows the connection
between the relationship sources that are used during the group discovery process
and the group discovery results, along with the supported databases:
Table 2. Relationship sources used to determine groups
Relationship source as a group discovery
configuration option Group discovery results
Catalog, System Referential Integrity v Column-based table relationship, foreign
key constraint
v Table reference:
– For DB2 for z/OS databases, table
reference information between table
and LOB auxiliary table
– For DB2 for Linux, UNIX, and
Windows databases, table reference
information between table and typed
table or hierarchy table
Catalog, Trigger Column-based table relationships through
the trigger statement
Catalog, Package Column-based table relationships through
packages that involve static SQL statements

48 IBM Optim Database Relationship Analyzer User’s Guide


Table 2. Relationship sources used to determine groups (continued)
Relationship source as a group discovery
configuration option Group discovery results
Trace Analyzer results v Column-based table relationships: Optim
Database Relationship Analyzer finds
table relationships through dynamic SQL
statements in the user database trace.
v Trace context: Optim Database
Relationship Analyzer returns tables
associated with trace information based
on applications or units of work.

The group discovery process begins with a list of tables specified as the starting
point table or starts the catalog-wide search. The group discovery process finds
column-based table relationships and reference information depending on the
relationship sources specified as group discovery configuration options. The group
discovery process then pulls the discovered tables and their related tables such as
parent tables, child tables, and reference tables into the same group.

For the column-based table relationships discovered through relationship sources


such as package, trigger, and Trace Analyzer results, the group discovery process
analyzes the SQL statements (select, insert, update, and delete) or table column
name, and column type to discover column mapping for the parent and the child
tables.

You can also specify options to restrict or expand the group discovery process
scope. To restrict the scope, you can specify boundary tables or define relationships
to ignore in the group discovery configuration options. To expand the scope, you
can specify additional relationships for the specified group discovery configuration.

You can specify the options that guide the group discovery process in the Group
Discovery Configuration Editor. Optim Database Relationship Analyzer saves these
options so you do not have to retype them each time you run the group discovery
process.

Specifying group discovery options


Group discovery options belong to a specific group discovery configuration and
will affect only group discoveries that are run for that configuration. You can
specify several different options for a pre-finalized group discovery configuration,
and these options will ultimately affect the number of groups and contents of the
groups that are returned by the group discovery process.

About this task

Before you run the group discovery process, you should configure the options that
determine the rules for the group discovery. If you do not want the group
discovery process to consider every table in the database catalog, you must specify
starting point tables to reduce the scope of the discovery. You can also specify
additional relationships between tables that might not be found in the catalog, as
well as tables and relationships that you want the group discovery process to
ignore.
1. Select the group discovery configuration with which you want to work,
right-click, and select Edit Group Discovery Configuration. The Group
Discovery Configuration Editor opens.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 49


2. Specify the options that you want to use to define the scope of the group
discovery process. The Group Discovery Configuration Editor provides three
tabs that enable you to specify the options that guide the group discovery
process:
v In the Set the Scope tab, you can specify relationship sources and starting
point tables.
v In the Restrict the Scope tab, you can specify boundary tables and indicate
relationships that you want the group discovery process to ignore.
v In the Expand the Scope tab, you can specify additional relationships.
The options that you can specify in the wizard are:
Relationship sources
You can define the sources of information that the group discovery
process will use to look for relationships.
Starting point tables
You can define the tables that you want to use as the starting points for
the group discovery process. If no starting point tables are specified,
the group discovery process will perform a catalog-wide search.
Boundary tables
You can set a boundary table to limit the number of tables that are
returned in your groups. The group discovery process includes the
boundary table in the group of related tables, but any relationships to
that boundary table as a source table will be ignored.
Relationships to ignore
You can specify a relationship that you know you want to disregard
during the group discovery process, and that relationship will be
ignored.
Additional relationships
If a relationship does not exist in the selected relationship sources, you
can define it as an additional relationship to be included during the
group discovery process.
3. Complete the tasks on each tab to define your group discovery configuration
and save your settings by pressing Ctrl + S.

Results

After you configure the options, they are saved within Optim Database
Relationship Analyzer for quick reference each time you run a group discovery
using that group discovery configuration. You can continue refining the discovery
options, expanding or restricting the discovery scope. Once you are satisfied with
the options, you should set the associated group discovery configuration to the
finalized state.

Restriction: Multiple users cannot simultaneously edit the group discovery options
for a given configuration.

50 IBM Optim Database Relationship Analyzer User’s Guide


Related tasks
“Merging groups” on page 73
You can merge two groups in a version created from a pre-finalized group
discovery configuration by specifying a relationship between any two tables in the
two groups.

Specifying starting point tables or a catalog-wide group


discovery
A starting point table is used as the first table in a search through the database
catalog and Trace Analyzer results. If you want the group discovery process to
search through the entire database catalog, you can specify a catalog-wide group
discovery.

About this task

If you want the group discovery process to consider every table in the user
database catalog and treat it as a starting point table, you need to select the
catalog-wide option. However, if you want to limit the scope of the group
discovery to a certain subset of tables, you must specify those tables as your
starting point tables. Optim Database Relationship Analyzer will then group the
starting point tables and all of the tables that are related to them into one or more
groups during the group discovery process.
1. In the Group Discovery Configuration Editor, select the Set the Scope tab.
2. Depending on your preference, select either the Catalog-wide or the Starting
point tables option.
3. If you selected Starting point tables, click Add Starting Point Tables to add
one or more starting point tables.
4. Follow the instructions in the Starting Point Tables wizard to complete the task.
5. Press Ctrl + S to save the group discovery configuration.

Results

When you run the group discovery process for this configuration, Optim Database
Relationship Analyzer will discover tables and table relationships that are related
to your starting point table or tables.

Specifying relationship sources


You can specify the relationship sources that you want the group discovery process
to use to find relationships.
1. In the Group Discovery Configuration Editor, select the relationships sources
that you want to use. The options include:
v Catalog
– System RI
– Trigger
– Package
v Trace Analyzer results
– Application level granularity
– Unit of work level granularity
For example, if you select Trigger, then the group discovery process will use
only trigger events and actions on tables as a criteria for discovering the table
relationships.
2. Save the group discovery configuration.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 51


Catalog relationship sources used in the group discovery process:

The group discovery process discovers different relationships depending on the


relationship sources and the other options that you specify in the group discovery
configuration. Changing a group discovery configuration option affects the tables
and the relationships that the Optim Database Relationship Analyzer discovers
within each group.

Example: System referential integrity relationships

If Catalog with the System Referential Integrity option is selected as the


relationship source for the group discovery configuration option, the group
discovery process discovers the foreign key constraints that you define in your
database. For example, the following foreign key constraint relationships exist in
the database:
v Table A is related to Table B, where Table A is the parent table, and Table B is
the child table with foreign key constraint that references to Table A. The same
rule applies to all of the relationships in this example.
v Table B is related to Table C.
v Table C is related to Table D.
v Table D is related to Table E.
v Table E is related to Table F.
The group discovery process will find the following tables and table relationships
for the system referential integrity relationship source based on the group
discovery configuration options:
Table 3. System referential integrity relationships
Specified group discovery configuration
options Relationships found
Table A and Table D are starting point Tables in the group: A, B, C, D, E, F
tables.
Table relationships in the group:
v Table A is related to Table B.
v Table B is related to Table C.
v Table C is related to Table D.
v Table D is related to Table E.
v Table E is related to Table F.
Both of the starting point tables are in the
same group.
Table B is a starting point table. Tables in the group: A, B, C, D, E, F

Table relationships in the group:


v Table A is related to Table B.
v Table B is related to Table C.
v Table C is related to Table D.
v Table D is related to Table E.
v Table E is related to Table F.

52 IBM Optim Database Relationship Analyzer User’s Guide


Table 3. System referential integrity relationships (continued)
Specified group discovery configuration
options Relationships found
Table A is a starting point table, and Table D Tables in the group: A, B, C, D
is a boundary table.
Table relationships in the group:
v Table A is related to Table B.
v Table B is related to Table C.
v Table C is related to Table D.

Example: Trigger relationships

If Catalog with the Trigger option is selected as the relationship source for the
group discovery configuration option, the group discovery process will use trigger
events and actions on tables as a criteria for discovering the column-based table
relationships. Relationships derived from triggers are strictly unidirectional. The
parent table of the discovered relationship is always the table that the trigger is
defined on and the child tables are always the tables that are involved in the
triggered action. For example, consider the following table definitions:

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 53


CREATE TABLE TRIG.AO01
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO02
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO03
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO04
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO05
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO06
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO07
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO08
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO09
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.AO10
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.DO1000
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.DO1001
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.DO1002
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE TRIG.DO1003
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE PKG.AO08
(name VARCHAR(20),
description VARCHAR(20));

Figure 7. SQL table definitions

Consider the following database packages:

CREATE TRIGGER TRIG.TRIG001


AFTER INSERT ON TRIG.DO1001
FOR EACH ROW
SELECT A.NAME from TRIG.AO01 A, TRIG.AO02 B, TRIG.AO03 C
WHERE A.NAME = B.NAME AND B.NAME = C.NAME;
COMMIT;

Figure 8. SQL statements run by Trigger 1: TRIG001

Trigger 1 involves the following tables:


v TRIG.DO1001
v TRIG.AO01

54 IBM Optim Database Relationship Analyzer User’s Guide


v TRIG.AO02
v TRIG.AO03

CREATE TRIGGER TRIG.TRIG002


AFTER INSERT ON TRIG.DO1002
FOR EACH ROW
SELECT A.NAME from TRIG.AO03 A, TRIG.AO04 B, TRIG.AO05 C
WHERE A.NAME = B.NAME AND B.NAME = C.NAME;
COMMIT;

Figure 9. SQL statements run by Trigger 2: TRIG002

Trigger 2 involves the following tables:


v TRIG.DO1002
v TRIG.AO03
v TRIG.AO04
v TRIG.AO05

CREATE TRIGGER TRIG.TRIG003


AFTER INSERT ON TRIG.DO1003
FOR EACH ROW
SELECT A.NAME from TRIG.AO05 A, TRIG.AO06 B, TRIG.AO07 C
WHERE A.NAME = B.NAME AND B.NAME = C.NAME;
COMMIT;

Figure 10. SQL statements run by Trigger 3: TRIG003

Trigger 3 involves the following tables:


v TRIG.DO1003
v TRIG.AO05
v TRIG.AO06
v TRIG.AO07

CREATE TRIGGER TRIG.TRIG004


AFTER UPDATE ON TRIG.DO1003
FOR EACH ROW
CALL PROC005(1);
COMMIT;

Figure 11. SQL statements run by Trigger 4: TRIG004

Trigger 4 involves the following tables and procedures:


v TRIG.DO1003
v PROC005

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 55


CREATE PROCEDURE PROC005 ( IN whichQuery INTEGER )
DYNAMIC RESULT SETS 1
--------------------------
-- SQL Stored Procedure --
--------------------------
P1: BEGIN
-- Declare cursor
DECLARE cursor1 CURSOR WITH RETURN FOR
SELECT A.NAME FROM PKG.AO08 A;
END P1
@
COMMIT;

Figure 12. SQL statements run by Package 5: PROC005

Package 5 involves the following tables:


v PKG.AO08
The group discovery process will find the following tables and column-based
relationships for the trigger relationship source based on the group discovery
configuration options:
Table 4. Trigger relationships
Column-based table relationships Discovered through
TRIG.DO1001 (Description, Name) -> Trigger 1 with table column comparison
TRIG.AO01 (Description, Name)
TRIG.DO1001 (Description, Name) -> Trigger 1 with table column comparison
TRIG.AO02 (Description, Name)
TRIG.DO1001 (Description, Name) -> Trigger 1 with table column comparison
TRIG.AO03 (Description, Name)
TRIG.DO1002 (Description, Name) -> Trigger 2 with table column comparison
TRIG.AO03 (Description, Name)
TRIG.DO1002 (Description, Name) -> Trigger 2 with table column comparison
TRIG.AO04 (Description, Name)
TRIG.DO1002 (Description, Name) -> Trigger 2 with table column comparison
TRIG.AO05 (Description, Name)
TRIG.DO1003(Description, Name) -> Trigger 3 with table column comparison
TRIG.AO05 (Description, Name)
TRIG.DO1003(Description, Name) -> Trigger 3 with table column comparison
TRIG.AO06 (Description, Name)
TRIG.DO1003(Description, Name) -> Trigger 3 with table column comparison
TRIG.AO07 (Description, Name)
TRIG.DO1003(Description, Name) -> Package 5 with table column comparison
PKG.AO08 (Description, Name)

Example: Package relationships

If Catalog with the Package option is selected as the relationship source for the
group discovery configuration option, the group discovery process will use
package and its executable objects (static SQL) as a criteria for discovering the
column-based table relationships. For example, consider the following table
definitions:

56 IBM Optim Database Relationship Analyzer User’s Guide


CREATE TABLE PKG.AO01
(name VARCHAR(20),
description VARCHAR(20));
CREATE TABLE PKG.AO02
(name VARCHAR(20),
description VARCHAR (20));
CREATE TABLE PKG.AO03
(name VARCHAR(20),
description VARCHAR (20));
CREATE TABLE PKG.AO04
(name VARCHAR(20),
description VARCHAR (20));
CREATE TABLE PKG.AO05
(name VARCHAR(20),
description VARCHAR (20));
CREATE TABLE PKG.AO06
(name VARCHAR(20),
description VARCHAR (20));
CREATE TABLE PKG.AO07
(name VARCHAR(20),
description VARCHAR (20));

Figure 13. SQL table definitions

Consider the following database packages:

SELECT A.NAME FROM PKG.AO01 A, PKG.AO02 B, PKG.AO03 C


WHERE A.NAME = B.NAME AND B.NAME = C.NAME;
SELECT A.NAME FROM PKG.AO03 A, PKG.AO04 B, PKG.AO05 C
WHERE A.NAME = B.NAME AND B.NAME = C.NAME;
COMMIT;

Figure 14. SQL statements run by Package 1

Package 1 accesses the following tables:


v PKG.AO01
v PKG.AO02
v PKG.AO03
v PKG.AO04

SELECT A.NAME FROM PKG.AO03 A, PKG.AO04 B, PKG.AO05 C


WHERE A.NAME = B.NAME AND B.NAME = C.NAME;
COMMIT;

Figure 15. SQL statements run by Package 2

Package 2 accesses the following tables:


v PKG.AO03
v PKG.AO04
v PKG.AO05

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 57


SELECT A.NAME FROM PKG.AO03 A, PKG.AO04 B, PKG.AO05 C
WHERE A.NAME = B.NAME AND B.NAME = C.NAME;
COMMIT;

Figure 16. SQL statements run by Package 3

Package 3 accesses the following tables:


v PKG.AO05
v PKG.AO06
v PKG.AO07
The group discovery process will find the following tables and column-based
relationships for the package relationship source based on the group discovery
configuration options:
Table 5. Package relationships
Column-based table relationships Discovered through
PKG.AO01(Name) <-> PKG.AO02(Name) Package 1 with SQL statement: SELECT
A.NAME FROM PKG.AO01 A, PKG.AO02 B,
PKG.AO03 C WHERE A.NAME = B.NAME AND
B.NAME = C.NAME;
PKG.AO01(Name) <-> PKG.AO03(Name) Package 1 with SQL statement: SELECT
A.NAME FROM PKG.AO01 A, PKG.AO02 B,
PKG.AO03 C WHERE A.NAME = B.NAME AND
B.NAME = C.NAME;
PKG.AO01(Description, Name) <-> Package 1 with table column comparison
PKG.AO04(Description, Name)
PKG.AO02(Name) <-> PKG.AO03(Name) Package 1 with SQL statement: SELECT
A.NAME FROM PKG.AO01 A, PKG.AO02 B,
PKG.AO03 C WHERE A.NAME = B.NAME AND
B.NAME = C.NAME;
PKG.AO02(Description, Name) <-> Package 1 with table column comparison
PKG.AO04(Description, Name)
PKG.AO03(Name) <-> PKG.AO04(Name) Package 1 with SQL statement: SELECT
A.NAME FROM PKG.AO03 A, PKG.AO04 B,
PKG.AO05 C WHERE A.NAME = B.NAME AND
B.NAME = C.NAME;
PKG.AO03(Description, Name) <-> Package 1 with table column comparison
PKG.AO05(Description, Name)
PKG.AO04(Name) <-> PKG.AO05(Name) Package 2 with SQL statement: SELECT
A.NAME FROM PKG.AO03 A, PKG.AO04 B,
PKG.AO05 C WHERE A.NAME = B.NAME AND
B.NAME = C.NAME;
PKG.AO05(Description, Name) <-> Package 2 with table column comparison
PKG.AO03(Description, Name)
PKG.AO05(Name) <-> PKG.AO06(Name) Package 3 with SQL statement: SELECT
A.NAME FROM PKG.AO05 A, PKG.AO06 B,
PKG.AO07 C WHERE A.NAME = B.NAME AND
B.NAME = C.NAME;
PKG.AO05(Description, Name) <-> Package 3 with table column comparison
PKG.AO07(Description, Name)

58 IBM Optim Database Relationship Analyzer User’s Guide


Table 5. Package relationships (continued)
Column-based table relationships Discovered through
PKG.AO06(Name) <-> PKG.AO07(Name) Package 3 with SQL statement: SELECT
A.NAME FROM PKG.AO05 A, PKG.AO06 B,
PKG.AO07 C WHERE A.NAME = B.NAME AND
B.NAME = C.NAME;

| Choosing between application level and unit of work level granularity for Trace
| Analyzer results:

| If Trace Analyzer results is selected as the relationship source for the group
| discovery configuration option, the group discovery process will use Trace
| Analyzer results as a criteria for discovering the column-based table relationships
| and trace context information.

| Restriction: Unit of work level granularity is not supported on DB2 for z/OS user
| databases.

| The group discovery process can discover column-based table relationships in the
| Trace Analyzer results in two different ways depending on the behavior of your
| SQL applications in the trace. With the application level granularity, the group
| discovery process groups the tables found in the trace based on the applications
| that accessed the tables. With the unit of work level granularity, the group
| discovery process groups the tables based on the unit of work within the
| applications.

| Tip: If your application uses auto commit after every statement, the unit of work
| level granularity is not useful, and it is better to use the application level
| granularity.

| The group discovery process can also discover trace context information from the
| Trace Analyzer results relationship source. Based on the group discovery
| configuration options, the trace context information shows tables along with all the
| other tables referenced within the same application or unit of work depending on
| your Trace Analyzer granularity selection.

| Example: Trace Analyzer results as a relationship source

| For example, consider the following table definitions:


|

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 59


| CREATE TABLE COMPANY (
| TAXID VARCHAR(20) NOT NULL,
| CONAME VARCHAR(20) NOT NULL,
| PRIMARY KEY(CONAME)
| );
|
| CREATE TABLE ORG (
| DEPTNUMB SMALLINT NOT NULL,
| DEPTNAME VARCHAR(14),
| MANAGER SMALLINT,
| COMPANY VARCHAR(20),
| DIVISION VARCHAR(10),
| LOCATION VARCHAR(13),
| PRIMARY KEY(DEPTNUMB));
|
| CREATE TABLE PAYSCALE (
| ACTNO SMALLINT NOT NULL,
| WAGE INTEGER,
| ORGNO SMALLINT NOT NULL);
|
| CREATE TABLE EMPLOYEE (
| EMPNO CHAR(6) NOT NULL,
| FIRSTNAME CHAR(12) NOT NULL,
| MIDNAME CHAR(1) NOT NULL,
| LASTNAME VARCHAR(15) NOT NULL,
| WORKDEPT CHAR (3) NOT NULL,
| PHONENO CHAR(4),
| HIREDATE DATE,
| JOB CHAR(8),
| EDLEVEL SMALLINT NOT NULL,
| SEX CHAR(1),
| BIRTHDATE DATE,
| SALARY DEC(9,2),
| BONUS DEC(9,2),
| COMM DEC(9,2),
| NUMPROJS SMALLINT,
| PRIMARY KEY(EMPNO));
|
| CREATE TABLE EMP_ACT (
| EMPNO CHAR(6) NOT NULL,
| PROJNO CHAR(6) NOT NULL,
| ACTNO SMALLINT NOT NULL,
| EMPTIME DEC(5,2),
| EMPSTDATE DATE,
| EMPENDATA DATE);
|
| CREATE TABLE DEPARTMENT (
| DEPTNO CHAR (3) NOT NULL,
| DEPTNAME VARCHAR(129) NOT NULL,
| MGRNO CHAR(6),
| ADMDEPT CHAR(3),
| LOCATION CHAR(16),
| ORGNO SMALLINT NOT NULL,
| PRIMARY KEY (DEPTNO));
|
| CREATE TABLE PROJECT (
| PROJNO CHAR(6) NOT NULL,
| PROJNAME VARCHAR(24) NOT NULL,
| DEPTNO CHAR(3) NOT NULL,
| RESPEMP CHAR(6) NOT NULL,
| PRSTAFF DEC(5,2),
| PRSTDATE DATE,
| PRENDATE DATE,
| MAJPROJ CHAR(6),
| PRIMARY KEY(PROJNO));
||
| Figure 17. SQL table definitions
| 60 IBM Optim Database Relationship Analyzer User’s Guide
| Consider that you have database traces that trace both Application A and
| Application B:
|

| INSERT INTO COMPANY VALUES('0001010','Eastern');


| INSERT INTO ORG VALUES (20,'MidAtlantic',10,'','001A','Washington');
| SELECT B.DEPTNAME, B.MANAGER FROM COMPANY A, ORG B WHERE A.CONAME=B.COMPANY;
| Insert into PAYSCALE VALUES(10,50000,20);
| SELECT * FROM PAYSCALE A,ORG B WHERE A.ORGNO=B.DEPTNUMB;
| COMMIT;
||
| Figure 18. SQL statements run by Application A
|
| Application A has one unit of work between the COMMIT statements. The
| application accesses the following tables:
| v COMPANY
| v ORG
| v PAYSCALE

| INSERT INTO DEPARTMENT VALUES ('A00','SPIFFY COMPUTER SERVICE DIV.','000010','A00','',20);


| INSERT INTO EMPLOYEE VALUES ('000010','CHRISTINE','I','HAAS','A00','3978','1965-01-01','PRES',
| 18,'F','1933-08-24',+0052750.00,+0001000.00,+0004220.00,NULL);
| SELECT B.EMPNO, B. FIRSTNAME , B.WORKDEPT FROM DEPARTMENT A, EMPLOYEE B WHERE A.DEPTNO=B.WORKDEPT
| and A.DEPTNO='A00';
| SELECT A.EMPNO FROM EMPLOYEE A, EMP_ACT B WHERE A.EMPNO=B.EMPNO;
| COMMIT;
| SELECT B.COMPANY,A.DEPTNO,A.DEPTNAME FROM DEPARTMENT A,ORG B WHERE A.ORGNO=B.DEPTNUMB;
| INSERT INTO PROJECT VALUES ('AD3110','GENERAL ADMIN SYSTEMS', 'A00','000070',+006.00,'1982-01-01',
| '1983-02-01','AD3100');
| SELECT A.DEPTNO, B.DEPTNAME FROM PROJECT A,DEPARTMENT B WHERE A.DEPTNO=B.DEPTNO;
| COMMIT;
||
| Figure 19. SQL statements run by Application B
|
| Application B has two units of work between the COMMIT statements. The
| application accesses the following tables:
| v DEPARTMENT
| v EMPLOYEE
| v EMP_ACT
| v PROJECT
| v ORG

| The Trace Analyzer will find the following results and assign them an internal ID,
| Trace ID, based on the application and the unit of work:
| Table 6. Trace Analyzer based on Application A and Application B
| Application Unit of work Trace ID Table
| APPLA UOW1 APPLA_UOW1 COMPANY
| APPLA UOW1 APPLA_UOW1 ORG
| APPLA UOW1 APPLA_UOW1 PAYSCALE
| APPLB UOW1 APPLB_UOW1 DEPARTMENT
| APPLB UOW1 APPLB_UOW1 EMPLOYEE
| APPLB UOW1 APPLB_UOW1 EMP_ACT

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 61


| Table 6. Trace Analyzer based on Application A and Application B (continued)
| Application Unit of work Trace ID Table
| APPLB UOW2 APPLB_UOW2 DEPARTMENT
| APPLB UOW2 APPLB_UOW2 ORG
| APPLB UOW2 APPLB_UOW2 PROJECT
|

| Running the group discovery process with the application level granularity

| When application level granularity is specified, the group discovery process will
| consider all the tables within the same application ID to be related. If you specify
| EMPLOYEE as the starting point table and Trace Analyzer results with the
| application level granularity as the relationship source in your group discovery
| configuration, the group discovery process will return the following tables:
| Table 7. Tables discovered with the application level granularity
| Application Tables discovered within the application
| APPLA COMPANY, ORG, PAYSCALE
| APPLB DEPARTMENT, EMPLOYEE, ORG,
| EMP_ACT, PROJECT
|
| The following table shows the column-based table relationships discovered through
| the analysis of the table columns in the SQL statements for the applications.

| Important: Each column-based table relationship shown here indicates two


| relationships. For example, EMPLOYEE (WORKDEPT) -
| DEPARTMENT(DEPTNO) indicates two relationships:
| v EMPLOYEE (WORKDEPT) -> DEPARTMENT(DEPTNO)
| v DEPARTMENT(DEPTNO) -> EMPLOYEE (WORKDEPT)
| Table 8. Column-based relationships discovered with the application level granularity
| Column-based table
| relationships Application Discovery method
| EMPLOYEE (WORKDEPT) APPLB SQL statement: SELECT
| -DEPARTMENT(DEPTNO) B.EMPNO, B. FIRSTNAME ,
| B.WORKDEPT FROM DEPARTMENT
| A, EMPLOYEE B WHERE
| A.DEPTNO=B.WORKDEPT and
| A.DEPTNO='A00';
| EMPLOYEE(EMPNO) - APPLB SQL statement: SELECT
| EMP_ACT(EMPNO) A.EMPNO FROM EMPLOYEE A,
| EMP_ACT B WHERE
| A.EMPNO=B.EMPNO;
| EMPLOYEE(NUMPROJS) - APPLB Table column comparison
| ORG(DEPTNUMB)
| EMPLOYEE(WORKDEPT) - APPLB Table column comparison
| PROJECT(DEPTNO)
| DEPARTMENT(ORGNO) - APPLB SQL statement: SELECT
| ORG(DEPTNUMB) B.COMPANY, A.DEPTNO,
| A.DEPTNAME FROM DEPARTMENT
| A, ORG B WHERE
| A.ORGNO=B.DEPTNUMB;

62 IBM Optim Database Relationship Analyzer User’s Guide


| Table 8. Column-based relationships discovered with the application level
| granularity (continued)
| Column-based table
| relationships Application Discovery method
| DEPARTMENT(DEPTNO) - APPLB SQL statement: SELECT
| PROJECT(DEPTNO) A.DEPTNO, B.DEPTNAME FROM
| PROJECT A,DEPARTMENT B
| WHERE A.DEPTNO=B.DEPTNO;
| DEPARTMENT(MGRNO) - APPLB Table column comparison
| EMP_ACT(EMPNO)
| ORG(COMPANY) - APPLA SQL statement: SELECT
| COMPANY(CONAME) B.DEPTNAME, B.MANAGER FROM
| COMPANY A, ORG B WHERE
| A.CONAME=B.COMPANY;”
| ORG(DEPTNUMB) - APPLA SQL statement: SELECT *
| PAYSCALE(ORGNO) FROM PAYSCALE A,ORG B
| WHERE A.ORGNO=B.DEPTNUMB;
| PROJECT(RESPEMP) - APPLB Table column comparison
| EMPLOYEE(EMPNO)
| PROJECT(DEPTNO) - APPLB Table column comparison
| EMPLOYEE(WORKDEPT)
| PROJECT(RESPEMP) - APPLB Table column comparison
| EMP_ACT(EMPNO)
|
| The following table shows trace context information for the starting point table
| EMPLOYEE:
| Table 9. Trace context information discovered with the application level granularity
| Application Tables discovered within the application
| APPLA COMPANY, ORG, PAYSCALE
| APPLB DEPARTMENT, EMPLOYEE, ORG,
| EMP_ACT,
|

| Running the group discovery process with the unit of work level granularity

| When unit of work level granularity is specified, the group discovery process will
| consider all the tables within the same trace ID to be related. If you specify
| EMPLOYEE as the starting point table and Trace Analyzer results with the unit of
| work level granularity as the relationship source in your group discovery
| configuration, the group discovery process will return the following tables:
| Table 10. Tables discovered with the application level granularity
| Tables discovered within
| Application Unit of work the application
| APPLA UOW1 COMPANY, ORG,
| PAYSCALE
| APPLB UOW1 DEPARTMENT, EMPLOYEE,
| EMP_ACT
| UOW2 DEPARTMENT, ORG,
| PROJECT
|

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 63


| The following table shows the column-based table relationships discovered through
| the analysis of the table columns in the SQL statements for the applications.

| Important: Each column-based table relationship shown here indicates two


| relationships. For example, EMPLOYEE (WORKDEPT) -
| DEPARTMENT(DEPTNO) indicates two relationships:
| v EMPLOYEE (WORKDEPT) -> DEPARTMENT(DEPTNO)
| v DEPARTMENT(DEPTNO) -> EMPLOYEE (WORKDEPT)
| Table 11. Column-based relationships discovered with the application level granularity
| Column-based table
| relationships Application Unit of work Discovery method
| EMPLOYEE APPLB UOW1 SQL statement:
| (WORKDEPT) SELECT B.EMPNO, B.
| -DEPARTMENT(DEPTNO) FIRSTNAME ,
| B.WORKDEPT FROM
| DEPARTMENT A,
| EMPLOYEE B WHERE
| A.DEPTNO=B.WORKDEPT
| and A.DEPTNO='A00';
| EMPLOYEE(EMPNO) APPLB UOW1 SQL statement:
| - SELECT A.EMPNO FROM
| EMP_ACT(EMPNO) EMPLOYEE A, EMP_ACT
| B WHERE
| A.EMPNO=B.EMPNO;
| APPLB
DEPARTMENT(MGRNO) UOW1 Table column
| - comparison
| EMP_ACT(EMPNO)
| DEPARTMENT(ORGNO)
APPLB UOW2 SQL statement:
| - ORG(DEPTNUMB) SELECT B.COMPANY,
| A.DEPTNO,
| A.DEPTNAME FROM
| DEPARTMENT A, ORG B
| WHERE
| A.ORGNO=B.DEPTNUMB;
| APPLB
DEPARTMENT(DEPTNO) UOW2 SQL statement:
| - SELECT A.DEPTNO,
| PROJECT(DEPTNO) B.DEPTNAME FROM
| PROJECT
| A,DEPARTMENT B
| WHERE
| A.DEPTNO=B.DEPTNO;
| EMP_ACT(EMPNO) APPLB UOW1 Table column
| - comparison
| DEPARTMENT(MGRNO)
| EMP_ACT(EMPNO) APPLB UOW1 SQL statement:
| - SELECT A.EMPNO FROM
| EMPLOYEE(EMPNO) EMPLOYEE A, EMP_ACT
| B WHERE
| A.EMPNO=B.EMPNO;”

64 IBM Optim Database Relationship Analyzer User’s Guide


| Table 11. Column-based relationships discovered with the application level
| granularity (continued)
| Column-based table
| relationships Application Unit of work Discovery method
| ORG(COMPANY) - APPLA UOW1 SQL statement:
| COMPANY(CONAME) SELECT B.DEPTNAME,
| B.MANAGER FROM
| COMPANY A, ORG B
| WHERE
| A.CONAME=B.COMPANY;”
|
| ORG(DEPTNUMB) - APPLA UOW1 SQL statement:
| PAYSCALE(ORGNO) SELECT * FROM
| PAYSCALE A,ORG B
| WHERE
| A.ORGNO=B.DEPTNUMB;
|

| The following table shows trace context information for the starting point table
| EMPLOYEE:
| Table 12. Trace context information discovered with the application level granularity
| Tables discovered within
| Application Unit of work the application
| APPLA UOW1 COMPANY, ORG,
| PAYSCALE
| APPLB UOW1 DEPARTMENT, EMPLOYEE,
| EMP_ACT
| UOW2 DEPARTMENT, ORG,
| PROJECT
|
| Related concepts
| “The Trace Analyzer process” on page 76
| The Trace Analyzer process finds user tables that are accessed by applications
| based on their appearance in the SQL trace.

Specifying boundaries for the group discovery process scope


You can define a boundary for the group discovery process scope by specifying
boundary tables. All the tables that are related to a boundary table will not be
drawn into the group through a relationship to that boundary table; however, they
might be drawn into the group because of relationships to other tables.

About this task

If a table is related to other tables that you do not want to include in your group
discovery, you can add it as a boundary table in your group discovery options. In
this case, during a group discovery, the tables that would have been considered
related to the boundary table will not be drawn into the group (unless they are
drawn together as a result of another relationship). However, the boundary tables
themselves can still be discovered. For example, in the following image, T1 is the
starting point table and T7 is a boundary table:

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 65


T1 T3 T10

T2 T4 T7 T9 T11

T5 T12

T6 T8 T13

In this example, the tables T9, T10, T11, T12, and T13 will not be included in the
group discovery results because T7 is a boundary table, and the relationship
between T7 and T9 is not considered by the group discovery process.

The tables that are related to the boundary table can still be discovered by the
group discovery process if they are related to the starting point table in some other
way. For example, in the following image, T1 is the starting point table, T7 is a
boundary table, and a relationship exists between T8 and T13:

T1 T3 T10

T2 T4 T7 T9 T11

T5 T12

T6 T8 T13

In this example, all the tables will be included in the group discovery results
because even though T7 is a boundary table, the relationship between T8 and T13
allows the group discovery process to find the rest of the tables.
1. In the Group Discovery Configuration Editor, select the Restrict the Scope tab.
2. Click Add boundary tables to add one or more boundary tables.
3. Follow the instructions in the Boundary Tables wizard to complete the task.
4. Press Ctrl + S to save the group discovery configuration.

66 IBM Optim Database Relationship Analyzer User’s Guide


Results

The boundary table is added to the group discovery configuration options. Now,
the tables that are related to this table will not be considered during the group
discovery process.

Ignoring relationships during the group discovery process


If the group discovery process will draw an unwanted table relationship into a
group, you can exclude it by adding it to the ignored relationships list.

About this task

For example, in the following image T1 is the starting point table, T7 is a boundary
table, and the relationship between T4 and T5 is ignored:

T1 T3 T10

T2 T4 T7 T9 T11

T5 T12

T6 T8 T13

For this example, only the tables T1, T2, T3, T4, and T7 will be included in the
group discovery results.

Important: Ignored relationships are directional. Only the relationships from the
parent table to the child table will be ignored. Relationships from the
child table to the parent table will be considered during the group
discovery process unless you also define an ignored relationship in the
reverse order. Also, if a table is related to other tables in the group by
two different relationships, both relationships will need to be ignored
for the table to be excluded from the group. For example, if Table A is
included into the group because it is related to both Table B and Table
C, then you need to define the relationship between Table A and Table
B and the relationship between Table A and Table C as ignored
relationships to exclude Table A from the group.
1. In the Group Discovery Configuration Editor, select the Restrict the Scope tab.
2. Click Define a relationship to ignore to define one or more relationships. You
can also click Import from User-defined Relationships to add a relationship
that has already been defined and saved in the user-defined relationships list.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 67


3. Follow the instructions in the Ignored Relationship wizard to complete the task.
4. To remove a relationship from the list, click Remove Selected Relationships.
5. Press Ctrl + S to save the group discovery configuration.

Results

The relationship that you have defined will be ignored during the group discovery
process.

| Adding an additional relationship


| During a group discovery, if you want to consider a specific relationship that will
| not otherwise be found in the selected relationship sources, you can add that
| relationship to your group discovery configuration options.
| 1. In the Group Discovery Configuration Editor, select the Expand the Scope tab.
| 2. Click Define an additional relationship to define one or more relationships.
| You can also click Import from User-defined Relationships to add a
| relationship that has already been defined and saved in the user-defined list.
| 3. Follow the instructions in the Additional Relationship wizard to complete the
| task.
| 4. To remove a relationship from the list, click Remove Selected Relationships.
| 5. To make a relationship available for other group discovery configurations to
| import, select the relationship and click Export to User-defined Relationships.

| Remember: The group discovery process does not consult the list of
| user-defined relationships. You can use the entries in the list to
| import the relationships into group discovery configurations. The
| relationships will be used during the group discovery process only
| if they are imported and saved.
| 6. Press Ctrl + S to save the group discovery configuration.

| Results

| The relationship that you have defined will be considered during the group
| discovery process.

| Running the group discovery process


| After you have created a group discovery configuration, you can run the group
| discovery process to find related tables.

| About this task

| The group discovery process behaves differently depending on the state of your
| group discovery configuration:
| Pre-finalized (locked or unlocked) group discovery configurations:
| Pre-finalized group discovery configurations can be either locked or
| unlocked. When you create a group discovery configuration, the
| configuration is in the pre-finalized state and locked by you. You can
| unlock the configuration by right-clicking it and selecting Unlock.
| Unlocked configurations in the pre-finalized state are available for other
| users to lock and work with them. You must lock the configuration to edit
| the options, run the group discovery process, delete the configuration, or
| finalize it.

68 IBM Optim Database Relationship Analyzer User’s Guide


| If a configuration is in the pre-finalized state, only the user who has locked
| it can run the group discovery process. The group discovery process that
| runs on a pre-finalized configuration creates a version with the group
| discovery results and overwrites the earlier version if it exists. The job
| status entry for the previous version will also be removed if it exists.
| Finalized group discovery configurations:
| If a group discovery configuration is in the finalized state, you can no
| longer edit the configuration options. Different users can run the group
| discovery process on a finalized configuration. The group discovery
| process creates a different version with the group discovery results for each
| run.

| See “Finalizing a group discovery configuration” on page 70 for more information.


| 1. Select the group discovery configuration that you want to work with,
| right-click, and select Run Group Discovery. The Run Group Discovery wizard
| opens.
| 2. Review and verify the information that is listed in the Run Group Discovery
| wizard. If the information is correct, enter a meaningful job description to help
| you identify the job at a later time and click Finish. The job description appears
| in the Description column in the Job Status window. If the information for your
| group discovery is incorrect, click Cancel to exit the wizard and select Edit
| Group Discovery Configuration to make any necessary changes.
| 3. To check the status of the job, go to the Progress view. You can also right-click
| the user database or the group discovery configuration and click Job Status to
| display the list of all jobs and their status.

| What to do next

| Check the job status of the group discovery to ensure that the process ran
| successfully. The result of the run is shown in the Progress view. If the run failed,
| click on the link to bring up the error dialog.

| Tip: If you specified a catalog-wide group discovery, the process might run for a
| long time. In this case, you have the option of running in the background
| mode. See “Running the group discovery process in the background” for
| more information. Even if you do not run the group discovery process in the
| background mode, you can still continue using Optim Database Relationship
| Analyzer while the process is running.

| Running the group discovery process in the background


| If you specified a catalog-wide group discovery, the group discovery process might
| run for a long time. In this case, you have the option of running it in the
| background.
| 1. Select the group discovery configuration that you want to work with,
| right-click, and select Run Group Discovery. The Run Group Discovery wizard
| opens.
| 2. Review and verify the information that is listed in the Run Group Discovery
| wizard. If the information is correct, enter a meaningful job description to help
| you identify the job at a later time and click Finish. The job description appears
| in the Description column in the Job Status window. If the information for your
| group discovery is incorrect, click Cancel to exit the wizard and select Edit
| Group Discovery Configuration to make any necessary changes.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 69


| 3. Click Run in Background in the Group Discovery wizard. You can also check
| the Always run in background checkbox.

| Important: If the Always run in background checkbox is selected, this


| selection is saved as a global value in Eclipse preferences. In order
| to remove this setting, you need to click Window → Preferences and
| remove the selection from the General tab. See Eclipse help for
| more information.
| 4. To check the status of a group discovery process run, go to the Progress view.

| What to do next

| Check the job status of the group discovery to ensure that the process ran
| successfully.

| Checking the status of a job


| The Job Status window shows the status of a group discovery or of a Trace
| Analyzer process run.

| About this task

| The job description that you enter for the Trace Analyzer or group discovery
| process jobs appears in the Description column of the Job Status window. The
| description can help you distinguish between the jobs.
| 1. Right-click the database or the configuration in the Discovery Explorer view.
| 2. Select Check Job Status. The Job Status window opens and displays two tabs:
| v Active Jobs
| v Completed Jobs

| What to do next

| Jobs under the Active tab will have a status of Running. Jobs with a status of
| Running have been submitted but have not yet started. When a job has finished
| running, it will move to the Completed Jobs tab. If a failure occurs while a job is
| running, the job ends and a message is displayed in the Message column under
| the Completed Jobs tab.

| Finalizing a group discovery configuration


| Finalizing a group discovery configuration will prevent any further updates to the
| group discovery options for that configuration. Once a configuration has been
| finalized, any user can run it without locking it first.

| About this task

| See “Running the group discovery process” on page 68 for more information about
| finalized and pre-finalized group discovery configurations.

| Right-click your group discovery configuration and select Finalize.

| Important: If the group discovery configuration is in the finalized state, you


| cannot change it back to pre-finalized. If you want to edit the
| discovery options for a group discovery configuration that has been
| finalized, you can copy the finalized configuration to a new
| configuration and make changes to it.

70 IBM Optim Database Relationship Analyzer User’s Guide


| What to do next

| You can now reuse this group discovery configuration to keep track of your groups
| of related tables.

Reviewing the results of the group discovery process


You can use the results of the group discovery process to help you make decisions
about your application.

About this task

Review the results of the group discovery process to see if the group discovery
process returned the objects that you wanted. If the results are not exactly like you
want them, you can edit the group discovery configuration and run the group
discovery process again.

Remember: You can only edit a group discovery configuration if it is in the


pre-finalized state.
| 1. Right-click the version that was created by the group discovery process and
| select View Relationships for This Version. You can also click View Group
| Discovery Results in the Progress view that appears when the group discovery
| process is completed.
| 2. You can also examine the relationships within a group instead of the entire
| version:
| a. Select a group to display the tables within that group.
| b. Right-click a group and select View Relationships for This Group to view
| the relationships for that group.

Results

You can now analyze the results.

| Analyzing group discovery results


| You can analyze the relationships and groups returned by the group discovery
| process in the Group Discovery Results window.

| From the Group Discovery Results window, you can view column-to-column
| relationships within a tree structure. You can view trace context information and
| table reference information.

| Relationships returned by the group discovery process


| Column-based relationships
| Column-based relationships are parent-child table relationships with
| column information that connect two tables together. These relationships
| are displayed as a hierarchical tree in the Column-based relationships tab
| of the Group Discovery Results wizard.
| Reference relationships
| Reference relationships are relationships that do not have
| column-to-column mapping.
| Trace context
| The trace context information is discovered by the group discovery
| process with Trace Analyzer result as a relationship source. You

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 71


| can use the trace context information to look up the context in
| which tables appear within the applications (application
| granularity level) or within units of work of the applications (unit
| of work granularity level) based on the group discovery
| configuration options. The trace context information is displayed in
| the Trace context tab of the Group Discovery Results window.
| Table reference
| The Table reference tab contains relationships that are created and
| used internally by DB2, such as LOBs, column references, and
| hierarchy relationships. This information is displayed if you run
| the group discovery process with Catalog and System RI as the
| relationship source. DB2 stores LOBs in a table separate from the
| one that declares the LOB column. The LOB column contains
| references to the actual data in a separate table. DB2 uses column
| references to manage structured data types (typed tables).
| Hierarchies are used when there is inheritance between typed
| tables. See DB2 documentation for more information.

| Important: The Table reference tab is not shown if the group


| discovery process has not discovered any table
| reference information.

| Understanding the Group Discovery Results tree structure for


| column-based relationships

| The column-based relationships are displayed in a hierarchical tree with tables


| representing the nodes of the tree. The Group Discovery Results window provides
| three different hierarchical tree layouts to help you analyze and understand
| relationships in the tree. Each hierarchical layout presents the same results in a
| different way:
| Parent/Child layout
| The Parent/Child layout is the simplest hierarchical layout. The
| Parent/Child layout shows all the immediate parents and children of each
| table. Use this layout to find the parent and child tables of each table.
| Depth-first layout
| The depth-first layout is generated from exploring the relationship graph
| in the depth-first fashion. From any given table, all the descendants for the
| table are shown before moving to the next table. This layout generates a
| deep and narrow tree. Use this layout to understand the depth of
| relationships for each table.
| The tables that have appeared earlier in the tree are marked with a plus
| sign (+) to indicate that they are repeated. The sub trees of the repeated
| tables are not displayed. To view the sub trees of the repeated tables, you
| need to find their first appearance in the tree.
| Breadth-first layout
| The depth-first layout is generated from exploring the relationship graph
| in the breadth-first fashion. From any given table, all the immediate
| children for the table are shown before moving to their descendants. This
| layout generates a wide and shallow tree. Use this layout to understand
| the relationships between a table and its immediate children.
| The tables that have appeared earlier in the tree are marked with a plus
| sign (+) to indicate that they are repeated. The sub tree of the repeated

72 IBM Optim Database Relationship Analyzer User’s Guide


| tables is not displayed. To view the sub tree of the repeated tables, you
| need to find their first appearance in the tree.

| You can click each table in the tree to view the detailed information about the
| selected table and the relationships for it. The detailed information about the table
| specifies, for example, if the table is a starting point table, a boundary table, if it
| has multiple parents, or if it is a part of a circular relationship. A circular
| relationship is a relationship where the child table links back to the parent table.

| The direction of the relationship depends on the active tab. If the Parents tab is
| active, then the selected table in the tab is the parent table and the table above the
| tab is the child table. If the Children tab is active, then the selected table in the tab
| is the child table and the table above the tab is the parent table.

| Click the Children tab or the Parents tab to explore all the child or parent
| relationships for the selected table. For each relationship, you can view the parent
| and child column mapping information, the constraint name, and the relationship
| source.

Refining the group discovery process


You have several options for refining the search criteria of the group discovery
process if the group discovery results do not meet your expectations.

Restriction: These options are available only for pre-finalized and locked group
discovery configurations.

Changing the group discovery process options


If the group discovery results do not meet your expectations, you can change your
options if your group discovery configuration is still in the pre-finalize state.

About this task

You can change your starting point tables, expand or restrict the scope of your
search through options such as boundary tables, and then rerun the group
discovery process for more accurate results.

Restriction: These options are available only for pre-finalized and locked group
discovery configurations.
1. Right-click the group discovery configuration that you want to change and
select Edit Group Discovery Configuration. The Group Discovery
Configuration Editor opens.
2. In the Group Discovery Configuration Editor, select the tab that corresponds
with the options that you want to change and make your changes.
3. Press Ctrl + S to save the group discovery configuration.

Results

You can now run the group discovery process again.

Merging groups
You can merge two groups in a version created from a pre-finalized group
discovery configuration by specifying a relationship between any two tables in the
two groups.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 73


About this task

You need to define a relationship between tables within two groups to merge them
and have the resultant grouping exist in subsequent group discovery runs. To
accomplish this, the group merge process creates an additional relationship
between one or more tables in the merged groups.
1. Select a group in the version that you want to use.
2. Press and hold the Ctrl key and select another group that you want the first
group to be merged into. Both groups will now be highlighted in the
navigation tree.
3. Right-click one of the highlighted groups and select Merge with Each Other.
You can only select two groups at a time.
4. In the Group Merge dialog, define one or more relationships between the two
groups.
a. Select the parent table and the child table. The list of columns in each table
is displayed. The type of each column is shown next to it.
b. Select a column from the parent table and a column from the child table
and click Add Column Mapping. The columns must be of exactly the same
type.
5. Review the list of relationships that is displayed in the lower part of the Group
Merge dialog to ensure that it is complete and click OK. The relationships you
have defined will be added to the list of additional relationships in your group
discovery configuration.

Results

When you run the group discovery process again, the groups will be merged into
one group.
Related tasks
“Specifying group discovery options” on page 49
Group discovery options belong to a specific group discovery configuration and
will affect only group discoveries that are run for that configuration. You can
specify several different options for a pre-finalized group discovery configuration,
and these options will ultimately affect the number of groups and contents of the
groups that are returned by the group discovery process.

| Defining ignored relationships and boundary tables from the


| Group Discovery Results window
| You can modify some of your group discovery configuration options from the
| Group Discovery Results window.

| About this task

| While analyzing your group discovery results, you can add tables from the
| Column-based Relationships view to the list of boundary tables and relationships
| to the list of ignored relationships and then rerun the group discovery process for
| more accurate results.

| Restriction: These options are available only for pre-finalized group discovery
| configuration that you have locked.
| 1. In the Group Discovery Results wizard, select a table from the hierarchy tree of
| the column-based relationships.

74 IBM Optim Database Relationship Analyzer User’s Guide


| 2. To add the selected table to the list of boundary tables, click the Add Table to
| Boundary List button next to the table information. The selected table will be
| considered a boundary table next time you run the group discovery process.
| 3. To add a relationship to the list of ignored relationships, click the Children tab
| or the Parents tab to explore all the child or parent relationships for the selected
| table.
| 4. Select the relationship you want to ignore and click the Add to Ignored
| Relationship List button. The relationship will not be discovered the next time
| you run the group discovery process.

| Results

| You can now run the group discovery process again.

Validating changes by using version comparison


You can validate changes that were made to your database or database application
by comparing different versions of your group discovery results.

Before you begin

You will need a baseline version of a run of the group discovery process with
which to compare a second version.
1. After changes have been made to your database, you can run the group
discovery process again using the same group discovery configuration that you
ran before. The group discovery configuration must be in the finalized state.
a. Select your group discovery configuration and click Run Group Discovery.
A new version of the group discovery configuration is created.
2. Compare the groups in the first version to the groups in the latest version of
the group discovery results.
Any two versions of a finalized group discovery configuration can be
compared. The comparison is chronological. Regardless of which two versions
are chosen or in what order they are selected, the direction is from the oldest
version to the most recent version.
a. Select DefaultVersion_1 in the navigation tree.
b. With the Ctrl key pressed, select DefaultVersion_2. DefaultVersion_1 and
DefaultVersion_2 are the default names that are assigned to your versions if
you do not rename them.
c. Right-click DefaultVersion_2 and select Compare with Each Other from the
menu options. The Version Comparison Results window opens.
d. Compare DefaultVersion_1 on the left-hand side of the Version Comparison
Results window to DefaultVersion_2 on the right-hand side of the window.
Ensure that the appropriate changes appear in the versions.
You can use the check boxes at the bottom of the window to select which
content is shown and how that content is identified. You can toggle the
highlighting of the added, deleted, and starting point tables. You can use
the Hide Similarities option to visually suppress the tables that are
common between the two versions. You can use the Align to radio buttons
to control how the content is organized. If the alignment is used and there
are scroll bars in the two versions, the scroll bars move in unison, so that
you can move through both versions simultaneously. When the unaligned
option is used, the scroll bars for each version will move independently of
the other.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 75


Important: When you compare across versions, groups can realign as
changes in user-defined relationships, system referential
integrity, or other changes, such as group merging, can occur.
Similarly, group names, which are generated during the group
discovery process, can change. To compare groups across
versions where realignment has occurred, you need to use the
starting point tables as a common reference point to compare
the groups from one version to groups of another version. You
can select the Align to left version, Align to right version or
Show unaligned radio buttons to align the group discovery
configuration to the specified frame of reference.
If a new table appears and you have not made changes to the group
discovery options, this table could be a new table candidate. Tables that
appear in DefaultVersion_2 that are not present in DefaultVersion_1 can
appear, for example, because a database change occurred, creating the new
tables, or user-defined relationships were modified so that these tables are
now being pulled in.
Check the following items:
v Did the new changes show up in the version?
v Are the tables related in an unexpected way? Check the results of the
group discovery for this version.

Results

The type of validation information that you can discover with Optim Database
Relationship Analyzer will help you to better understand the changes that other
people make to your database or database application and help you to quickly
catch inconsistencies or mistakes.
Related tasks
“Scenario: Validating database changes by using Optim Database Relationship
Analyzer” on page 5
This scenario describes how a DBA can use Optim Database Relationship Analyzer
to quickly validate that the correct changes were made to a database.

The Trace Analyzer process


The Trace Analyzer process finds user tables that are accessed by applications
based on their appearance in the SQL trace.

The Optim Database Relationship Analyzer group discovery process with the Trace
Analyzer results as a relationship source uses the Trace Analyzer results to find
relationships between the tables. Using the Trace Analyzer information is optional
and is not required for running the group discovery process.

Remember: If you want to use the Trace Analyzer results during the group
discovery process, you have to run the Trace Analyzer first.

Important: You can run the Trace Analyzer for a group discovery configuration
that is in either pre-finalized state or finalized state. For a group
discovery configuration in pre-finalized state, you must lock the
configuration first.

76 IBM Optim Database Relationship Analyzer User’s Guide


Related concepts
“Choosing between application level and unit of work level granularity for Trace
Analyzer results” on page 59
If Trace Analyzer results is selected as the relationship source for the group
discovery configuration option, the group discovery process will use Trace
Analyzer results as a criteria for discovering the column-based table relationships
and trace context information.

Running the Trace Analyzer on a DB2 for Linux, UNIX, and


Windows server
You can use the Optim Database Relationship Analyzer Trace Analyzer to search
for and find SQL relationships on a DB2 for Linux, UNIX, and Windows server.

Before you begin

Before running the Trace Analyzer, you need to turn on the SQL trace on the
database that you are trying to monitor. To turn the trace on for a DB2 for Linux,
UNIX, and Windows server, you need to create a DB2 event monitor and start the
trace. For example:
create event monitor name for statements write to table
set event monitor name state=1

Where state=1 turns on the monitor. You will need the monitor name to provide
Optim Database Relationship Analyzer with the event monitor statement table
name. Refer to DB2 for Linux, UNIX, and Windows documentation for more
information on how to create a DB2 statement event monitor. Stop the trace before
you run the Trace Analyzer.

Restriction: The user IDs that run the Trace Analyzer must have the appropriate
permissions to access the DB2 event monitor statement table.
1. Start the Optim Database Relationship Analyzer client.
2. Create a new Optim Database Relationship Analyzer set and configuration if
needed.
a. Right-click the user database and select Create New Set or click the toolbar
icon and name the set in the Create New Set wizard.
b. Right-click the set and select Create New Group Discovery Configuration
from the menu options. You can also click the Create New Group
Discovery Configuration icon from the toolbar to complete this step.
c. Enter a name for the group discovery configuration and click Finish. Optim
Database Relationship Analyzer locks the group discovery configuration.
The group discovery configuration must be locked before you can run the
Trace Analyzer.
3. Run the Trace Analyzer on the group discovery configuration.
a. Right-click the group discovery configuration and select Run Trace
Analyzer from the menu options.
b. Enter the DB2 event monitor statement table name and the date and time
range for the results of the SQL trace to be considered. You can click
Browse to select an event monitor statement table from your user database.
Attention: If you create an event monitor, DB2 will by default create a
statement table with the name consisting of the STMT_ prefix and your
monitor name. For example, if the monitor name is DRASAMPLE, then the
statement table name is STMT_DRASAMPLE.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 77


The boundaries for date and time are inclusive and the precision is down to
the second.
c. If you want to accumulate Trace Analyzer results with the previous runs of
the Trace Analyzer, uncheck the Delete existing Trace Analyzer results for
this configuration check box.

Remember: Deleting the previous Trace Analyzer results does not delete
any information from your existing groups.
d. Enter a job description. A meaningful job description can help you identify
this Trace Analyzer job at a later time.
e. Click Finish to start the Trace Analyzer.
The Trace Analyzer examines the SQL trace results within the specified date
and time range and records the tables that were accessed by different
applications into the Optim Database Relationship Analyzer metadata database.
4. After the Trace Analyzer has finished running, right-click your group discovery
configuration and select View Trace Analyzer Results to view the results.
Optim Database Relationship Analyzer displays a list of tables that are grouped
by the trace IDs. Optim Database Relationship Analyzer displays the trace ID,
the table and schema name and the date and the time.

Results

The result of the run is shown in the Progress view. If the run failed, click on the
link to bring up the error dialog for more information.

Running the Trace Analyzer on an Oracle server


You can use the Optim Database Relationship Analyzer Trace Analyzer to search
for and find SQL relationships on an Oracle server.

Before you begin

Before running the Trace Analyzer, you need to start the SQL trace on the database
that you are trying to monitor. To start the trace for an Oracle server, enable the
audit trace. For example, you can issue the following command from your SQL
PLUS:
ALTER SYSTEM SET audit_trail=xml,extended SCOPE=SPFILE;

You can use either the xml,extended or the db,extended parameters. Make sure the
keyword extended is used; otherwise, SQL statements will not be logged by the
audit trace. For more information, refer to Oracle documentation.

Important: If the db,extended parameter is used, you can see the following error:
ORA-02002: error while writing to audit trail. To avoid the error,
change the parameter to xml,extended or, as a workaround, update the
following parameter and try again: Set _OPTIM_PEEK_USER_BINDS =
false. This problem has been fixed in the following releases of the
Oracle database: A105 A204 B106.

Once you issue the ALTER SYSTEM command to enable the trace, you will need to
stop and start the Oracle instance, so that the parameter settings can take effect.
Issue the appropriate AUDIT statements for ALTER, INSERT, SELECT, DELETE
and CREATE activities to capture the user trace information.

78 IBM Optim Database Relationship Analyzer User’s Guide


Restriction: The user IDs that run the Trace Analyzer must have the appropriate
permissions to access the audit trace view
SYS.DBA_COMMON_AUDIT_TRAIL.
1. Start the Optim Database Relationship Analyzer client.
2. Create a new Optim Database Relationship Analyzer set and configuration if
needed.
a. Right-click the user database and select Create New Set or click the toolbar
icon and name the set in the Create New Set wizard.
b. Right-click the set and select Create New Group Discovery Configuration
from the menu options. You can also click the Create New Group
Discovery Configuration icon from the toolbar to complete this step.
c. Enter a name for the group discovery configuration and click Finish. Optim
Database Relationship Analyzer locks the group discovery configuration.
The group discovery configuration must be locked before you can run the
Trace Analyzer.
3. Run the Trace Analyzer on the group discovery configuration.
a. Right-click the group discovery configuration and select Run Trace
Analyzer from the menu options.
b. Select the date and time range for the results of the SQL trace to be
considered. Optim Database Relationship Analyzer obtains Oracle trace
information from the audit views SYS.DBA_COMMON_AUDIT_TRAIL in
the Oracle catalog.

Restriction: Your Oracle ID needs to have proper authority to read this


view.
The boundaries for date and time are inclusive and the precision is down to
the second.
c. If you want to accumulate Trace Analyzer results with the previous runs of
the Trace Analyzer, uncheck the Delete existing Trace Analyzer results for
this configuration check box.

Remember: Deleting the previous Trace Analyzer results does not delete
any information from your existing groups.
d. Enter a job description. A meaningful job description can help you identify
this Trace Analyzer job at a later time.
e. Click Finish to start the Trace Analyzer.
The Trace Analyzer examines the SQL trace results within the specified date
and time range and records the tables that were accessed by different
applications into the Optim Database Relationship Analyzer metadata database.
4. After the Trace Analyzer has finished running, right-click your group discovery
configuration and select View Trace Analyzer Results to view the results.
Optim Database Relationship Analyzer displays a list of tables that are grouped
by the trace IDs. Optim Database Relationship Analyzer displays the trace ID,
the table and schema name and the date and the time.

Results

The result of the run is shown in the Progress view. If the run failed, click on the
link to bring up the error dialog for more information.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 79


Running the Trace Analyzer on a DB2 for z/OS server
You can use the Optim Database Relationship Analyzer Trace Analyzer to search
for and find SQL relationships on a DB2 for z/OS server.

Before you begin

Before running the Trace Analyzer process, you need to turn on the SQL trace on
the database that you are trying to monitor. Complete the steps in “Starting a trace
before running the Trace Analyzer on a DB2 for z/OS server” on page 81 to turn
on the trace.

Restriction: The user IDs that run the Trace Analyzer must have the appropriate
permissions to access the IFCID 63 record table.
1. Start the Optim Database Relationship Analyzer client.
2. Create a new Optim Database Relationship Analyzer set and configuration if
needed.
a. Right-click the user database and select Create New Set or click the toolbar
icon and name the set in the Create New Set wizard.
b. Right-click the set and select Create New Group Discovery Configuration
from the menu options. You can also click the Create New Group
Discovery Configuration icon from the toolbar to complete this step.
c. Enter a name for the group discovery configuration and click Finish. Optim
Database Relationship Analyzer locks the group discovery configuration.
The group discovery configuration must be locked before you can run the
Trace Analyzer.
3. Run the Trace Analyzer on the group discovery configuration.
a. Right-click the group discovery configuration and select Run Trace
Analyzer from the menu options.
b. Enter the IFCID 63 record table name and the date and time range for the
results of the SQL trace to be considered. You can click Browse to look for
the IFCID 63 record table from your user database. The boundaries for date
and time are inclusive and the precision is down to the second. You should
have created the table while starting the trace. See “Starting a trace before
running the Trace Analyzer on a DB2 for z/OS server” on page 81.
c. If you want to accumulate Trace Analyzer results with the previous runs of
the Trace Analyzer, uncheck the Delete existing Trace Analyzer results for
this configuration check box.

Remember: Deleting the previous Trace Analyzer results does not delete
any information from your existing groups.
d. Enter a job description. A meaningful job description can help you identify
this Trace Analyzer job at a later time.
e. Click Finish to start the Trace Analyzer.
The Trace Analyzer examines the SQL trace results within the specified date
and time range and records the tables that were accessed by different
applications into the Optim Database Relationship Analyzer metadata database.
4. After the Trace Analyzer has finished running, right-click your group discovery
configuration and select View Trace Analyzer Results to view the results.
Optim Database Relationship Analyzer displays a list of tables that are grouped
by the trace IDs. Optim Database Relationship Analyzer displays the trace ID,
the table and schema name and the date and the time.

80 IBM Optim Database Relationship Analyzer User’s Guide


Results

The result of the run is shown in the Progress view. If the run failed, click on the
link to bring up the error dialog for more information.

| Starting a trace before running the Trace Analyzer on a DB2 for


| z/OS server
| Before running the Trace Analyzer, you need to turn on the SQL trace on the
| database that you are trying to monitor. You can turn on the trace by using the
| Optim Database Relationship Analyzer preprocessing feature.

| About this task

| You can start the DB2 trace by using the Generalized Trace Facility (GTF) or the
| System Management Facilities (SMF).

| Important: If you use DB2PM to create an OMEGAMON XE for DB2 Performance


| Expert Record Trace report, see “Starting a trace before running the
| Trace Analyzer on a DB2 for z/OS server with OMEGAMON XE” on
| page 82 for more information.
| 1. Start the DB2 performance trace for IFCID 63. To create a record trace report,
| you need to collect data by using DB2 trace. Since the Trace Analyzer is
| interested in the SQL activity, start the performance trace with IFCID 63 (you
| can specify the destination as GTF or SMF):
| start trace(perfm) DEST(GTF) class(30) ifcid(63)
| 2. Run your applications for which you want to analyze the trace relationships.
| Note the data set where the DB2 trace data was collected.
| 3. Invoke the GRDCMAIN program to process the file (GTF or SMF) that has the
| DB2 trace data for IFCID 63. See the sample JCL provided in
| hlq.SGRDSAM2(GRDSCALL), where hlq is the high level qualifier:
| * GRDSCALL
| //* NOTES =
| //* 1. ADD A VALID JOB CARD. USE PGM=GRDCMAIN IN THE
| //* EXEC CARD.
| //* 2. CHANGE THE PREFIX (grd210 IN grd210.SGRDLOAD)
| //* OF IBM OPTIM
| //* DATABASE RELATIONSHIP ANALYZER LOAD LIBRARY
| //* IN THE STEPLIB
| //* 3 CHANGE THE INPUT DATA SET db2trace TO YOUR
| //* SMF/GTF TRACE DATA SET
| //* 4. CHANGE THE OUTPUT DATA SET outputdd AND VERIFY
| //* DD PARAMETERS (ALLOCATION QUANTITIES, ETC.)
| //* 5. DO NOT CHANGE THE CONTROL STATEMENTS IN SYSIN.
| //* USE EXACTLY THE WAY IT IS GIVEN IN THIS
| //* EXAMPLE.
| //GRD210 EXEC PGM=GRDCMAIN
| //STEPLIB DD DISP=SHR,DSN=grd110.SGRDLOAD
| //INPUTDD DD DISP=SHR,DSN=db2trace
| //RTFILDD1 DD DSN=outputdd,
| // DCB=(RECFM=VB,LRECL=9072,BLKSIZE=9076),
| // SPACE=(CYL,(1,1),,,ROUND),
| // UNIT=SYSDA,
| // DISP=(NEW,CATLG,CATLG)
| //DPMLOG DD SYSOUT=A
| //SYSOUT DD SYSOUT=A
| //SYSIN DD *
| RECTRACE

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 81


| FILE
| TRACE INCLUDE(IFCID(63))
| EXEC
| /*
| 4. Copy GRDSCALL to your own data set, make the necessary changes, and
| submit.
| 5. Create an IFCID 63 record table to record trace SQL Stmt data. The DDL for the
| CREATE statement is provided in hlq.SGRDSAM2(GRDNCFSQ).

| Important: GRDNCFSQ has the DDL needed to create the record trace table
| (IFCID 63). Use the column names provided in the DDL without
| changes. Subsequent processing by the Trace Analyzer depends on
| some of these column names.
| 6. Load your trace data into the IFCID 63 record table. The DDL for the load
| statement is provided in hlq.SGRDSAM2(GRDNLFSQ). Ensure that the data set
| name you specify on the SYSREC DD card in the LOAD step of your JCL
| matches the name that you use on the RTFILDD1 DD card.

| Results

| Once the data is loaded into the IFCID 63 record table, you can run the Trace
| Analyzer to analyze the trace information.

Starting a trace before running the Trace Analyzer on a DB2 for


z/OS server with OMEGAMON XE
You can use the record trace generated from the DB2 trace by IBM Tivoli®
OMEGAMON® XE for DB2 Performance Expert on z/OS to start the DB2 trace.

About this task

You can start the DB2 trace by using the Generalized Trace Facility (GTF) or the
System Management Facilities (SMF).
1. Start the DB2 performance trace for IFCID 63. To create a record trace report,
you need to collect data by using DB2 trace. Since the Trace Analyzer is
interested in the SQL activity, start the performance trace with IFCID 63 (you
can specify the destination as GTF or SMF):
start trace(perfm) DEST(GTF) class(30) ifcid(63)
2. Run your applications for which you want to analyze the trace relationships.
Note the data set where the DB2 trace data was collected.
3. Create an OMEGAMON XE for DB2 Performance Expert Record Trace report.
Use your ISPF editor to create a JCL job, as shown in the following example.
Remember to change the setup information (starting with // in your JCL) as
appropriate for your installation. The FILE option is used to store data about
individual DB2 events in data sets that can be used with the DB2 LOAD utility.
//* Notes = *//
//* 1. Add a valid job card *//
//* 2. Change the prefix of the OMEGAMON XE for DB2 PE load *//
//* library db2ompe *//
//* 3 Change the input data set db2trace to your SMF/GTF trace data set *//
//* 4. Change the output data set outputdd and verify *//
//* DD parameters (allocation quantities, etc.) *//
//PMV110 EXEC PGM=DB2PM
//STEPLIB DD DISP=SHR, DSN=db2ompe.TKANMOD
//INPUTDD DD DISP=SHR, DSN=db2trace
//RTFILDD1 DD DSN=outputdd,
// DCB=(RECFM=VB,LRECL=9072,BLKSIZE=9076),
// SPACE=(CYL,(1,1),,,ROUND),

82 IBM Optim Database Relationship Analyzer User’s Guide


// UNIT=SYSDA,
// DISP=(NEW,CATLG,CATLG)
//DPMLOG DD SYSOUT=A
//SYSOUT DD SYSOUT=A
//SYSIN DD *
RECTRACE
FILE
TRACE INCLUDE(IFCID(63))
EXEC
4. Create an IFCID 63 record table to record trace SQL Stmt data. The DDL for the
CREATE statement is provided in the member DGONCFSQ in the DB2
OMEGAMON sample library.
5. Load your trace data into the IFCID 63 record table. The LOAD control
statement is provided in the member DGONLFSQ in the DB2 OMEGAMON
sample library. Provide the output data set name outputdd from step 3 on page
82, RTFILDD1 DD, into SYSREC DD.

Results

Once the data is loaded into the IFCID 63 record table, you can run the Trace
Analyzer to analyze the trace information.

Changing user settings


You can change your settings, such as logging level and stored procedure schema
name, at a global level in the Metadata Database User Settings dialog.
1. Select Edit User Settings from the drop-down menu of the Discovery Explorer
tab. The Metadata Database User Settings dialog opens.
2. Review and edit the path where the log files are stored. This is the path for the
log files on the Optim Database Relationship Analyzer server.
3. Select the level of logging detail. You have the following options:
v Select 1 - Information to include information, warning, and error messages
in the log files.
v Select 2 - Warning to include only warning and error messages.
v Select 3 - Error to include only error messages.
4. Review and edit the stored procedures schema name for the Optim Database
Relationship Analyzer metadata database.
5. Click OK to apply your changes and close the window.
Related concepts
“Optim Database Relationship Analyzer server log and debug log files” on page
123
Use Optim Database Relationship Analyzer server log and debug log files to detect
problems and collect diagnostic information before you contact IBM Software
Support.

| Adding a user-defined relationship


| You can define a relationship and save it to the list of user-defined relationships, so
| that you can later import it into your group discovery configuration options as an
| additional relationship or as an ignored relationship.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 83


| About this task

| Adding a user-defined relationship allows you to reuse the same relationship in


| different group discovery configurations and to share it between users.

| Important: The group discovery process does not consult the list of user-defined
| relationships. You can use the entries in the list to import the
| relationships into group discovery configurations. Only once the
| relationships are imported and saved, they will be used during the
| group discovery process.
| 1. Right-click your database and select Edit User-Defined Relationships. The list
| of user-defined relationships opens.
| 2. Click Add Relationships to add one or more relationships. Follow the
| instructions in the User-Defined Relationship wizard to complete this step. You
| will need to specify the child and the parent tables and the column mapping
| between these tables.
| 3. Click Show Column Mappings to display the column mapping information for
| the selected relationship.
| 4. To remove a relationship from the list, click Remove.

| Results

| Now you can use the user-defined relationship when you edit the group discovery
| configuration options.

Viewing and editing properties for sets, group discovery


configurations, and groups
You can view and edit the properties of objects such as sets, group discovery
configurations, and groups.

About this task


To view and edit the properties of an object:
1. Right-click the object and select Properties. The Properties window opens. The
Properties window provides information such as the name of the selected
object, the object’s creator, the date that the object was created, and a text field
in which you can add additional comments about the selected object.
2. Review the object and make changes.
3. Click OK when finished.

Copying a group discovery configuration


You can copy the group discovery configuration options so that you can use them
again in a different context.

About this task

The new copy of the group discovery configuration will be in the pre-finalized
state. That way you can start with the configuration that you copied and then
customize it to fit your needs. Copying a configuration will not copy any results
from previous runs of the group discovery process.

To copy a group discovery configuration, complete the following steps:

84 IBM Optim Database Relationship Analyzer User’s Guide


1. Right-click the group discovery configuration that you want to copy and select
Copy to. In the Copy Configuration wizard that opens, specify the set into
which you want to copy the group discovery configuration.
2. After you select the set, specify the name of the new group discovery
configuration and click Finish.

Results

The new group discovery configuration that you create contains the same group
discovery options as the group discovery configuration that you copied.

Deleting sets, group discovery configurations, and groups


You can delete objects such as sets, group discovery configurations, and groups.
1. Right-click the object that you want to delete and select Delete.
2. Click Yes if you want to proceed with the delete.

Restriction: To delete a set, you need to delete all the group discovery
configurations in that set first.

Searching for tables


The Find Tables function finds tables in the results of the group discovery process.

About this task

You can search for tables in a version, in all the versions for a particular user
database, or in all the versions across all user databases using the Find Tables
dialog. The scope of the search depends on the context in which you bring up the
Find Tables dialog.
1. Right-click your database or version, and select Find Table in All Versions for
This User Database or Find Tables in This Version. You can also select Find
Table in All Versions for All User Databases from the drop-down menu of the
Discovery Explorer tab.
2. In the Find Tables dialog, enter the database schema name and the table name.
3. Click OK. The list of tables with group information that match your criteria
appears.

Chapter 3. Discovering relationships with Optim Database Relationship Analyzer 85


86 IBM Optim Database Relationship Analyzer User’s Guide
Chapter 4. Optim Database Relationship Analyzer reference
information
This section provides reference information for Optim Database Relationship
Analyzer.

The Optim Database Relationship Analyzer for Linux, UNIX, and


Windows server security
Because the Optim Database Relationship Analyzer for Linux, UNIX, and Windows
server uses an Apache Derby database to store metadata information, the Optim
Database Relationship Analyzer for Linux, UNIX, and Windows server follows the
Apache Derby security policy to protect the database.

The Optim Database Relationship Analyzer server uses the following security
types:
v Database file encryption
v System-wide user authentication
v Metadata column encryption
Each of the security types is discussed in the following sections.

Database file encryption

The database file encryption feature is provided by Apache Derby. With the
database file encryption feature, the physical file system allocated for the Optim
Database Relationship Analyzer metadata database is protected and all of the data
on the physical disk is completely encrypted.

The Optim Database Relationship Analyzer server uses the database file encryption
feature with the dataEncryption and bootPassword options when creating the
Optim Database Relationship Analyzer metadata database. The password for the
metadata database is fixed.

System-wide user authentication

The Optim Database Relationship Analyzer server uses system-wide user


authentication mechanism with the repository that is provided by Apache Derby to
allow users to access the Optim Database Relationship Analyzer server system and
the Optim Database Relationship Analyzer metadata database.

To add a new user to access the Optim Database Relationship Analyzer server
system and its database, the Optim Database Relationship Analyzer server
administrator or the Optim Database Relationship Analyzer DBA can add the new
user information to the derby.properties file that is located under the server
installation directory. The syntax for a new user entry is:
derby.user.user_name=user_password

For example:
derby.user.APP=temp4now

© Copyright IBM Corp. 2008, 2009 87


In the derby.properties file, a default user APP with the temp4now password is
already created. The Optim Database Relationship Analyzer server administrator or
the DBA can modify the default password or add a new user.

After you update the derby.properties file, restart the Optim Database
Relationship Analyzer server by clicking Start → IBM Optim Database
Relationship Analyzer v2.1 → Stop server and then Start server.

Apache Derby also provides database-level authentication and authorization that


allows users to access a specified database only with certain access permissions.
The database-level authentication and authorization is not required by the Optim
Database Relationship Analyzer server. For more information, please refer to
Apache Derby documentation.

Metadata column encryption

The Optim Database Relationship Analyzer server encrypts certain column data to
protect privacy before inserting the data into the Optim Database Relationship
Analyzer metadata tables or when fetching the data from the metadata tables.
Optim Database Relationship Analyzer provides its own encryption and decryption
functions to encrypt and decrypt the column data.
Related tasks
“Setting up login credentials to Optim Database Relationship Analyzer server” on
page 25
Optim Database Relationship Analyzer administrator with root authority can
change the default user password or add more user entries to manage access to the
Optim Database Relationship Analyzer server.
“Starting and stopping the Optim Database Relationship Analyzer server” on page
26
To start the Optim Database Relationship Analyzer server manually, run the
grdStartNetworkServer script while you are logged in as the database instance
owner. Use the grdStopNetworkServer script to stop the Optim Database
Relationship Analyzer network server.

Optim Database Relationship Analyzer stored procedure callable


interface
Optim Database Relationship Analyzer stored procedures provide a callable
interface for running Trace Analyzer and the group discovery process.

Group discovery stored procedure


Use the GRDDISCRUN stored procedure to run the group discovery process.

For z/OS systems, use the following GRDDISCRUN stored procedure prototype:
| CREATE PROCEDURE GRDV2.GRDDISCRUN
| (
| IN METAID VARCHAR(30) FOR MIXED DATA,
| IN USERDATABASEID VARCHAR(30) FOR MIXED DATA,
| IN METASCHEMA VARCHAR(128) FOR MIXED DATA,
| IN TDBID INTEGER,
| IN VIEWID INTEGER,
| IN JOBDSCRB VARCHAR(256),
| OUT RC INTEGER,
| OUT RETURNMSG VARCHAR(4096) FOR MIXED DATA
| )

88 IBM Optim Database Relationship Analyzer User’s Guide


For Linux, UNIX, and Windows systems, use the following GRDDISCRUN stored
procedure prototype:
| CREATE PROCEDURE GRDDISCRUN
| (
| IN METAID VARCHAR(30),
| IN USERDATABASEID VARCHAR(30),
| IN METASCHEMA VARCHAR(128),
| IN TDBID INTEGER,
| IN VIEWID INTEGER,
| IN JOBDSCRB VARCHAR(256),
| OUT RC INTEGER,
| OUT RETURNMSG VARCHAR(4096)
| )

Input parameters

This stored procedure takes the following parameters:


METAID
A user ID with authority to connect to the Optim Database Relationship
Analyzer metadata database.
USERDATABASEID
A user ID with authority to connect to the user database.
METASCHEMA
Optim Database Relationship Analyzer metadata table schema name.
TDBID
The ID of the user database you want to connect to. You can get the TDBID
information by looking up the properties of the database in the Optim
Database Relationship Analyzer user interface.
VIEWID
The ID of the group discovery configuration. You can get the VIEWID
information by looking up the properties of the group discovery configuration
in the Optim Database Relationship Analyzer user interface.
JOBDSCRB
The job description for the running group discovery process.

Output parameters

This stored procedure returns the following parameters:


RC
Optim Database Relationship Analyzer return code.
RETURNMSG
Optim Database Relationship Analyzer return message.

The following tables show the result sets that the group discovery stored
procedure returns:
1.
Table 13. Group discovery stored procedure group discovery configuration information result
set.
Column name Data type Column description
ID INTEGER The group discovery
configuration ID

Chapter 4. Optim Database Relationship Analyzer reference information 89


Table 13. Group discovery stored procedure group discovery configuration information result
set. (continued)
Column name Data type Column description
VERSIONNAME VARCHAR(128) The group discovery
configuration name
INFOID INTEGER Set ID
DEFINEDBY VARCHAR(30) The group discovery
configuration creator name
CREATETIME TIMESTAMP The group discovery
configuration creation time
REMARKS VARCHAR(256) The group discovery
configuration description
LOCKED CHAR(1) Locked or unlocked flag
LOCKEDBY VARCHAR(30) The user name associated
with the lock
DSCYRUNBY VARCHAR(30) The user name associated
with the group discover run
AVAILABLE CHAR(1) The group discovery
configuration availability
CRAWLTYPE VARCHAR(25) Relationship source
information
STATE SMALLINT The group discovery
configuration state
(pre-finalized or finalized)
LOCKTIME TIMESTAMP The group discovery
configuration lock time
LASTUPDATE TIMESTAMP Last update time for the
group discovery
configuration
GRPDSCYTIME TIMESTAMP The time of the group
discovery process run
VERSIONCNTR INTEGER Total number of versions for
this group discovery process

2.
Table 14. Group discovery stored procedure version information result set.
Column name Data type Column description
ID INTEGER Version ID
VIEWID INTEGER The group discovery
configuration ID
VERSIONNAME VARCHAR(128) Version Name
DEFINEDBY VARCHAR(30) Version creator or owner
CREATETIME TIMESTAMP Version creation time
REMARKS VARCHAR(256) Version description
JOBID INTEGER Job ID

90 IBM Optim Database Relationship Analyzer User’s Guide


3.
Table 15. Group discovery stored procedure job information result set.
Column name Data type Column description
ID INTEGER Job ID
DESCRIPTION VARCHAR(256) Job description
SETID INTEGER ID for group discovery
configuration
OWNER VARCHAR(30) Job creator or owner
SUBMITTIME TIMESTAMP The time the job was
submitted
STARTTIME TIMESTAMP The time the job started
FINISHTIME TIMESTAMP Job ID
MESSAGE VARCHAR(1000) Job result message
STATUS CHAR(1) Job status (completed, failed,
or pending)
DUMMY CHAR(1) Dummy column

4.
Table 16. Group discovery stored procedure group information result set.
Column name Data type Column description
ID INTEGER Group ID
SETID INTEGER Version ID
GROUPNAME STRING Group name
DEFINEDBY STRING Group creator
CREATETIME TIMESTAMP The time that the group was
created
REMARK STRING Group description

5.
Table 17. Group discovery stored procedure table information result set.
Column name Data type Column description
TABSCHEMA VARCHAR(128) Table schema name
SETID INTEGER Version ID
GROUPID INTEGER Group ID
DBALIAS CHAR(128) Database alias name
TABNAME VARCHAR(128) Table name
TABSPACENAME VARCHAR(128) Table space name for the
table
DBNAME VARCHAR(8) Database name
USERADDED CHAR(1) Column used to indicate a
table added by a user
COMMONTAB CHAR(1) Column used to indicate a
common table (this column
is not used in the current
version)

Chapter 4. Optim Database Relationship Analyzer reference information 91


Table 17. Group discovery stored procedure table information result set. (continued)
Column name Data type Column description
STRTPNT CHAR(1) Column used to indicate if
the table is a starting point
table

6.
Table 18. Group discovery stored procedure group relationship information result set.
Column name Data type Column description
SCHEMANAME1 VARCHAR(128) Schema name for parent
table or object 1
SETID INTEGER Version ID
GROUPID INTEGER Group ID
DBALIAS1 CHAR(128) Database alias name for
parent table or object 1
OBJECTNAME1 VARCHAR(128) Parent table or object 1 name
OBJECTTYPE1 CHAR(1) Parent table or object 1 type
DBALIAS2 CHAR(128) Database alias name for child
table or object 2
SCHEMANAME2 VARCHAR(128) Schema name for child table
or object 2
OBJECTNAME2 VARCHAR(128) Child table or object 2 name
OBJECTTYPE2 CHAR(1) Child table or object 2 type
RELTYPE CHAR(1) Column used to indicate
relationship source
RELSUBTYPE CHAR(1) Column used to indicate
relationship source
SOURCE CHAR(1) Column used to indicate
relationship source
CONSTNAME VARCHAR(128) Relationship constraint name
CREATEDBY VARCHAR(30) The user who created the
relationship
CREATETIME TIMESTAMP Creation time
MODIFIEDBY VARCHAR(30) The user who modified the
relationship
MODIFIEDTIME TIMESTAMP The time the relationship
was modifeid
REMARKS VARCHAR(256) Relationship description
PCOLNAME VARCHAR(128) Parent table column name
CCOLNAME VARCHAR(128) Child table column name
PCOLTYPE VARCHAR(128) Parent table column data
type
CCOLTYPE VARCHAR(128) Child table column data type
COLPOS INTEGER Column position in the
relationship

92 IBM Optim Database Relationship Analyzer User’s Guide


| Attention: Use the SOURCE, RELTYPE, and RELSUBTYPE columns to
| distinguish the relationship source for a relationship. See the following table for
| information on how to determine the source for column-based relationships:
| Table 19. Determining relationship source for column-based relationships.
| SOURCE RELTYPE RELSUBTYPE Relationship source
| C R S Enforced System
| Referential Integrity
| C R U Non-enforced System
| Referential Integrity
| C P S Package
| C T S Trigger
| U R U User-defined
| relationship
| L U A Trace Analyzer
| results with
| application level
| granularity
| L U U Trace Analyzer
| results with unit of
| work level
| granularity
|

| See the following table for information on how to determine the source for
| table reference information:
| Table 20. Determining relationship source for table reference information.
| SOURCE RELTYPE RELSUBTYPE Relationship source
| C C Column reference
| relationship (DB2 for
| Linux, UNIX, and
| Windows only)
| C H U Hierarchy reference
| relationship (DB2 for
| Linux, UNIX, and
| Windows only)
| C L Lob table reference
| relationship (DB2 for
| z/OS only)
|
| 7.
Table 21. Group discovery stored procedure trace reference relationship information result
set.
Column name Data type Column description
SETID INTEGER Version ID
GROUPID INTEGER Group ID
DBALIAS1 CHAR(128) Database alias name for trace
ID
OBJECTNAME1 VARCHAR(128) Trace ID
OBJECTTYPE1 CHAR(1) Type for trace id

Chapter 4. Optim Database Relationship Analyzer reference information 93


Table 21. Group discovery stored procedure trace reference relationship information result
set. (continued)
Column name Data type Column description
DBALIAS2 CHAR(128) Database alias name for table
SCHEMANAME2 VARCHAR(128) Schema name for table
OBJECTNAME2 VARCHAR(128) Table name
OBJECTTYPE2 CHAR(1) Table type
RELTYPE CHAR(1) Column used to indicate
relationship source
RELSUBTYPE CHAR(1) Column used to indicate
relationship source
SOURCE CHAR(1) Column used to indicate
relationship source
CREATEDBY VARCHAR(30) The name of the creator of
the relationship
CREATETIME TIMESTAMP The time the relationship
was created
MODIFIEDBY VARCHAR(30) The name of the user who
modified the relationship
MODIFIEDTIME TIMESTAMP The time the relationship
was modified
REMARKS VARCHAR(256) Relationship description

| Attention: Use the SOURCE, RELTYPE, and RELSUBTYPE columns to


| distinguish the relationship source for a relationship:
| Table 22. Determining relationship source for trace reference information.
| SOURCE RELTYPE RELSUBTYPE Relationship source
| L W A Trace Analyzer
| context with
| application level
| granularity
| L W U Trace Analyzer
| context with unit of
| work level
| granularity
|

| REXX program for z/OS

You can also use the provided GRDRNGRP JCL, which executes the GRDGROUP
REXX program, in the PDS SGRDSAMP (sample library) to run the stored
procedure.

94 IBM Optim Database Relationship Analyzer User’s Guide


Related concepts
“The Optim Database Relationship Analyzer group discovery process” on page 13
The group discovery process runs at the Optim Database Relationship Analyzer
server and discovers the relationships between tables in the database and then
creates groups of tables based on these relationships.

Trace Analyzer stored procedure


Use the TRACESPINNER stored procedure to run the Trace Analyzer process.

For z/OS systems, use the following TRACESPINNER stored procedure prototype:
CREATE PROCEDURE GRDV2.TRACESPINNER
(
IN METAID VARCHAR(30),
IN USERDATABASEID VARCHAR(30),
IN METASCHEMA VARCHAR(128),
IN TDBID INTEGER,
IN VIEWID INTEGER,
IN TRACE_SCHEMA_NAME VARCHAR(128),
IN TRACE_TABLE_NAME VARCHAR(128),
IN START_DATE VARCHAR(20),
IN END_DATE VARCHAR(20),
IN JOBDSCRB VARCHAR(256),
IN DELETEDYNRELS INTEGER,
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096) )

For Linux, UNIX, and Windows systems, use the following TRACESPINNER
stored procedure prototype:
CREATE PROCEDURE GRDV2.TRACESPINNER
(
IN METAID VARCHAR(30),
IN USERDATABASEID VARCHAR(30),
IN METASCHEMA VARCHAR(128),
IN TDBID INTEGER,
IN VIEWID INTEGER,
IN TRACE_SCHEMA_NAME VARCHAR(128),
IN TRACE_TABLE_NAME VARCHAR(128),
IN START_DATE VARCHAR(20),
IN START_DATE VARCHAR(20),
IN END_DATE VARCHAR(20),
IN JOBDSCRB VARCHAR(256),
IN DELETEDYNRELS INTEGER,
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096)
)

Input parameters

This stored procedure takes the following parameters:


METAID
A user ID with authority to connect to the Optim Database Relationship
Analyzer metadata database.
USERDATABASEID
A user ID with authority to connect to the user database.
METASCHEMA
Optim Database Relationship Analyzer metadata table schema name
TDBID
The ID of the user database you want to connect to. You can get the TDBID

Chapter 4. Optim Database Relationship Analyzer reference information 95


information by looking up the properties of the database in the Optim
Database Relationship Analyzer user interface.
VIEWID
The ID of the group discovery configuration. You can get the VIEWID
information by looking up the properties of the group discovery configuration
in the Optim Database Relationship Analyzer user interface.
TRACE_SCHEMA_NAME
Depending on your user database server system, use this parameter to input
the following information:
v For DB2 for Linux, UNIX, and Windows systems, specify the DB2 statement
event monitor schema name.
v For DB2 for z/OS systems, specify the IFCID 63 record schema name.
v For Oracle systems, leave this parameter blank.
TRACE_TABLE_NAME
Depending on your user database server system, use this parameter to input
the following information:
v For DB2 for Linux, UNIX, and Windows systems, specify the DB2 statement
event monitor table name.
v For DB2 for z/OS systems, specify the IFCID 63 record table name.
v For Oracle systems, leave this parameter blank.
START_DATE
Trace starting time.
END_DATE
Trace ending time.
JOBDSCRB
The job description for the group discovery process that is running.
DELETEDYNRELS
Specify 1 to replace the previous Trace Analyzer results with the new results.
Specify 0 to accumulate the Trace Analyzer results.

Output parameters

This stored procedure returns the following parameters:


RC
Optim Database Relationship Analyzer return code.
RETURNMSG
Optim Database Relationship Analyzer return message.

REXX program for z/OS

You can also use the provided GRDRNTRC JCL, which executes the GRDTRACE
REXX program, in the PDS SGRDSAMP (sample library) to run the stored
procedure.

96 IBM Optim Database Relationship Analyzer User’s Guide


Related concepts
“The Optim Database Relationship Analyzer Trace Analyzer” on page 14
The Trace Analyzer is a program that accesses trace information and finds tables
that are referenced within it. After running the Trace Analyzer, you can run the
group discovery process with the Trace Analyzer results as the relationship source
to discover the relationships between these tables.

Integration with Optim Database Relationship Analyzer


Optim Database Relationship Analyzer provides integration functions so that other
database applications can integrate with Optim Database Relationship Analyzer
and access table relationships through the Optim Database Relationship Analyzer
metadata database.

Optim Database Relationship Analyzer server provides integration functions for


the applications that want to integrate with Optim Database Relationship Analyzer
and get the table relationships. Optim Database Relationship Analyzer provides
Java stored procedures and views on the Optim Database Relationship Analyzer
server, which allow you to access the metadata easily instead of querying multiple
Optim Database Relationship Analyzer metadata tables. To integrate an application
with Optim Database Relationship Analyzer by calling Java stored procedures, you
need to complete the following process for that application:
1. Install and configure the Optim Database Relationship Analyzer server.
2. Install and configure the Optim Database Relationship Analyzer client.

Important: If a you want to accesses an Optim Database Relationship Analyzer


server for z/OS in Java, you must install the Optim Database
Relationship Analyzer client, too. You must also include the
following jar files in CLASSPATH: db2jcc.jar and
db2jcc_license_cisuz.jar.
3. Connect to the Optim Database Relationship Analyzer metadata database on
the server.
4. Call the Optim Database Relationship Analyzer integration Java stored
procedure.
5. Process the return values and result sets from the Java stored procedure.

For z/OS systems, Optim Database Relationship Analyzer provides the following
REXX programs in the PDS SGRDSAMP (sample library) to call the Optim
Database Relationship Analyzer integration Java stored procedures:
v For the predefined groups stored procedure, use the provided GRDPRGR JCL,
which executes the GRDLGRPS REXX program.
v For the predefined group data stored procedure, use the provided GRDPRGRD
JCL, which executes the GRDLRELS REXX program.
v For the predefined groups for a specified schema name stored procedure, use
the provided GRDPRSCH JCL, which executes the GRDLSCHE REXX program.
v For the list server product information stored procedure, use the provided
GRDRNPRD JCL, which executes the GRDPROD REXX program.
| v For version comparison, use the provided GRDCOMPR JCL, which executes the
| GRDCOMP REXX program.

If your application is written in Java, it can call the Optim Database Relationship
Analyzer Java APIs and Optim Database Relationship Analyzer Java stored
procedures directly. The Optim Database Relationship Analyzer Java APIs are

Chapter 4. Optim Database Relationship Analyzer reference information 97


shipped with the Optim Database Relationship Analyzer client. The Optim
Database Relationship Analyzer client jar file grdoptim.jar is located in the grd
subdirectory of the main client installation directory. The application can include
the Optim Database Relationship Analyzer client jar files to its CLASSPATH and
modify the application with Java code. For example:

// Import statement
import java.sql.*;
import com.ibm.grd.conn.*;
....Application codes........
....Application codes........

// Connect to DRA meta database through JDBC driver


// For LUW, the DRA metadata exists in Derby database
// For z/OS, the DRA metadata exists in DB2 z/OS database
ConnectionFactory metaConnFactory = null;
if (metadbtype.equalsIgnoreCase("DERBY")) {
metaConnFactory = new DerbyConnectionFactory();
} else if (metadbtype.equalsIgnoreCase("DB2")) {
metaConnFactory = new DBTwoConnectionFactory();
}
metaConnFactory.connect(dbpath, host, port, userid, user password);

// Call Java Stored Procedure


CallableStatement cs = null;
ResultSet rs = null;
try {
String sql = "CALL GRDV2.GRDPREDEFGROUPS";
cs = metaConnFactory.prepareCall(sql);
// set up input/output parameters like
cs.setString(1, metaid);
cs.setString(2, metaschema);
cs.setStrign(3. “ADMF001”);
cs.setString(4, “EMP”);
cs.setString(5, “*”);
cs.setString(6, “*”);
cs.setString(7, “*”);
cs.registerOutParameter(8, Types.INTEGER);
cs.registerOutParameter(9, Types.VARCHAR);
boolean ran = cs.execute();
rs = cs.getResultSet();
// Process result set for application
// Can filter out the result set
....Application codes........
....Application codes........
}
catch (Exception grde) {
// process exception
}
....Application codes........
....Application codes........

// Disconnect from DRA meta database


metaConnFactory.disconnect();

Figure 20. Optim Database Relationship Analyzer Java API call example.

98 IBM Optim Database Relationship Analyzer User’s Guide


Related concepts
“The Optim Database Relationship Analyzer integration APIs function” on page 16
You can use the Optim Database Relationship Analyzer integration APIs to retrieve
group and table relationship information.
Related tasks
“Scenario: Managing data governance with Optim Database Relationship
Analyzer” on page 11
This scenario describes how you can use Optim Database Relationship Analyzer
groups to ensure that all of your related data travels together in one complete unit
in order to meet the data governance demands of your organization.
Related reference
“Optim Database Relationship Analyzer database object views” on page 109
The GRD_GROUPINGS and GRD_RELATIONS views, which are available on the
Optim Database Relationship Analyzer server, allow you to access the metadata
without querying multiple Optim Database Relationship Analyzer metadata tables.
“Predefined groups stored procedure”
Use the GRDPREDEFGROUPS stored procedure to retrieve a list of groups for a
specific table.

Predefined groups stored procedure


Use the GRDPREDEFGROUPS stored procedure to retrieve a list of groups for a
specific table.

For z/OS systems, use the following GRDPREDEFGROUPS stored procedure


prototype:
CREATE PROCEDURE GRDV2.GRDPREDEFGROUPS
(
IN METAID VARCHAR(30) FOR MIXED DATA,
IN METASCHEMA VARCHAR(128) FOR MIXED DATA,
IN TBSCHEMA VARCHAR(128) FOR MIXED DATA,
IN TBNAME VARCHAR(128) FOR MIXED DATA,
IN DBNAME VARCHAR(128) FOR MIXED DATA,
IN HOSTNAME VARCHAR(512) FOR MIXED DATA,
IN PORTNUMBER VARCHAR(6) FOR MIXED DATA,
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096) FOR MIXED DATA
)

For Linux, UNIX, and Windows systems, use the following GRDPREDEFGROUPS
stored procedure prototype:
CREATE PROCEDURE GRDPREDEFGROUPS
(
IN METAID VARCHAR(30),
IN METASCHEMA VARCHAR(128),
IN TBSCHEMA VARCHAR(128),
IN TBNAME VARCHAR(128),
IN DBNAME VARCHAR(128),
IN HOSTNAME VARCHAR(512),
IN PORTNUMBER VARCHAR(6),
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096)
)

Input parameters

This stored procedure takes the following parameters:

Chapter 4. Optim Database Relationship Analyzer reference information 99


METAID
A user ID with authority to connect to the Optim Database Relationship
Analyzer metadata database.
METASCHEMA
Optim Database Relationship Analyzer metadata table schema name.
TBSCHEMA
Table schema or creator name.
TBNAME
Table name.
DBNAME
The name of the database that contains the table. Depending on your platform,
specify the database name as follows:
v For DB2 for z/OS databases, specify the DB2 location name.
v For DB2 for Linux, UNIX, and Windows databases, specify the user database
name on the DB2 server.
v For Oracle databases, specify the SID shown in the tnsnames.ora file.
HOSTNAME
The hostname of the database server. Specify the hostname as follows:
v For DB2 for z/OS databases, specify the IP address or the hostname
depending on the configuration setup in the Optim Database Relationship
Analyzer client.
v For DB2 for Linux, UNIX, and Windows and Oracle database databases,
specify the IP address or the hostname depending on the configuration setup
in the Optim Database Relationship Analyzer client.
v For Oracle databases, specify the path shown in the tnsnames.ora file.

Important: The value for this parameter must be in upper case.


PORTNUMBER
The port number to access the database.

Important: You can use a percent sign (%) for any value for the DBNAME,
HOSTNAME, and PORTNUMBER parameters. However, if you specify
an asterisk for one of these parameters, you must specify it for all of
these parameters.

Output parameters

This stored procedure returns the following parameters:


RC
Optim Database Relationship Analyzer return code.
RETURNMSG
Optim Database Relationship Analyzer return message.

The stored procedure also returns a result set with group information for the input
table. The following table shows the columns that are included in the result set:
Table 23. GRDPREDEFGROUPS stored procedure result set.
Column name Column data type Column description
TDBID INTEGER Database ID

100 IBM Optim Database Relationship Analyzer User’s Guide


Table 23. GRDPREDEFGROUPS stored procedure result set. (continued)
Column name Column data type Column description
TDBNAME VARCHAR(128) Database name
TDBHOSTNMAE VARCHAR(512) Hostname for user database
TDBPORTNUM VARCHAR(6) Port number for user
database
SETID INTEGER Set ID
SETNAME VARCHAR(128) Set name
SETREMARKS VARCHAR(256) Set description
VIEWID INTEGER The group discovery
configuration ID
VIEWNAME VARCHAR(128) Group discovery
configuration Name
VIEWREMARKS VARCHAR(256) Group discovery
configuration description
CRAWLTYPE VARCHAR(25) Relationship source
GRPDSCYTIME TIMESTAMP Timestamp for running
group discovery
configuration
DSCYRUNBY VARCHAR(30) User that runs group
discovery configuration
VERSIONID INTEGER Version ID
VERSIONNAME VARCHAR(128) Version name
VERSIONREMARK VARCHAR(256) Version description
GRPID INTEGER Group ID
GRPNAME VARCHAR(128) Group name
GRPREMARKS VARCHAR(256) Group description
TBSCHEMA VARCHAR(128) Table schema name
TBNAME VARCHAR(128) Table name
TBSPACE VARCHAR(128) Table space name for the
table

Attention: For a group discovery configuration in the finalize state, only the last
version of the group discovery configuration is returned.

REXX program for z/OS

You can also use the provided GRDPRGR JCL, which executes the GRDLGRPS
REXX program, in the PDS SGRDSAMP (sample library) to run the stored
procedure.

Chapter 4. Optim Database Relationship Analyzer reference information 101


Related tasks
“Scenario: Managing data governance with Optim Database Relationship
Analyzer” on page 11
This scenario describes how you can use Optim Database Relationship Analyzer
groups to ensure that all of your related data travels together in one complete unit
in order to meet the data governance demands of your organization.
Related reference
“Integration with Optim Database Relationship Analyzer” on page 97
Optim Database Relationship Analyzer provides integration functions so that other
database applications can integrate with Optim Database Relationship Analyzer
and access table relationships through the Optim Database Relationship Analyzer
metadata database.

Predefined group data stored procedure


Use the GRDPREDEFGROUPDATA stored procedure to retrieve a list of tables and
table relationships with their connection keys based on a specified group.

For z/OS systems, use the following GRDPREDEFGROUPDATA stored procedure


prototype:
CREATE PROCEDURE GRDV2.GRDPREDEFGROUPDATA
(
IN METAID VARCHAR(30) FOR MIXED DATA,
IN METASCHEMA VARCHAR(128) FOR MIXED DATA,
IN GROUPID INTEGER,
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096) FOR MIXED DATA
)

For Linux, UNIX, and Windows systems, use the following


GRDPREDEFGROUPDATA stored procedure prototype:
CREATE PROCEDURE GRDPREDEFGROUPDATA
(
IN METAID VARCHAR(30),
IN METASCHEMA VARCHAR(128),
IN GROUPID INTEGER,
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096)

Input parameters

This stored procedure takes the following parameters:


METAID
A user ID with authority to connect to the Optim Database Relationship
Analyzer metadata database.
METASCHEMA
Optim Database Relationship Analyzer metadata table schema name.
GROUPID
The group ID in the Optim Database Relationship Analyzer metadata database.

Output parameters

This stored procedure returns the following parameters:

102 IBM Optim Database Relationship Analyzer User’s Guide


RC
Optim Database Relationship Analyzer return code.
RETURNMSG
Optim Database Relationship Analyzer return message.

The stored procedure also returns two result sets with table information and table
relationship information for the input group. The table information result set
returns one or more table relationships for a group. The following tables show the
columns in the result set:
Table 24. Table information for a group
Column name Column data type Column description
TBSCHEMA VARCHAR(128) Table schema name
TBNAME VARCHAR(128) Table name
TBSPACE VARCHAR(128) Table space name for table
TDBNAME VARCHAR(128) Database name for table
TBSTART CHAR(1) Column to indicate if the
table is a starting point table

Table 25. Table relationship information for a group


Column name Column data type Column description
TDBID INTEGER Database ID
TDBNAME VARCHAR(128) Database name
TDBHOSTNMAE VARCHAR(512) Hostname for the user
database
TDBPORTNUM VARCHAR(6) Port number for the user
database
SETID INTEGER Set ID
SETNAME VARCHAR(128) Set name
VIEWID INTEGER The group discovery
configuration ID
VIEWNAME VARCHAR(128) The group discovery
configuration name
VERSIONID INTEGER Version ID
VERSIONNAME VARCHAR(128) Version name
GRPID INTEGER Group ID
GRPNAME VARCHAR(128) Group name
RELTYPE CHAR(1) Column used to indicate
relationship source
RELSUBTYPE CHAR(1) Column used to indicate
relationship source
SCHEMANAME1 VARCHAR(128) Schema name for the parent
table or object 1
OBJECTNAME1 VARCHAR(128) Parent table name or object 1
name
OBJECTTYPE1 CHAR(1) Type for the parent table or
object 1

Chapter 4. Optim Database Relationship Analyzer reference information 103


Table 25. Table relationship information for a group (continued)
Column name Column data type Column description
SCHEMANAME2 VARCHAR(128) Schema name for the parent
table or object 2
OBJECTNAME2 VARCHAR(128) Child table name or object 2
name
OBJECTTYPE2 CHAR(1) Type for the parent table or
object 2
SOURCE CHAR(1) Column used to indicate
relationship source
CONSTNAME VARCHAR(18) Relationship constraint name
PCOLNAME VARCHAR(128) Column name for the parent
table
CCOLNAME VARCHAR(128) Column name for the child
table
PCOLTYPE VARCHAR(128) Column data type of the
parent table column
CCOLTYPE VARCHAR(128) Column data type of the
child table column
COLPOS INTEGER Column position

| Attention: Use the SOURCE, RELTYPE, and RELSUBTYPE columns to distinguish


| the relationship source for a relationship. See the following table for
| information on how to determine the source for column-based
| relationships:
| Table 26. Determining relationship source for column-based relationships.
| SOURCE RELTYPE RELSUBTYPE Relationship source
| C R S Enforced System
| Referential Integrity
| C R U Non-enforced System
| Referential Integrity
| C P S Package
| C T S Trigger
| U R U User-defined
| relationship
| L U A Trace Analyzer
| results with
| application level
| granularity
| L U U Trace Analyzer
| results with unit of
| work level
| granularity
|

| See the following table for information on how to determine the source
| for table reference information:

104 IBM Optim Database Relationship Analyzer User’s Guide


| Table 27. Determining relationship source for table reference information.
| SOURCE RELTYPE RELSUBTYPE Relationship source
| C C Column reference
| relationship (DB2 for
| Linux, UNIX, and
| Windows only)
| C H U Hierarchy reference
| relationship (DB2 for
| Linux, UNIX, and
| Windows only)
| C L Lob table reference
| relationship (DB2 for
| z/OS only)
|

| REXX program for z/OS

You can also use the provided GRDPRGRD JCL, which executes the GRDLRELS
REXX program, in the PDS SGRDSAMP (sample library) to run the stored
procedure.

Server product information stored procedure


Use the GRDSERVERPRODUCTINFO stored procedure to return the Optim
Database Relationship Analyzer server product information

For z/OS systems, use the following GRDSERVERPRODUCTINFO stored


procedure prototype:
CREATE PROCEDURE GRDV2.GRDSERVERPRODUCTINFO
(
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096) FOR MIXED DATA
)

For Linux, UNIX, and Windows systems, use the following


GRDSERVERPRODUCTINFO stored procedure prototype:
CREATE PROCEDURE GRDV2.GRDSERVERPRODUCTINFO
(
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096)
)

Input parameters

This stored procedure does not take any input parameters.

Output parameters

This stored procedure returns the following parameters:


RC
Optim Database Relationship Analyzer return code.
RETURNMSG
Optim Database Relationship Analyzer return message in ASCII format with
the server information or an error message.

Chapter 4. Optim Database Relationship Analyzer reference information 105


This parameter returns Optim Database Relationship Analyzer server
production information in the following format:
version.release.maintenance.interim.build_level. For example:
v For Optim Database Relationship Analyzer version 2.1, the parameter
returns 2.1.0.0.150.

REXX program for z/OS

You can also use the provided GRDRNPRD JCL, which executes the GRDPROD
REXX program, in the PDS SGRDSAMP (sample library) to run the stored
procedure.

List of groups by schema stored procedure


Use the GRDPREDEFGROUPSBYSCHEMA stored procedure to return a list of
groups that contain the specified schema.

For z/OS systems, use the following GRDPREDEFGROUPSBYSCHEMA stored


procedure prototype:
CREATE PROCEDURE GRDV2.GRDPREDEFGROUPSBYSCHEMA
(
IN METAID VARCHAR(30) FOR MIXED DATA,
IN METASCHEMA VARCHAR(128) FOR MIXED DATA,
IN TBSCHEMA VARCHAR(128) FOR MIXED DATA,
IN DATABASE VARCHAR(128) FOR MIXED DATA,
IN HOSTNAME VARCHAR(512) FOR MIXED DATA,
IN PORTNUMBER VARCHAR(6) FOR MIXED DATA,
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096) FOR MIXED DATA
)

For Linux, UNIX, and Windows systems, use the following


GRDPREDEFGROUPSBYSCHEMA stored procedure prototype:
CREATE PROCEDURE GRDV2.GRDPREDEFGROUPSBYSCHEMA
(
IN METAID VARCHAR(30),
IN METASCHEMA VARCHAR(128),
IN TBSCHEMA VARCHAR(128),
IN DATABASE VARCHAR(128),
IN HOSTNAME VARCHAR(512),
IN PORTNUMBER VARCHAR(6),
OUT RC INTEGER,
OUT RETURNMSG VARCHAR(4096)
)

Input parameters

This stored procedure takes the following input parameters:


METAID
A user ID with authority to connect to the Optim Database Relationship
Analyzer metadata database.
METASCHEMA
Optim Database Relationship Analyzer metadata table schema name
TBSCHEMA
Table schema or creator name; use a percentage sign character (%) for any table
name.

106 IBM Optim Database Relationship Analyzer User’s Guide


DATABASE
The name of the database that contains the table; use a percentage sign
character (%) to search through all of the databases in the Optim Database
Relationship Analyzer metadata tables.
HOSTNAME
The hostname of the database server; use a percentage sign character (%) for
any hostname.
PORTNUMBER
The port number to access the database; use a percentage sign character (%)
for any port number.

Output parameters
This stored procedure returns the following parameters:
RC
Optim Database Relationship Analyzer return code.
RETURNMSG
Optim Database Relationship Analyzer return message.

The stored procedure also returns a result set with group information for the input
schema. The following table shows the columns that are included in the result set:
Table 28. GRDPREDEFGROUPS stored procedure result set.
Column name Column data type Column description
TDBID INTEGER Database ID
TDBNAME VARCHAR(128) Database name
SETID INTEGER Set ID
SETNAME VARCHAR(128) Set Name
VIEWID INTEGER The group discovery
configuration ID
VIEWNAME VARCHAR(128) The group discovery
configuration name
VERSIONID INTEGER Version ID
VERSIONNAME VARCHAR(128) Version name
GRPID INTEGER Group ID
GRPNAME VARCHAR(128) Group name

Attention: For a group discovery configuration that is in the finalize state, the
stored procedure will only return group information from the last version in the
group discovery configuration.

REXX program for z/OS

You can also use the provided GRDPRSCH JCL, which executes the GRDLSCHE
REXX program, in the PDS SGRDSAMP (sample library) to run the stored
procedure.

Chapter 4. Optim Database Relationship Analyzer reference information 107


| Version compare stored procedure
| Use the GRDVERSIONCOMPARE stored procedure to compare two versions of the
| group discovery results.

| On Linux, UNIX, and Windows platforms

| To execute the version compare stored procedure on Linux, UNIX, and Windows
| platforms, run one of the following batch files:
| v grdcompare.bat on Windows systems
| v grdcompare.sh on UNIX systems

| These batch files are located in the config directory in the main Optim Database
| Relationship Analyzer server installation directory. The script runs the version
| compare stored procedure and process the returned result sets to determine the
| differences between the specified versions. Use the following syntax to run the
| script:
| grdcompare type[LUW], dbAlias[sampledb], metaUserId[APP], setName,
| groupDicoveryConfigurationName, version1, version2

| This script takes the following parameters:


| type
| The Optim Database Relationship Analyzer server type. Specify LUW.
| metaUserId
| A user ID with authority to connect to the Optim Database Relationship
| Analyzer metadata database.
| dbAlias
| The name of the database that contains the table; use an asterisk (*) to search
| through all of the databases in the Optim Database Relationship Analyzer
| metadata tables. Depending on your platform, specify the database name as
| follows:
| v For DB2 for Linux, UNIX, and Windows databases, specify the user database
| name on the DB2 server.
| v For Oracle databases, specify the SID shown in the tnsnames.ora file.
| setName
| The name of the set that contains the versions that you want to compare.
| groupDicoveryConfigurationName
| The name of the group discovery configuration that contains the version that
| you want to compare.
| version1
| The name of the first version. This parameter is optional.
| version2
| The name of the second version. This parameter is optional.

| Attention: The version1 and version2 parameters are optional. If you do not
| provide these parameters, the utility will compare the two most recent
| versions.

| On z/OS platforms

| To execute the version compare stored procedure on z/OS platforms, modify and
| run the GRDCOMPR.JCL sample JCL.

108 IBM Optim Database Relationship Analyzer User’s Guide


| This JCL takes the following parameters:
| DBType
| The Optim Database Relationship Analyzer server type. Specify ZOS.
| DB2 Location Name
| The location name of the target and source DB2 subsystem.
| DRAdbSchema
| The Optim Database Relationship Analyzer metadata database schema name.
| Specify GRDV2.
| DB2HostIP
| The DB2 location IP address or host name.
| DB2Port
| The DB2 location port number.
| DB2Admin Id
| The DB2 user ID with DBA authority.
| DB2PWD
| The password for the DB2 user ID.
| version1
| The name of the source version.
| version2
| The name of the target version.

| Output

| The script will create a compare.out.timestamp output file in the config directory
| in the main Optim Database Relationship Analyzer server installation directory.

Optim Database Relationship Analyzer database object views


The GRD_GROUPINGS and GRD_RELATIONS views, which are available on the
Optim Database Relationship Analyzer server, allow you to access the metadata
without querying multiple Optim Database Relationship Analyzer metadata tables.

GRD_GROUPING

The GRD_GROUPING group discovery configuration provides the group and table
information. The following table shows the columns for the GRD_GROUPING
view:
Table 29. GRD_GROUPING group discovery configuration columns
Name Data type Description
TDBID INTEGER ID for user database
TDBNAME VARCHAR(128) User database name
TDBHOSTNMAE VARCHAR(512) Host name for user database
TDBPORTNUM VARCHAR(6) Port number for user
database
SETID INTEGER ID for set
SETNAME VARCHAR(128) Set name
SETREMARKS VARCHAR(256) Set description
VIEWID INTEGER ID for view

Chapter 4. Optim Database Relationship Analyzer reference information 109


Table 29. GRD_GROUPING group discovery configuration columns (continued)
Name Data type Description
VIEWNAME VARCHAR(128) View name
VIEWREMARKS VARCHAR(256) View description
CRAWLTYPE VARCHAR(25) Crawl type for group
discovery run
GRPDSCYTIME TIMESTAMP Discovery run time
DSCYRUNBY VARCHAR(30) User ID of the user who runs
group discovery
VERSIONID INTEGER ID for version
VERSIONNAME VARCHAR(128) Version name
VERSIONREMARK VARCHAR(256) Version description
GRPID INTEGER ID for group
GRPNAME VARCHAR(128) Group name
GRPREMARKS VARCHAR(256) Group description
TBSCHEMA VARCHAR(128) Table creator/schema name
TBNAME VARCHAR(128) Table name
TBSPACE VARCHAR(128) Table space name
TBSTART CHAR(1) Starting point table (Y or N)

GRD_RELATIONS

The GRD_RELATIONS group discovery configuration provides group and table


relationships information. The following table shows the columns for the
GRD_RELATIONS view:
Table 30. GRD_RELATIONS view columns
Column name Column data type Description
TDBID INTEGER ID for user database
TDBNAME VARCHAR(128) User database name
TDBHOSTNMAE VARCHAR(512) Host name for user database
TDBPORTNUM VARCHAR(6) Port number for user
database
SETID INTEGER ID for set
SETNAME VARCHAR(128) Set name
VIEWID INTEGER ID for group discovery
configuration
VIEWNAME VARCHAR(128) View name
VERSIONID INTEGER ID for version
VERSIONNAME VARCHAR(128) Version name
GRPID INTEGER ID for group
GRPNAME VARCHAR(128) Group name
RELTYPE CHAR(1) Relationship type
RELSUBTYPE CHAR(1) Sub relationship type
SCHEMANAME1 VARCHAR(128) Parent table schema name

110 IBM Optim Database Relationship Analyzer User’s Guide


Table 30. GRD_RELATIONS view columns (continued)
Column name Column data type Description
OBJECTNAME1 VARCHAR(128) Parent table name
OBJECTTYPE1 CHAR(1) Parent table type
SCHEMANAME2 VARCHAR(128) Child table schema name
OBJECTNAME2 VARCHAR(128) Child table name
OBJECTTYPE2 CHAR(1) Child table type
SOURCE CHAR(1) The source of the table
relationship
CONSTNAME VARCHAR(18) Relationship name
PCOLNAME VARCHAR(128) Parent column name
CCOLNAME VARCHAR(128) Child column name
PCOLTYPE VARCHAR(128) Parent column type
CCOLTYPE VARCHAR(128) Child column type
COLPOS INTEGER Column position

| Attention: Use the SOURCE, RELTYPE, and RELSUBTYPE columns to distinguish


| the relationship source for a relationship. See the following table for
| information on how to determine the source for column-based
| relationships:
| Table 31. Determining relationship source for column-based relationships.
| SOURCE RELTYPE RELSUBTYPE Relationship source
| C R S Enforced System
| Referential Integrity
| C R U Non-enforced System
| Referential Integrity
| C P S Package
| C T S Trigger
| U R U User-defined
| relationship
| L U A Trace Analyzer
| results with
| application level
| granularity
| L U U Trace Analyzer
| results with unit of
| work level
| granularity
|

| See the following table for information on how to determine the source
| for table reference information:

Chapter 4. Optim Database Relationship Analyzer reference information 111


| Table 32. Determining relationship source for table reference information.
| SOURCE RELTYPE RELSUBTYPE Relationship source
| C C Column reference
| relationship (DB2 for
| Linux, UNIX, and
| Windows only)
| C H U Hierarchy reference
| relationship (DB2 for
| Linux, UNIX, and
| Windows only)
| C L Lob table reference
| relationship (DB2 for
| z/OS only)
|
| Related concepts
“The Optim Database Relationship Analyzer integration APIs function” on page 16
You can use the Optim Database Relationship Analyzer integration APIs to retrieve
group and table relationship information.
Related reference
“Integration with Optim Database Relationship Analyzer” on page 97
Optim Database Relationship Analyzer provides integration functions so that other
database applications can integrate with Optim Database Relationship Analyzer
and access table relationships through the Optim Database Relationship Analyzer
metadata database.

Integrating Optim Database Relationship Analyzer with other


IBM Optim Solutions products
You can integrate Optim Database Relationship Analyzer with other IBM Optim
Solutions products.

About this task

To integrate Optim Database Relationship Analyzer with IBM Optim Solutions


products (Data Growth, Data Privacy, Test Data Management and others), Optim
Database Relationship Analyzer provides a Java application to generate an Optim
export file from Optim Database Relationship Analyzer group information. Group
information contains all of the related tables and their relationship information.

After you run the group discovery process from the Optim Database Relationship
Analyzer client, the group discovery process generates table relationships and
stores the information in the Optim Database Relationship Analyzer metadata
database on the Optim Database Relationship Analyzer server system.

Optim Database Relationship Analyzer uses its mapping rules to convert table
relationships contained in the metadata database to Optim SQL-like statements in
an Optim export file. In the export file, Optim Database Relationship Analyzer
generates the partial Optim SQL-like statements, so that you can import this file
through the Optim user interface and continue working with the information in
IBM Optim Solutions products.

To integrate with IBM Optim Solutions products:


1. Set up your system referring to the following possible topologies:

112 IBM Optim Database Relationship Analyzer User’s Guide


Figure 21. Possible Linux, UNIX, and Windows system environment

Figure 22. Possible z/OS system environment

2. From the Optim Database Relationship Analyzer client, set up your group
discovery options for your group discovery configuration, and run the group
discovery process.
3. View the properties of the created group to obtain the group ID. Group ID is
shown as the Group ID field in the Group Property dialog.
4. On the Optim Database Relationship Analyzer client system, run the provided
grd2optim.bat batch file under the grd subdirectory of the main Optim
Database Relationship Analyzer client installation directory to generate an
Optim export file on the Optim Database Relationship Analyzer client system.
Use the following format:
grd2optim metadata_db_platform metadata_db_hostname
metadata_db_portnumber metadata_db metadata_user_id
metadata_schema optim_info_file

Where:
metadata_db_platform
The platform for the Optim Database Relationship Analyzer server
system. This value can be either LUW for Optim Database Relationship
Analyzer for Linux, UNIX, and Windows systems or ZOS for Optim
Database Relationship Analyzer for z/OS systems.
metadata_db_hostname
The host name of the Optim Database Relationship Analyzer server
system.

Chapter 4. Optim Database Relationship Analyzer reference information 113


metadata_db_portnumber
The port number of the Optim Database Relationship Analyzer server
system.
metadata_db
The database name or the location name of the Optim Database
Relationship Analyzer metadata database. For Optim Database
Relationship Analyzer on Linux, UNIX, and Windows system, the
metadata database name is GRDDBV2. For Optim Database Relationship
Analyzer on z/OS systems, enter the location name.
metadata_id
The user ID with access to the Optim Database Relationship Analyzer
metadata database.
metadata_schema
The schema name for the Optim Database Relationship Analyzer
metadata database. Use GRDV2.
optim_info_file
The input file that contains the group ID, export file name, Optim AD
(access definition) name, and dbalias (optional for z/OS). Group ID is
shown as the Group ID field in the Group Property dialog of the Optim
Database Relationship Analyzer user interface. Refer to the optim.in
file for formatting information. The file is located in the grd
subdirectory of the main Optim Database Relationship Analyzer client
installation directory. The export file with the file name that is specified
in the optim_info_file file will be created on the client system. For the
z/OS environment, you need to ftp the file to the z/OS system that has
an IBM Optim Solutions product installed.

Attention: If you use double byte characters or special characters for


the Optim AD name, enclose it in double quotes.
The following mapping rules apply to the Optim export file:
v The group table information is mapped to the TABLE parameter under the
CREATE AD statement.
v All relationships except System RI (primary-foreign key relationships) are
mapped to the CREATE REL statement.
5. Import the export file from Optim Database Relationship Analyzer into the
Optim Solutions products by using the Optim user interface. Use the
relationship information from Optim Database Relationship Analyzer to
complete some or all of the following tasks in the Optim Solutions products:
v Edit archive requests
v Archive processes with point-and-shoot, selection criteria, SQL criteria, and
archive criteria
v Restore processes
v Export and import specifying different objects names
6. If you have any problems during the process, refer to the grd2optim.txt log file
that is located under the same directory as the grd2optim.bat file.

Optim Database Relationship Analyzer sample data


You can use the provided Optim Database Relationship Analyzer sample data and
sample data scenario to test your Optim Database Relationship Analyzer
installation and to learn the basic product functions. The sample data and scenario
are designed for a DB2 for Linux, UNIX, and Windows systems only.

114 IBM Optim Database Relationship Analyzer User’s Guide


High-level sample data configuration and usage process

To use the provided scenario with the Optim Database Relationship Analyzer
sample data, complete the following steps:
1. Setup your system environment according to the following figure:

Figure 23. Optim Database Relationship Analyzer sample data environment setup.

System 1 should have the Optim Database Relationship Analyzer client


installed. System 2 should have the Optim Database Relationship Analyzer
server and a DB2 client V9 installed with a DB2 database on System 3. You
need to have administrator authority for your user ID on System 2.
a. Install the Optim Database Relationship Analyzer client on System 1. See
“Installing Optim Database Relationship Analyzer client” on page 34.
b. Install the Optim Database Relationship Analyzer server on System 2. See
“Installing the Optim Database Relationship Analyzer server for UNIX and
Windows systems” on page 21.
2. Configure the sample tables. See “Configuring Optim Database Relationship
Analyzer sample tables”
3. Review the provided sample tables and relationship information. See “Sample
tables and table relationships” on page 116.
4. Start the Optim Database Relationship Analyzer networking server on System 2
if it is not already running. See “Starting and stopping the Optim Database
Relationship Analyzer server” on page 26.
5. Complete the provided sample data scenario. See “Scenario: Using Optim
Database Relationship Analyzer with sample data” on page 120.

Configuring Optim Database Relationship Analyzer sample


tables
Before using the sample data, you need to configure the sample tables on your
Optim Database Relationship Analyzer server system with DB2 Event Monitor.

Before you begin


Make sure that your environment is set up as shown in “Optim Database
Relationship Analyzer sample data” on page 114.
1. From System 2, connect to the DB2 database on System 3 by issuing the db2
connect command.
2. Create a DB2 event monitor by issuing the following command:
db2 create event monitor drasample for statements write to table

The table STMT_DRASAMPLE is created.

Chapter 4. Optim Database Relationship Analyzer reference information 115


3. Activate the event monitor by issuing the following command:
db2 set event monitor drasample state=1
4. Create Optim Database Relationship Analyzer sample tables by issuing the
following command:
db2 –ntf grd_smp_ctbl.db2

The grd_smp_ctbl.db2 file is located in the \server\samples subdirectory of the


Optim Database Relationship Analyzer server installation directory for
Windows systems and in the server/samples subdirectory for UNIX systems.

Attention: For DB2 9.5 and 9.8 systems with the sample database, you need to
modify the grd_smp_ctbl.db2 file because DB2 9.5 and 9.7 default buffer pool
has the 8K page size. Change the create tablespace statement from
CREATE REGULAR TABLESPACE GRDSPACE PAGESIZE 4K
MANAGED BY SYSTEM USING ('GRDSPACE') EXTENTSIZE 16;

to
CREATE REGULAR TABLESPACE GRDSPACE PAGESIZE 8K
MANAGED BY SYSTEM USING ('GRDSPACE') EXTENTSIZE 16;
5. Insert data into the Optim Database Relationship Analyzer sample tables by
issuing the following command.
db2 –ntf grd_smp_insert.db2

The grd_smp_insert.db2 file is located in the \server\samples subdirectory of


the Optim Database Relationship Analyzer server installation directory.
6. Deactivate the event monitor by issuing the following command:
db2 set event monitor drasample state=0

Results

The sample tables are now configured and ready to use.

Sample tables and table relationships


Use the information in this section as a reference to check the column and table
names or values in the sample data.

The following table provides information that is related to the ORG table:
Table 33. GRDSMPL.ORG
Name Value type Nullable? Description Key
DEPTNUMB SMALLINT NO Department number Primary
DEPTNAME VARCHAR(14) YES Department name
MANAGER SMALLINT YES Manager number
DIVISION VARCHAR(10) YES Division of
corporation
LOCATION VARCHAR(13) YES City

116 IBM Optim Database Relationship Analyzer User’s Guide


The following table provides information that is related to the STAFF table:
Table 34. GRDSMPL.STAFF
Name Value type Nullable? Description Key
ID SMALLINT NO Employee number
NAME VARCHAR(9) YES Employee name
DEPT SMALLINT YES Department number Foreign
JOB CHAR(5) YES Job type
YEARS SMALLINT YES Years of service
SALARY DEC(7,2) YES Current salary
COMM DEC(7,2) YES Commission

The ORG and STAFF tables are related by a DB2–enforced RI relationship and are
linked through the DEPTNUMB and DEPT columns:

Figure 24. System-managed RI relationship

The following table provides information that is related to the DEPARTMENT


table:
Table 35. GRDSMPL.DEPARTMENT (departments in different locations)
Name Value type Nullable? Description Key
DEPTNO CHAR(3) NO Department number Primary
DEPTNAME VARCHAR(129) NO Department name
MGRNO CHAR(6) YES Manager’s employee
number
ADMRDEPT CHAR(3) YES Department to
which this
department reports
LOCATION CHAR(16) YES Remote location
name

Chapter 4. Optim Database Relationship Analyzer reference information 117


The following table provides information that is related to the EMPLOYEE table:
Table 36. GRDSMPL.EMPLOYEE (information on employees from different departments)
Name Value type Nullable? Description Key
EMPNO CHAR(6) NO Employee number Primary
FIRSTNAME CHAR(12) NO First name
MIDINT CHAR(1) NO Middle initial
LASTNAME VARCHAR(15) NO Last name
WORKDEPT CHAR(3) NO Department where Foreign
the employee works
PHONENO CHAR(4) YES Phone number
HIREDATE DATE YES Date of hire
JOB CHAR(8) YES Job description
EDLEVEL SMALLINT NO Education level
SEX CHAR(1) YES Either male (m) or
female (f)
BIRTHDATE DATE YES Birth date
SALARY DEC(9,2) YES Salary
BONUS DEC(9,2) YES Bonus
COMM DEC(9,2) YES Commission
NUMPROJS SMALLINT YES Number of projects
activities the
employee works on

The following table provides information that is related to the EMP_ACT table:
Table 37. GRDSMPL.EMP_ACT
Name Value type Nullable? Description Key
EMPNO CHAR(6) NO Employee number Foreign
PROJNO CHAR(16) NO Project number
ACTNO SMALLINT NO Activity number
EMPTIME DEC(5,2) YES Proportion
employee time
spent on project
EMPSTDATE DATE YES Date of activity
start
EMPENDATE DATE YES Date of activity end

When a row is inserted into or deleted from the EMP_ACT table, the value of the
NUMPROJS column in the EMPLOYEE table is increased or decreased by one,
using the GRDSMPL.GRDTRIGG1 and GRDSMPL.GRDTRIGG2 triggers,
respectively.

118 IBM Optim Database Relationship Analyzer User’s Guide


The following table provides information that is related to the PROJECT table:
Table 38. GRDSMPL.PROJECT
Name Value type Nullable? Description Key
PROJNO CHAR(6) NO Project number Primary
PROJNAME VARCHAR(24) NO Project name
DEPTNO CHAR(3) NO Department
responsible
RESPEMP CHAR(6) NO Employee responsible
PRSTAFF DEC(5,2) YES Estimated mean
staffing
PRSTDATE DATE YES Estimated start date
PRENDATE DATE YES Estimated end date
MAJPROJ CHAR(6) YES Major project for a
subproject

Apart from the system-enforced RI, the following figure shows sample
user-defined relationships between the sample tables:

DEPARTMENT

System-enforced RI User-defined RI

EMPLOYEE PROJECT

System-enforced RI User-defined RI

EMP_ACT

Figure 25. System RI and user-defined relationships

The following table provides information that is related to the CL_SCHED table:
Table 39. GRDSMPL.CL_SCHED (Class schedule)
Name Value type Nullable? Description Key
CLASS_CODE CHAR(7) NO Class code Primary
DAY SMALLINT YES Class duration
STARTING TIME YES Class start time
ENDING TIME YES Class end time

Chapter 4. Optim Database Relationship Analyzer reference information 119


The following table provides information that is related to the CL_ROSTER table:
Table 40. GRDSMPL.CL_ROSTER (List of students enrolled in various scheduled classes)
Name Value type Nullable? Description Key
CLASS_CODE CHAR(7) NO Class code Foreign
EMPNO CHAR(6) NO Student employee
number

The CL_ROOSTER and the CL_SCHED tables are related through the
System-enforced RI by the CLASS_CODE columns.

Figure 26. System-managed RI relationship

Scenario: Using Optim Database Relationship Analyzer with


sample data
Use the provided sample data scenario to verify your Optim Database Relationship
Analyzer installation or to familiarize yourself with the product functions.

Before you begin

Make sure that you have installed and configured your Optim Database
Relationship Analyzer system, as shown in “Optim Database Relationship Analyzer
sample data” on page 114.
1. Connect to the Optim Database Relationship Analyzer server as described in
“Creating a database connection to an Optim Database Relationship Analyzer
metadata database” on page 45.
2. Create a new Optim Database Relationship Analyzer set. Within the set, you
create a group discovery configuration with the specific discovery options that
will result in the discovery of a group of related tables.
a. Right-click the user database and select Create New Set or click the toolbar
icon and name the set SampleSet in the Create New Set wizard.
b. Right-click the set and select Create New Group Discovery Configuration
from the menu options. You can also click the Create New Group
Discovery Configuration icon from the toolbar to complete this step. Name
your group discovery configuration SampleConfig in the Create New Group
Discovery Configuration wizard.
c. Enter the name of the new configuration and click Finish. The Group
Discovery Configuration Editor opens.

120 IBM Optim Database Relationship Analyzer User’s Guide


3. In the Group Discovery Configuration Editor, specify the options that you want
to use to define the group discovery process.
a. In the Set the Scope tab, select the Starting point tables radio button to
indicate that the group discovery process should base the search on the
starting point tables that are specified.
b. Click the Add Starting Point Tables button to bring up the Starting Point
Tables wizard.
c. Use the wizard to select the EMPLOYEE, STAFF, and CL_SCHED tables from the
GRDSMPL schema.
d. For relationship sources, select Catalog and System Referential Integrity.
e. Save the configuration by clicking File → Save or pressing Ctrl + S. You can
save the configuration at any time.
4. Run the group discovery process with the specified options.
a. Select the group discovery configuration and click Run Group Discovery.
b. In the Run Group Discovery wizard, review the configuration, enter a job
description, and click Finish to start the group discovery process. A
meaningful job description can help you identify this group discovery job at
a later time. To check the status of the group discovery process, open the
Progress view.
c. Check the results of the group discovery process by clicking View group
discovery results from the Progress view. The group discovery process
creates one version with three groups that contain the following tables:
v GROUP1: CL_SCHED and CL_ROSTER
v GROUP2: EMPLOYEE, DEPARTMENT, and EMP_ACT
v GROUP3: STAFF and ORG

Attention: The order of the groups might be slightly different from system
to system.
a. To validate the table relationship for the EMPLOYEE table in GROUP2,
right-click GROUP2 and select View Relationships for This Group. The
Group Discovery Results wizard is displayed. Click on the EMPLOYEE
node in the hierarchy tree. The tree shows that EMPLOYEE has two
relationships: EMPLOYEE is a parent table to EMP_ACT and a child table
to DEPARTMENT. Both of the relationships have System Referential
Integrity for the relationship type and Catalog as the relationship source.
You can also explore the column to column information for these
relationships on the right side of the wizard.
5. Run the Trace Analyzer process.
a. Select SampleConfig, right-click and select Run Trace Analyzer.
b. In the Run Trace Analyzer wizard, select the event monitor statement table
name and the date range for the results of the SQL trace to be considered.
You should have created the event monitor while creating and configuring
the sample data environment as described in “Configuring Optim Database
Relationship Analyzer sample tables” on page 115.
c. Enter Demo as the job description.
d. Click Finish to start the Trace Analyzer process. The Trace Analyzer
examines the SQL trace results within the specified date range and writes
the Trace Analyzer results into the Optim Database Relationship Analyzer
metadata database.
e. After Trace Analyzer finishes running, right-click the SampleConfig group
discovery configuration and select View Trace Analyzer Results to view the

Chapter 4. Optim Database Relationship Analyzer reference information 121


results. Optim Database Relationship Analyzer displays a list of tables that
are grouped by the trace IDs. Additionally, Optim Database Relationship
Analyzer displays the table schema name and the date and the time of the
transaction.
f. Verify the result and click Close.
6. Run the group discovery process with the Trace Analyzer result relationship
sourece.
a. Right-click the SampleConfig group discovery configuration and select Edit
Group Discovery Configuration.
b. Select select Catalog and System Referential Integrityand Trace Analyzer
results with Application level granularity.
c. Save the configuration by clicking File → Save or pressing Ctrl + S. You can
save the configuration at any time.
d. Right-click the SampleConfig group discovery configuration and select Run
Group Discovery from the menu options.
e. In the Run Group Discovery wizard, enter Discovery for System RI and
Trace Analyzer for the job description.
f. Click Finish to start the group discovery process. A meaningful job
description can help you identify this group discovery job at a later time. To
check the status of the group discovery process, open the Progress view.
g. Check the results of the group discovery process by clicking View group
discovery results from the Progress view. The group discovery process
creates one version with one group that contains the following tables:
v ADDRESS
v CL_SCHED
v CL_ROSTER
v CONTACT
v DEPARTMENT
v EMPLOYEE
v EMP_ACT
v ORG
v PROJECT
v STAFF
v US_ADDRESS
h. To validate the table relationship for the EMPLOYEE table in the group,
right-click GROUP1 and select View Relationships for This Group. The
Group Discovery Results wizard is displayed. Click on the EMPLOYEE
node in the hierarchy tree. The tree shows that EMPLOYEE has nine
children relationships and nine parent relationships. The table relationships
have Trace Analyzer results as the relationship source.

Results

You have successfully tested the fundamental functionality of Optim Database


Relationship Analyzer.

122 IBM Optim Database Relationship Analyzer User’s Guide


Chapter 5. Troubleshooting Optim Database Relationship
Analyzer problems
This information helps you diagnose, recover from, and resolve Optim Database
Relationship Analyzer problems.

Optim Database Relationship Analyzer trace information


Optim Database Relationship Analyzer stores its client trace information in log files
and its server trace information in log files and in debug log files.

Collect all the available trace information about an error before you contact IBM
Software Support.

Optim Database Relationship Analyzer client log file


Use the Optim Database Relationship Analyzer client log file to detect problems
and collect diagnostic information before you contact IBM Software Support.

The Optim Database Relationship Analyzer client log file is GRDClient.log, and it
is located in the grd subdirectory of your client installation directory.

The log file contains information about program environment, user actions,
commands, and processes, as well as exceptions and error messages.

Optim Database Relationship Analyzer server log and debug


log files
Use Optim Database Relationship Analyzer server log and debug log files to detect
problems and collect diagnostic information before you contact IBM Software
Support.

Server log files contain trace information. Support and development members can
use the log files to obtain information about program crashes, information
messages, warnings, errors, and fatal errors.

Debug log files contain key Optim Database Relationship Analyzer execution
points. The trace information is written to the debug log file at normal execution
completion and when a severe error causes Optim Database Relationship Analyzer
to terminate abnormally. Examine the debug log files to determine the action that
is being performed when Optim Database Relationship Analyzer terminated.

The detail level for both server log and debug log files is based on the LOGLEVEL
value that you can specify by editing the user properties in the Metadata Database
User Settings dialog that you can access by selecting Edit User Settings from the
drop-down menu of the Discovery Explorer tab of the Optim Database
Relationship Analyzer client user interface.

Both server log and debug log files contain the following information:
v The date of the event
v The time of the event
v The user ID that performed the operation

© Copyright IBM Corp. 2008, 2009 123


v The type of message (INFO or FATAL)
v The class that was invoked
v The method that was invoked
v The event message

Server log file location and naming convention for Linux, UNIX,
and Windows

You can specify the path for the location of the log files in the Metadata Database
User Settings dialog that you can access by selecting Edit User Settings from the
drop-down menu of the Discovery Explorer tab of the Optim Database
Relationship Analyzer client user interface. The default server log location is:
GRDV2SERVERHOME\server. The default names for the server log and debug log files
are:
v <user_id>_<db_name>_<db_type>_tdbid.log for log files
v <user_id>_<db_name>_<db_type>_tdbidDEBUG.log for debug log files

In the template, db_name is the user database name, db_type is the user database
type (such as DB2, Oracle), and tdbid is the user database ID. You can get more
information about the user database by right-clicking on the database in the Optim
Database Relationship Analyzer client user interface and selecting Properties.

The default location of the server log files is the server directory under the main
installation directory unless you specify a different location in the Metadata
Database User Settings dialog.

For example, if you specify the log file path as C:\GRD_LOG and the metadata user
ID is APP, the following log files are created in the C:\GRD_LOG directory:
v APP_SAMPLE_DB2_1.log
v APP_SAMPLE_DB2_1DEBUG.log
In this example, APP is the user ID, SAMPLE is the user database name, DB2 is
the database type, and 1 is the user database ID.

Server log file location and naming convention for z/OS

The log data sets are located on a disk volume. The default name for the server log
and debug log files are:
v user_id.GRDLOG for server log files
v user_id.GRDDBG.LOG for debug log files
The default high-level qualifier that Optim Database Relationship Analyzer uses to
allocate the log files is USERID. You can specify the high level qualifier in the
Metadata Database User Settings dialog that you can access by selecting Edit User
Settings from the drop-down menu of the Discovery Explorer tab of the Optim
Database Relationship Analyzer client user interface. For example, if the log file
path that is specified by the user is SYSADM, the following log files are created:
v SYSADM.GRDLOG
v SYSADM.GRDDBG.LOG

124 IBM Optim Database Relationship Analyzer User’s Guide


Related concepts
“The Optim Database Relationship Analyzer metadata database” on page 42
The Optim Database Relationship Analyzer metadata database (GRDDBV2) is a
collection of program configuration data, user database connections, user actions,
trace information, and other data that is used by Optim Database Relationship
Analyzer.
Related tasks
“Changing user settings” on page 83
You can change your settings, such as logging level and stored procedure schema
name, at a global level in the Metadata Database User Settings dialog.

| Recovery procedures
| Recovery procedures have been developed for many common Optim Database
| Relationship Analyzer problems.

| Important: If an error occurs and is corrected on an Optim Database Relationship


| Analyzer server system, you need to restart all the Optim Database
| Relationship Analyzer clients that access that server to keep both
| systems in sync.

| Recovering from a failure to connect to a user database


| Symptoms

| When trying to login to a DB2 user database after creating a connection to the
| Optim Database Relationship Analyzer metadata database, the verifying login
| message is shown with the following error:
| GRDG000: com.ibm.grd.exception.GRDException: GRDG000 :
| java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver

| Environment

| This problem occurs on the Optim Database Relationship Analyzer servers for
| Linux, UNIX, and Windows.

| Resolving the problem

| User response:
| 1. Make sure CLASSPATH contains DB2 JDBC driver files.
| 2. For UNIX environments, where the sudo command is used to start Optim
| Database Relationship Analyzer server by running the
| grdStartNetworkServer.sh. script, make sure that the CLASSPATH value is
| kept. If the value is not kept, you can use the visudo command to add the
| following entry to the etc/sudoers file:
| Defaults env_keep = "CLASSPATH"

| Opening the getting started view in the user interface


| Symptoms

| If you have closed the Optim Database Relationship Analyzer getting started view
| in the Optim Database Relationship Analyzer client user interface, you can open it
| by resetting the Optim Database Relationship Analyzer perspective.

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 125


| The getting started view is displayed when you start the Optim Database
| Relationship Analyzer client. The view provides information about common Optim
| Database Relationship Analyzer tasks. If you close the view, it will not be
| displayed again unless you reset the perspective.

| Environment

| This problem occurs on the Optim Database Relationship Analyzer client.

| Resolving the problem

| User response:
| 1. Select Window → Reset perspective

| Troubleshooting an empty Trace Analyzer results set


| Symptoms

| Trace Analyzer does not return any results, or the Optim Database Relationship
| Analyzer shows an empty Trace Analyzer results window.

| Resolving the problem

| User response:
| 1. For Oracle user databases, make sure that you have started the audit trace by
| using the keyword extended. If the keyword extended is not used, Oracle does
| not audit the SQL statements.
| For example, for Oracle 10.2g, issue the following commands to start the trace:
| alter system set audit_trail=xml,extended,scope=spfile;
| alter system set audit_trail=db_extended,scope=spfile

| Important: Restart the Oracle instance for the parameter settings to take effect.
| 2. For Oracle user databases, make sure that the appropriate AUDIT statements
| are issued for INSERT, SELECT, DELETE, UPDATE and CREATE statements.
| 3. For DB2 for Linux, UNIX, and Windows, DB2 for z/OS, and Oracle user
| databases, make sure that the start time and the end time are specified correctly
| when you run Trace Analyzer.

| Recovering from a failure to retrieve stored procedure


| information for z/OS servers
| Symptoms

| The Optim Database Relationship Analyzer client displays the following message:
| Unable to retrieve the stored procedure schema name from the metadata database.
| You may need to run GRDDEFPR to populate the User Properties table.

| Causes

| Either the JCL job GRDDEFPR was not executed or the default value
| DRA_DEFAULT_PROPS specified for the USERID column in the JCL job
| GRDDEFPR was modified by the user.

| Environment

126 IBM Optim Database Relationship Analyzer User’s Guide


| This problem occurs on the Optim Database Relationship Analyzer servers for
| z/OS.

| Resolving the problem

| User response:
| 1. Change to USERID column in the GRDDEFPR member back to the default
| value DRA_DEFAULT_PROPS.
| 2. Submit the job GRDDEFPR.
| 3. Do not modify the default values specified for columns USERID,
| GRD_METADATA_OWNER, and GRD_STORPROC_SCHEMA in the JCL job
| GRDDEFPR to avoid errors.

| Recovering from the GRDG000 error


| Symptoms

| The following message is displayed when running the Optim Database


| Relationship Analyzer client:
| GRDG000 : "Get result set for executing sql SELECT ID, SETNAME,
| TDBID, TOTALVERSIONS, DEFINEDBY, CREATETIME, REMARKS FROM
| GRDV1.GRD_WORKINGSETINFO WHERE TDBID = 1 failed. com.ibm.db2.jcc.t2zos.bb:
| [IBM/DB2][T2zos/2.11.67]T2zosStatement.readOpenQueryInternal:nativeOpen:4673:DB2
| engine SQL error, SQLCODE = -904, SQLSTATE = 57011, error
| tokens = 00E7009A;100;TEMP DATABASE ".

| Causes

| The temporary database and table space were not created. This problem can be
| caused by the DB2 setup when the system creates the temporary database,
| stogroup, and tablespaces.

| Environment

| This problem occurs on the Optim Database Relationship Analyzer servers for
| z/OS.

| Resolving the problem

| User response: Make sure that the temporary database and table space are created.
| The temporary database and table space are required by Optim Database
| Relationship Analyzer.

| Recovering from a failure to load the db2jcct2zos library


| Symptoms

| The following error is displayed:


| 0090 DSNX961I DSNX9WLJ ATTEMPT TO PERFORM JNI FUNCTION INTERNAL_ERROR 704
| 0090 FAILED FOR STORED PROCEDURE . . SSN= OPD2 PROC= OPD2WLMJ ASID=
| 0090 007B CLASS= METHOD= ERROR INFO= com.ibm.db2.jcc.b.SqlException:
| 0090 Failure in loading T2 native library db2jcct2zos, reason:
| 0090 java.lang.UnsatisfiedLinkError: db2jcct2zos (Not found in
| 0090 java.library.path)

| Causes

| WLM PROC is not setup correctly.


Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 127
| Environment

| This problem occurs on the Optim Database Relationship Analyzer servers for
| z/OS.

| Resolving the problem

| User response:
| 1. Include SDSNLOD2 as STEPLIB DD entry in WLM PROC. Both SDSNLOAD
| and SDSNLOD2 are required in WLM PROC.
| 2. When calling GRDJBIND, verify that LIBPATH is also setup correctly.

| Recovering from a WLM error


| Symptoms

| The following error is displayed when starting WLM:


| - CreateJavaVM
| - FAILED FOR STORED PROCEDURE . . SSN= V81A PROC= V81AWLMJ ASID=
| - 003B CLASS= METHOD= ERROR INFO= FAILURE IN CreateJavaVM: invalid
| - arguments; CHECK JVMPROPS options.

| Causes

| JVM properties are not configured correctly.

| Environment

| This problem occurs on the Optim Database Relationship Analyzer servers for
| z/OS.

| Resolving the problem

| User response: You need to set up the JMVPROPS field or include RESET_FREQ=-1
| in the JAVAENV data set.

| Recovering from the SLQCODE 471 error


| You can recover from the SLQCODE 471 error, which occurs when you are trying
| to run the GRDV2.GRDSERVERPRODUCTINFO stored procedure.

| Symptoms

| Optim Database Relationship Analyzer returns the SLQCODE 471 error with return
| code 00E79109 when you are trying to run the
| GRDV2.GRDSERVERPRODUCTINFO stored procedure.

| Causes

| The JAVAENV entry in WLM PROC is commented, out or the JAVAENV dataset
| content is not correct.

| Environment

| This problem occurs on the Optim Database Relationship Analyzer servers for
| z/OS.

128 IBM Optim Database Relationship Analyzer User’s Guide


| Resolving the problem

| User response: Verify the contents of WLM, WLM PROC, and the JAVAENV
| dataset.

| Recovering from the SQLCODE 430 error


| Symptoms

| On DB2 for z/OS systems, Optim Database Relationship Analyzer returns the
| SQLCODE 430 error. This error indicates that Optim Database Relationship
| Analyzer Java stored procedure has abnormally terminated, which means that the
| z/OS system could run out of space, or there is another reason that causes the
| individual stored procedure or the entire WLM to fail.

| Resolving the problem

| User response: Analyze your DB2 for z/OS system to check what other system
| error could have caused the DB2 error. Correct the error and restart both theOptim
| Database Relationship Analyzer client and server systems.

| Recovering from the GRDG108 error


| Symptoms

| The GRDG108 error is usually an indicator that another user has an active process
| on the same group discovery configuration. Sometimes, however, this error can
| indicate that an error has caused the group discovery configuration to become
| unusable.

| Resolving the problem

| User response: The GRDG108 error can occur under several different scenarios and
| the solution for each scenario is different:
| v If a user starts to run the group discovery process, Trace Analyzer or the delete
| process on a group discovery configuration, and a second user tries to run the
| group discovery process, Trace Analyzer or the delete process on the same
| configuration in the same user database before the activity that has been issued
| by the first user is completed, the Optim Database Relationship Analyzer server
| returns the GRDG108 error for the second user. The second user should interpret
| this return code to mean that the group discovery configuration is currently
| unavailable and should try again after the first user’s activity is completed.
| v If you start to run the group discovery process, Trace Analyzer or the delete
| process on a group discovery configuration, and then you attempt to execute
| another activity from another instance of the Optim Database Relationship
| Analyzer user interface on the same configuration in the same user database
| before the first activity is completed, the Optim Database Relationship Analyzer
| server returns the GRDG108 error. To resolve the error, you should try again
| after the first activity is completed.
| v If you start to run the group discovery process, Trace Analyzer or the delete
| process on a group discovery configuration, and the server returns the GRDG108
| error, you should first make sure that there are no other qualifying processes
| running on the same group discovery configuration. If you have confirmed that
| there are no other processes running on the same configuration, and you have
| restarted the process and have received the GRDG108 error again, most likely,
| another error has previously occurred that has made the configuration unusable.

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 129


| Once you have confirmed that the configuration is in an unusable state, you
| must copy the unusable configuration into a new configuration. The copied
| configuration will keep all the options of the original configuration. If you still
| need to restore the unusable configuration, contact IBM Software Support.

| Recovering from SQLCODE 913 and 501 or the ″dead


| statement″ error
| Symptoms

| If you receive an SQLCODE 913 and then SQLCODE 501 on z/OS systems or the
| ″dead statement″ error on Linux, UNIX, and Windows systems, your systems is
| running in a concurrency environment where multiple processes try to access
| Optim Database Relationship Analyzer metadata.

| Resolving the problem

| User response: Run the process at a later time in a non-concurrency environment.

| Cancelling or stopping the group discovery process or Trace


| Analyzer from the user interface
| Symptoms

| If you click Cancel from the Run Group Discovery wizard or the Trace Analyzer
| wizard, the corresponding job does not stop.

| Resolving the problem

| User response: Optim Database Relationship Analyzer is a client-server product, so


| the group discovery process and Trace Analyzer are started on the server system as
| Java stored procedures. When you click Finish from the Run Group Discovery
| wizard or theTrace Analyzer wizard, the corresponding Java stored procedure is
| started on the server system. You cannot stop the stored procedures on the server
| system from the user interface on the client system. The Cancel button does not
| stop the job on the server system, and you must wait until the job is finished.

| Differences in the finished time on the Progress view and the


| Job Status wizard
| Symptoms

| The finished time that is specified in the Progress view can be different from the
| end time that is specified the Job Status wizard.

| Resolving the problem

| User response: This situation can happen for the following reasons:
| v The begin and the end time of the job status are generated on the server and
| will reflect the time and timezone of the Optim Database Relationship Analyzer
| server. This time also represents only the running time of the stored procedure
| on the server.
| v The finished time of the Progress view is generated by the Eclipse user interface.
| This time reflects the length of the entire process from the click of the mouse
| that initiated the job. Since this time is generated by Eclipse, it reflects the time
| and timezone of the Optim Database Relationship Analyzer client system.

130 IBM Optim Database Relationship Analyzer User’s Guide


| Gathering diagnostic information
| Before you report a problem with Optim Database Relationship Analyzer to IBM
| Software Support, you need to gather the appropriate diagnostic information.
| 1. Provide the following information for all Optim Database Relationship
| Analyzer problems:
| v A clear description of the problem and the steps that are required to re-create
| the problem
| v All messages that were issued as a result of the problem
| v Product release number and the number of the last program temporary fix
| (PTF) that was installed
| v The version or versions of the user database that you are using and the type
| and version of the operating system that you are using
| Provide additional information based on the type of problem that you
| experienced:
| For Optim Database Relationship Analyzer client problems, provide the
| following information
| v A screen shot of the panel that you were using when the problem
| occurred
| v A description of the task that you were doing before the problem
| occurred
| v The client log file
| For Optim Database Relationship Analyzer server problems, provide the
| following information
| v The server log file
| v The server debug log file
| 2. Copy and save all of the appropriate messages from the Optim Database
| Relationship Analyzer client:
| v To copy a message by using the mouse:
| a. Click Details. The Details pane opens.
| b. Click on the pane to highlight the message.
| c. Right-click on the pane and select Copy.
| v To copy a message by using the keyboard:
| a. Use the Tab key to navigate to the Details button.
| b. Press Enter. The Details pane opens.
| c. Use the Tab key to navigate to the pane.
| d. Press Shift + F10 to bring up the popup menu.
| e. Use the arrow keys to select Copy.

Optim Database Relationship Analyzer messages


Use the information in these messages to help you diagnose and solve Optim
Database Relationship Analyzer problems.

Message format

Optim Database Relationship Analyzer messages adhere to the following format:


GRDX(X)NNN

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 131


GRDA000 • GRDA002

Where:
GRD Indicates that the message was issued by Optim Database Relationship
Analyzer
X(X) Indicates the type and the possible subtype of the message:
A Indicates that the message was issued by an API call.
G Indicates that this is a general information message.
D Indicates that the message was issued by the group discovery
process.
UI Indicates that the message was issued by the Optim Database
Relationship Analyzer user interface.
R Indicates that the message was issued by the System RI during the
group discovery process.
SL Indicates that the message was issued by the Trace Analyzer
process for a DB2 Linux, UNIX, and Windows server.
SO Indicates that the message was issued by the Trace Analyzer
process for an Oracle server.
SZ Indicates that the message was issued by the Trace Analyzer
process for a DB2 z/OS server.
NNN Indicates the message identification number

Each message also includes the following information:


Explanation:
The Explanation section explains what the message text means, why it
occurred, and what its variables represent.
System action:
The System action section explains what the system will do in response to
the event that triggered this message.
User response:
The User response section describes whether a response is necessary, what
the appropriate response is, and how the response will affect the system or
program.
Module
The Module section indicates which module or modules are affected.

could not complete the version comparison process for


GRDA000 grdcompare type[LUW/ZOS],
an unspecified reason.
dbAliase[sampledb], metaUserId[APP],
setName, User response: Review the specific return code, take
groupDicoveryConfigurationName the appropriate actions, and try again.
Explanation: The parameters for the API call were not
specified correctly. Verify that the appropriate number GRDA002 An error occurred while attempting to
of options were specified in the API call. read the Optim Database Relationship
Analyzer properties file.
User response: Verify the parameter count according
to the template and try again. Explanation: The version compare API must read the
Optim Database Relationship Analyzer properties file
to determine the Optim Database Relationship
GRDA001 The version compare process failed.
Analyzer server properties such as host name, port
Explanation: Optim Database Relationship Analyzer number, and schema.
User response: Verify that the file exists and that the

132 IBM Optim Database Relationship Analyzer User’s Guide


GRDA003 • GRDG001

correct name is specified. Check your connection and


GRDD001 Failed to run the group discovery
try again. If the error persists, contact IBM Software
process. Reason unknown.
Support.
Explanation: The group discovery process run failed.
GRDA003 An error occurred while reading the User response: Refresh the interface and try to re-run
password. the group discovery process. If the error recurs, contact
your Optim Database Relationship Analyzer system
Explanation: Optim Database Relationship Analyzer
administrator to check the Optim Database
could not read the specified password. You must enter
Relationship Analyzer metadata database on the Optim
the Optim Database Relationship Analyzer server and
Database Relationship Analyzer server system.
user database passwords at the command line.
User response: Verify that the password is correct and
GRDDR001 The group discovery configuration ID
try again.
configuration_ID, group discovery
configuration name configuration_name is
GRDA004 Invalid database type. Please change locked.
type to ZOS or LUW.
Explanation: The specified group discovery
Explanation: The Optim Database Relationship configuration is locked.
Analyzer metadata database type you have specified is
User response: Wait for the user holding the lock to
invalid.
release the configuration and try again
User response: The only valid values are ZOS or LUW.
GRDDR002 Table table_name is invalid, does not
GRDA005 Could not retrieve the service name exist, or is a boundary table.
from DB2.
Explanation: The specified table does not exist, or has
Explanation: The version compare API was unable to been added as a boundary table in the group discovery
retrieve the DB2 port while retrieving the DB2 service options.
name.
User response: Check the table name and make sure
User response: Make sure that the service name is set that it exists and that it is not a boundary table. Refresh
by issuing the following command: db2 get db cfg. the interface and try to re-run the group discovery
process. If the error recurs, contact your Optim
Database Relationship Analyzer system administrator
GRDA006 Could not retrieve the local port for the to check the Optim Database Relationship Analyzer
user database. metadata database on the Optim Database Relationship
Explanation: The version compare API could not Analyzer server system.
determine the port of the user database from the Optim
Database Relationship Analyzer properties file. GRDG000 message.
User response: Check that the Optim Database Explanation: This is a general SQL exception message
Relationship Analyzer server is configured properly from the JDBC driver.
and try again.
User response: Fix the problem based on the message.
Refer to JDBC reference if needed.
GRDA007 Could not retrieve the system property
values.
GRDG001 Failed to get or refresh tree data by
Explanation: The version compare API relies upon the database name. Reason unknown.
environment variables to locate the various property
files. This error occurs if the environment variables are Explanation: Optim Database Relationship Analyzer
not configured correctly. failed to retrieve set, group discovery configuration,
version, and group information from the Optim
User response: Make sure that Optim Database Database Relationship Analyzer metadata database for
Relationship Analyzer is configured properly. The the user database.
environment variables are configured during the Optim
Database Relationship Analyzer installation process. User response: Contact your Optim Database
Relationship Analyzer administrator to check the
Optim Database Relationship Analyzer metadata
database on the Optim Database Relationship Analyzer
server system.

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 133


GRDG002 • GRDG011

GRDG002 Failed to create a set with name set name. GRDG007 Failed to retrieve table list with schema
name schema name and table name table
Explanation: Create a new set with set name failed
name.
because the user database does not exist in the Optim
Database Relationship Analyzer metadata database. Explanation: Cannot retrieve the list of tables with the
specified schema and table names from the user
User response: Refresh the interface and try to
database.
recreate the set. If the error recurs, contact your Optim
Database Relationship Analyzer system administrator User response: Try performing the action again. If the
to check the Optim Database Relationship Analyzer error persists, contact your Optim Database
metadata database on the Optim Database Relationship Relationship Analyzer administrator and check the user
Analyzer server system. database on the Optim Database Relationship Analyzer
server system.
GRDG003 Failed to create a group discovery
configuration with name GRDG008 Failed to retrieve user-defined
configuration_name. relationship information with schema
name schema name and table name table
Explanation: Create a new group discovery
name.
configuration with configuration_name failed because the
set does not exist in the Optim Database Relationship Explanation: Optim Database Relationship Analyzer
Analyzer metadata database failed to retrieve user-defined relationship information
with the specified schema name and table name.
User response: Refresh the interface and try to
recreate the group discovery configuration. If the error User response: Redo the action. If the error persists,
recurs, contact your Optim Database Relationship contact your Optim Database Relationship Analyzer
Analyzer system administrator to check the Optim administrator and check the schema and table names in
Database Relationship Analyzer metadata database on the Optim Database Relationship Analyzer metadata
the Optim Database Relationship Analyzer server database on the Optim Database Relationship Analyzer
system. server system.

GRDG004 The set set name already exists. Specify GRDG009 Failed to retrieve table information from
another name. the system catalog.
Explanation: An attempt was made to create a new Explanation: Optim Database Relationship Analyzer
set, but a set with this name already exists. failed to retrieve the user table information from the
user database system catalog table.
User response: Create a new set with a different
name. User response: Redo the action. If the error persists,
contact your system administrator and check the user
database.
GRDG005 The group discovery configuration
configuration_name already exists. Specify
another name. GRDG010 Table schema name.table name is not
created.
Explanation: An attempt was made to create a new
configuration, but a group discovery configuration with Explanation: An attempt was made to load a table
this name already exists. that does not exist on the target database.
User response: Create a new configuration with a User response: Verify the table name on the user
different name. database and contact your system administrator.

GRDG006 The schema name schema name is GRDG011 Table schema name.table name is a
reserved. Specify another name. boundary table.
Explanation: The specified schema name is reserved. Explanation: The specified table is in the boundary
Optim Database Relationship Analyzer cannot find, tables list.
add, or search tables with this schema.
User response: Specify a different table that is not in
User response: Specify a different schema name. the boundary objects list.

134 IBM Optim Database Relationship Analyzer User’s Guide


GRDG012 • GRDG022

Relationship Analyzer metadata database on the Optim


GRDG012 The group discovery configuration ID id
Database Relationship Analyzer server system.
is not created or is deleted in the
metadata database table
GRD_ALLWORKINGSETS. GRDG018 Failed to get/refresh set. Reason
unknown.
Explanation: The group discovery configuration with
the specified id does not exist in Optim Database Explanation: Optim Database Relationship Analyzer
Relationship Analyzer metadata database table failed to refresh the set tree from the UI.
GRD_ALLWORKINGSETS.
User response: Redo the action. If the error persists,
User response: Refresh the navigation tree to make contact your Optim Database Relationship Analyzer
sure that the configuration has not been deleted by administrator and check the Optim Database
another user and try again. If the problem persists, Relationship Analyzer metadata database on the Optim
contact IBM Software Support. Database Relationship Analyzer server system.

GRDG013 Failed to submit starting point table(s). GRDG019 Failed to get/refresh group discovery
configuration. Reason unknown.
Explanation: Optim Database Relationship Analyzer
could not submit the starting point table or tables. Explanation: Optim Database Relationship Analyzer
failed to refresh the group discovery configuration tree
User response: Resubmit the starting point tables. If
from the UI.
the error persists, contact IBM Software Support.
User response: Redo the action. If the error persists,
contact your Optim Database Relationship Analyzer
GRDG014 Failed to get job status from the
administrator and check the Optim Database
metadata database table.
Relationship Analyzer metadata database on the Optim
Explanation: Optim Database Relationship Analyzer Database Relationship Analyzer server system.
failed to retrieve job status from the Optim Database
Relationship Analyzer metadata database table
GRDG020 Failed to get/refresh version. Reason
GRD_JOBS .
unknown.
User response: Redo the action. If the error persists,
Explanation: Optim Database Relationship Analyzer
contact your Optim Database Relationship Analyzer
failed to refresh the version tree from the UI.
administrator and check the Optim Database
Relationship Analyzer metadata database on the Optim User response: Redo the action. If the error persists,
Database Relationship Analyzer server system. contact your Optim Database Relationship Analyzer
administrator and check the Optim Database
Relationship Analyzer metadata database on the Optim
GRDG016 Failed to retrieve group discovery
Database Relationship Analyzer server system.
options from the metadata database
table.
GRDG021 Failed to populate Optim Database
Explanation: Optim Database Relationship Analyzer
Relationship Analyzer objects from the
failed to retrieve group discovery options such as
metadata database into memory. Reason
starting point tables, boundary objects, ignored
unknown.
relationships, and additional relationships for the
specified group discovery configuration. Explanation: Optim Database Relationship Analyzer
failed to create objects in memory.
User response: Redo the action. If the error persists,
contact your Optim Database Relationship Analyzer User response: Redo the action. If the error persists,
administrator and check the Optim Database contact IBM Software Support.
Relationship Analyzer metadata database on Optim
Database Relationship Analyzer server system.
GRDG022 Failed to get Trace Analyzer results from
the metadata database table
GRDG017 Failed to remove starting point table GRD_DYNAMICRELS for group
table list from group discovery options. discovery configuration ID
configuration_id.
Explanation: Optim Database Relationship Analyzer
failed to remove the specified starting point tables from Explanation: Optim Database Relationship Analyzer
discovery options. failed to retrieve Trace Analyzer rezults for the
specified group discovery configuration from Optim
User response: Redo the action. If the error persists,
Database Relationship Analyzer metadata database
contact your Optim Database Relationship Analyzer
table GRD_DYNAMICRELS.
administrator and check the Optim Database

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 135


GRDG023 • GRDG034

User response: Redo the action. If the error persists, User response: Check your system permissions and
contact your Optim Database Relationship Analyzer perform the action again
administrator and check the Optim Database
Relationship Analyzer metadata database on the Optim
GRDG029 Failed to create the file file name in
Database Relationship Analyzer server system.
directory directory name
Explanation: Optim Database Relationship Analyzer
GRDG023 Can not find the dbid id. The database
failed to create a log file with the specified log file
ID is incorrect.
name under the specified directory.
Explanation: The specified database id does not exist
User response: Check your system permissions and
in the Optim Database Relationship Analyzer metadata
perform the action again. If the problem persists,
database table GRD_DATABASEINFO.
contact IBM Software Support.
User response: Reconnect to the database and perform
the action again. If the error persists, contact your
GRDG030 User settings for user user id were
Optim Database Relationship Analyzer administrator
successfuly updated.
and check the Optim Database Relationship Analyzer
metadata database on the Optim Database Relationship Explanation: Optim Database Relationship Analyzer
Analyzer server system. has successfully updated the user settings for the
specified user.
GRDG024 Default connection to database failed. User response: None.
Explanation: The default database connection failed
when using JDBC driver. GRDG031 Failed to update user settings for user
meta user id.
User response: Reconnect to the database and perform
the action again. If the error persists, contact your Explanation: Optim Database Relationship Analyzer
Optim Database Relationship Analyzer administrator failed to update the user setting for the specified user
and check the Optim Database Relationship Analyzer in the Optim Database Relationship Analyzer metadata
metadata database on the Optim Database Relationship database table GRD_USERPROPS.
Analyzer server system.
User response: Redo the action. If the error persists,
contact your Optim Database Relationship Analyzer
GRDG025 Schema name schema name for metadata administrator and check the Optim Database
database table is invalid. Specify the Relationship Analyzer metadata database on the Optim
correct name. Database Relationship Analyzer server system.
Explanation: The specified schema to access the
Optim Database Relationship Analyzer metadata GRDG032 Try-and-Buy license has expired.
database table is incorrect. Purchase the full license.
User response: Contact your Optim Database Explanation: Your try-and buy license has expired.
Relationship Analyzer administrator to get the correct
Optim Database Relationship Analyzer metadata User response: Obtain a new license for Optim
database table schema name and reconnect to the Database Relationship Analyzer.
Optim Database Relationship Analyzer server.
GRDG033 Invalid product license file.
GRDG026 The log file is not accessible. Capture Explanation: The product name in the license file is
all error data. not Optim Database Relationship Analyzer.
Explanation: Optim Database Relationship Analyzer User response: Contact IBM Software Support.
encountered a general error when opening the log file
or writing a message to the log file.
GRDG034 Product license file is not found
User response: Check the log file to see if it is corrupt.
Try to perform the action again. If the error persists, Explanation: The license file does not exist on the
contact IBM Software Support. Optim Database Relationship Analyzer server system.
User response: Check with your Optim Database
GRDG028 Failed to create a directory for directory Relationship Analyzer administrator on the Optim
name. Database Relationship Analyzer server system, and
make sure that the server license file exists.
Explanation: Optim Database Relationship Analyzer
failed to create the specified directory for the log file.

136 IBM Optim Database Relationship Analyzer User’s Guide


GRDG035 • GRDG044

GRDG035 I/O exception reading nodelock file file GRDG040 Can not action. Lock the group discovery
name configuration first.
Explanation: Optim Database Relationship Analyzer Explanation: You need to finalize the group discovery
failed to open the license file. configuration before performing the action. The action
can be running the group discovery process, the Trace
User response: Contact IBM Software Support.
Analyzer, or deleting an object.
User response: Lock the group discovery
GRDG036 Unable to find user settings or default
configuration.
settings in the GRD_USERPROPS table.
Ensure that the default settings exist in
the GRD_USERPROPS table. GRDG041 Can not action. The group discovery
configuration is locked by user user id.
Explanation: The default user settings do not exist in
the Optim Database Relationship Analyzer metadata Explanation: The group discovery configuration is
database table GRD_USERPROPS. The settings are locked by another user. The user ID is provided in the
shown as the first row of the table. message.
User response: Contact your Optim Database User response: You need to perform the action as the
Relationship Analyzer administrator and check the specified user, or you can ask the user to unlock the
Optim Database Relationship Analyzer metadata group discovery configuration. The action can refer to
database on Optim Database Relationship Analyzer running the group discovery process, the Trace
server system. Analyzer process, or deleting an object.

GRDG037 Can not delete JobID job id. Exception GRDG042 Can not edit group discovery
exception message configuration. The group discovery
configuration is in finalize state.
Explanation: Optim Database Relationship Analyzer
failed to delete the specified job from the Optim Explanation: You can no longer edit group discovery
Database Relationship Analyzer metadata database configuration once the group discovery configuration is
table GRD_JOBS with the specified exception in finalize state.
User response: Refer to the message in the exception User response: Work on a different group discovery
to fix this problem. configuration or create a new group discovery
configuration.
GRDG038 Can not lock or unlock the group
discovery configuration. The group GRDG043 Can not edit group discovery
discovery configuration is in the finalize configuration. Lock the group discovery
state. configuration first.
Explanation: The group discovery configuration you Explanation: You cannot edit group discovery
are trying to access is in the finalize state. The group configuration unless you lock the group discovery
discovery configuration cannot be locked or unlocked. configuration first.
User response: Work with a different group discovery User response: Lock the group discovery
configuration. configuration.

GRDG039 Set lock value value to the group GRDG044 Can not finalize the group discovery
discovery configuration failed. configuration. The group discovery
configuration is in pre-finalized state,
Explanation: Optim Database Relationship Analyzer
but is unlocked. Lock the group
failed to lock or unlock the group discovery
discovery configuration first.
configuration, where N stands for unlock and Y stands
for lock. Explanation: You cannot finalize the group discovery
configuration unless you lock the group discovery
User response: Redo the action. If the error persists,
configuration first.
contact your Optim Database Relationship Analyzer
administrator and check the Optim Database User response: Lock the group discovery
Relationship Analyzer metadata database on the Optim configuration.
Database Relationship Analyzer server system.

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 137


GRDG045 • GRDG054

GRDG045 Can not finalize the group discovery GRDG050 Can not lock the group discovery
configuration. The group discovery configuration. The group discovery
configuration is in pre-finalize state and configuration is locked by user id.
locked by user user id.
Explanation: You cannot lock the group discovery
Explanation: You cannot finalize the group discovery configuration because the group discovery
configuration because the group discovery configuration is already locked by another user. The
configuration is locked by another user. The user ID is user ID is provided in the message.
provided in the message.
User response: Ask the specified user to unlock the
User response: You need to finalize the group group discovery configuration.
discovery configuration as the specified user, or you
can ask the user to unlock the group discovery
GRDG051 Can not edit group discovery
configuration.
configuration. The group discovery
configuration is locked by user id.
GRDG046 The group discovery configuration is
Explanation: You cannot edit group discovery
already in finalize state.
configuration because the group discovery
Explanation: Optim Database Relationship Analyzer configuration is locked by another user. The user ID is
can not set the group discovery configuration to provided in the message.
finalize. The group discovery configuration is already
User response: You need to edit group discovery
finalized.
configuration as the specified user, or you can ask the
User response: None. user to unlock the group discovery configuration.

GRDG047 Failed to set group discovery GRDG052 Failed to retrieve predefined groups for
configuration to the finalize state. table schema name.table name.
Explanation: Optim Database Relationship Analyzer Explanation: Optim Database Relationship Analyzer
failed to finalize the group discovery configuration. failed to retrieve the predefined groups for the
specified table.
User response: Redo the action. If the error persists,
contact IBM Software Support. User response: Redo the action. If the error persists,
contact your Optim Database Relationship Analyzer
administrator and check the Optim Database
GRDG048 The locked value for the group
Relationship Analyzer metadata database on the Optim
discovery configuration needs to be
Database Relationship Analyzer server system.
either ″N″ or ″Y″. The value passed to
the stored procedure was value.
GRDG053 Failed to retrieve tables and table
Explanation: A group discovery configuration can be
relationships for predefined group with
locked or unlocked with the values N or Y only. A
group id group id.
different value has been encountered and specified in
the message text. Explanation: Optim Database Relationship Analyzer
failed to retrieve tables and table relationships for the
User response: Contact IBM Software Support.
predefined group with the specified group ID.
User response: Redo the action. If the error persists,
GRDG049 Can not unlock the group discovery
contact your Optim Database Relationship Analyzer
configuration. The group discovery
administrator and check the Optim Database
configuration is locked by user id.
Relationship Analyzer metadata database on the Optim
Explanation: You cannot unlock the group discovery Database Relationship Analyzer server system.
configuration because the group discovery
configuration is locked by another user. The user ID is
GRDG054 Failed to find table for schema schema
provided in the message.
name and table name table name for
User response: You need to unlock the group system wide search.
discovery configuration as the specified user, or you
Explanation: Optim Database Relationship Analyzer
can ask the user to unlock the group discovery
failed to find the specified table for system wide search.
configuration.
User response: Redo the action. If the error persists,
contact your Optim Database Relationship Analyzer
administrator and check the Optim Database
Relationship Analyzer metadata database on the Optim

138 IBM Optim Database Relationship Analyzer User’s Guide


GRDG055 • GRDG064

Database Relationship Analyzer server system. Optim Database Relationship Analyzer administrator
and check the Optim Database Relationship Analyzer
metadata database on the Optim Database Relationship
GRDG055 The table for schema schema name and
Analyzer server system.
table name table name for system wide
search was found successfully.
GRDG060 Failed to retrieve package information.
Explanation: Optim Database Relationship Analyzer
has successfully found the specified table for system Explanation: Optim Database Relationship Analyzer
wide search. failed to retrieve package information.
User response: None. User response: Redo the action. If the error persists,
contact your Optim Database Relationship Analyzer
administrator and check the Optim Database
GRDG056 Failed to find table for schema schema
Relationship Analyzer metadata database on the Optim
name and table name table name for this
Database Relationship Analyzer server system.
database.
Explanation: Optim Database Relationship Analyzer
GRDG061 Failed to add relationships
failed to find the specified table for the user database.
relationships_IDs.
User response: Redo the action. If the error persists,
Explanation: Optim Database Relationship Analyzer
contact your Optim Database Relationship Analyzer
could not add the specified relationships.
administrator and check the Optim Database
Relationship Analyzer metadata database on the Optim User response: Try to add the relationships again. If
Database Relationship Analyzer server system. the error recurs, contact your Optim Database
Relationship Analyzer system administrator to check
the Optim Database Relationship Analyzer metadata
GRDG057 The table for schema schema name and
database.
table name table name for this database
was found successfully.
GRDG062 Failed to add boundary tables to the
Explanation: Optim Database Relationship Analyzer
boundary list list_name.
has successfully found the specified table for the user
database. Explanation: Optim Database Relationship Analyzer
could not add the specified boundary tables.
User response: None.
User response: Verify that the objects exist. Try to add
the objects again. If the error recurs, contact your
GRDG058 Exception occurred during dumping of
Optim Database Relationship Analyzer system
the log file.
administrator to check the Optim Database
Explanation: Some of the reasons for the exception Relationship Analyzer metadata database.
can be:
v The log file could not be accessed because the log file GRDG063 Failed to add relationships to the ignore
is being opened by the user. list 0.
v The log file could not be created because of access
Explanation: Optim Database Relationship Analyzer
permissions.
could not add the specified ignored relationships.
For a z/OS Optim Database Relationship Analyzer
User response: Try to add the relationships again. If
server system, the log information cannot be written to
the error recurs, contact your Optim Database
a log file, if a user is viewing or browsing the log
Relationship Analyzer system administrator to check
dataset or if the user does not have the permissions to
the Optim Database Relationship Analyzer metadata
create or append to the log dataset.
database.
User response: Check access permissions or close the
data set on the z/OS system and try again.
GRDG064 Failed to add the user-defined
relationships list.
GRDG059 Failed to get row from GRD_DBINFO2
Explanation: Optim Database Relationship Analyzer
table for dbid database ID.
could not add the specified user-defined relationships
Explanation: Optim Database Relationship Analyzer list.
failed to retrieve row information from the metadata
User response: Try to add the user-defined
database.
relationships list again. If the error recurs, contact your
User response: Check your database connection and Optim Database Relationship Analyzer system
redo the action. If the error persists, contact your administrator to check the Optim Database

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 139


GRDG065 • GRDG075

Relationship Analyzer metadata database.


GRDG070 Could not refresh the group. Reason
unknown.
GRDG065 Failed to delete user-defined
Explanation: Optim Database Relationship Analyzer
relationships.
could not refresh the group node in the navigation tree
Explanation: Optim Database Relationship Analyzer of the Discovery Explorer view.
could not delete the specified user-defined
User response: Examine the error message and code
relationships.
for the possible reason for the error. If the error
User response: Verify that the relationships exist. persists, contact IBM Software Support.
Delete the user-defined relationships again. If the error
recurs, contact your Optim Database Relationship
GRDG071 Could not compare relationships.
Analyzer system administrator to check the Optim
Database Relationship Analyzer metadata database. Explanation: Optim Database Relationship Analyzer
could not compare the relationships during the version
compare process.
GRDG066 Failed to get user-defined relationship
key columns list. User response: Examine the error message and code
for the possible reason for the error. If the error
Explanation: Optim Database Relationship Analyzer
persists, contact IBM Software Support.
could not retrieve the user-defined relationship key
columns list.
GRDG072 Failed to remove options option_types.
User response: Verify that the list exists. perform the
action again If the error recurs, contact your Optim Explanation: Optim Database Relationship Analyzer
Database Relationship Analyzer system administrator could not remove the specified options.
to check the Optim Database Relationship Analyzer
User response: Check your system status and perform
metadata database.
the action again. If the problem persists, contact IBM
Software Support.
GRDG067 Failed to get user-defined relationships
list.
GRDG073 Failed to remove user-defined
Explanation: Optim Database Relationship Analyzer relationships.
could not retrieve the user-defined relationships list.
Explanation: Optim Database Relationship Analyzer
User response: Verify that the list exists. perform the could not remove the user-defined relationships.
action again If the error recurs, contact your Optim
User response: Verify that the relationships exist.
Database Relationship Analyzer system administrator
Check your system status and perform the action again.
to check the Optim Database Relationship Analyzer
If the problem persists, contact IBM Software Support.
metadata database.

GRDG074 Failed to update group relationship


GRDG068 Failed to manage tree nodes.
properties.
Explanation: Optim Database Relationship Analyzer
Explanation: Optim Database Relationship Analyzer
could not update tree nodes.
could not update the group relationship properties.
User response: Check your system status and perform
User response: Refresh the navigation tree to make
the action again. If the problem persists, contact IBM
sure that the group exists and try again. If the problem
Software Support.
persists, contact IBM Software Support.

GRDG069 Failed to re-add user-defined


GRDG075 The boundary table list is empty.
relationship relationships.
Explanation: The Optim Database Relationship
Explanation: Optim Database Relationship Analyzer
Analyzer client failed to generate a correctly formatted
could not re-add the specified user-defined relationship.
list.
User response: Verify that the relationships still exist.
User response: Contact IBM Software Support.
Try to add the user-defined relationship again. If the
error recurs, contact your Optim Database Relationship
Analyzer system administrator to check the Optim
Database Relationship Analyzer metadata database.

140 IBM Optim Database Relationship Analyzer User’s Guide


GRDG076 • GRDG095

check your connection and system status. If the table


GRDG076 The boundary object list is not
does not exist, specify a different table.
formatted correctly.
Explanation: The Optim Database Relationship
GRDG087 Target table schema_name.table_name of
Analyzer client generated a list that contains a syntax
the relationship no longer exists in the
error.
user database catalog.
User response: Contact IBM Software Support.
Explanation: The Optim Database Relationship
Analyzer client cannot find the specified table in the
GRDG077 Failed to add a boundary object. The database catalog. The table might have been deleted or
object type for this object is not renamed.
supported.
User response: If the table exists in the database,
Explanation: An attempt was made to add check your connection and system status. If the table
unsupported objects to the list of boundary tables. does not exist, specify a different table.
Tables are the only supported object type.
User response: Add a supported boundary table. GRDG088 Failed to remove additional
relationships. The remove list is not
formatted correctly.
GRDG078 The ignored relationships list is empty.
Explanation: The Optim Database Relationship
Explanation: The Optim Database Relationship
Analyzer client generated a list that contains a syntax
Analyzer client failed to generate a correctly formatted
error.
list.
User response: Contact IBM Software Support.
User response: Contact IBM Software Support.

GRDG089 The options remove list is not formatted


GRDG079 The ignored relationships list is not
correctly.
formatted correctly.
Explanation: The Optim Database Relationship
Explanation: The Optim Database Relationship
Analyzer client generated a list that contains a syntax
Analyzer client generated a list that contains a syntax
error.
error.
User response: Contact IBM Software Support.
User response: Contact IBM Software Support.

GRDG090 The manage tree nodes list is empty.


GRDG080 The user-defined relationships list is
empty. Explanation: The Optim Database Relationship
Analyzer client failed to generate a correctly formatted
Explanation: The Optim Database Relationship
list.
Analyzer client failed to generate a correctly formatted
list for the user-defined RI relationships. User response: Contact IBM Software Support.
User response: Contact IBM Software Support.
GRDG093 Set for ID set_ID was not found.
GRDG083 The user-defined relationships Remove Explanation: The Optim Database Relationship
list is not formatted correctly. Analyzer client could not find a set that corresponds to
the specified set ID.
Explanation: The Optim Database Relationship
Analyzer client generated a list that contains a syntax User response: Refresh the navigation tree and insure
error. that set has not been deleted and try again. If the
problem persists, contact IBM Software Support.
User response: Contact IBM Software Support.

GRDG095 The name already exists. Duplicate


GRDG086 Source table schema_name.table_name of
names are not allowed.
the relationship no longer exists in the
user database catalog. Explanation: The name already exists.
Explanation: The Optim Database Relationship User response: Specify another name.
Analyzer client cannot find the specified table in the
database catalog. The table might have been deleted or
renamed.
User response: If the table exists in the database,

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 141


GRDG096 • GRDG104

v * = All relationships
GRDG096 The user-defined relationship Read List
is not formatted correctly. User response: Select a table or a package for the
source and the target objects of this relationship.
Explanation: The Optim Database Relationship
Analyzer client generated a user-defined relationships
list that contains a syntax error. GRDG101 For the relationship type:
relationship_type, the source object must
User response: Contact IBM Software Support.
be a package.
Explanation: An invalid source or target object for this
GRDG097 Table schema_name.table_name does not
relationship type was selected. The source objects must
exist in the user database catalog.
be a package for the following relationship types:
Explanation: The Optim Database Relationship v T = Trigger
Analyzer client cannot find the specified table in the
v P = Package
database catalog. The table might have been deleted or
renamed. v * = All relationships

User response: If the table exists in the database, User response: Select a package for the source object
check your connection and system status. If the table of this relationship.
does not exist, specify a different table.
GRDG102 For the relationship type:
GRDG098 For the relationship type: relationship_type, The target object must
relationship_type, the source and target be a package or a table.
object must be tables. Explanation: An invalid source or target object for this
Explanation: An invalid source or target object for this relationship type was selected. The target objects must
relationship type was selected. The source and the be a package or a table for the following relationship
target objects must be tables for the following types:
relationship types: v T = Trigger
v R = RI v P = Package
v L = LOBS v * = All relationships
v H = Table hierarchy User response: Select a package or a table for the
v C = Column target object of this relationship.
v V = Version specific
User response: Select tables for the source and the GRDG103 For the relationship type:
target objects of this relationship. relationship_type, the source object must
be a table.

GRDG099 The relationship type relationship_type Explanation: An invalid source or target object for this
has an invalid sub-relationship type relationship type was selected. The source object must
subrelationship_type. It should be SMRI or be a table for the following relationship types:
user-defined relationship. v R = RI
Explanation: The Optim Database Relationship v L = LOBS
Analyzer client could not assign a valid v H = Table hierarchy
sub-relationship type to the relationship. The R v C = Column
relationship type (RI), must have either the S (SMRI) or
the U (user-defined relationship) subtype. v V = Version specific

User response: Contact IBM Software Support. User response: Select a table for the source object of
this relationship.

GRDG100 For the relationship type:


relationship_type, the source and target GRDG104 For the relationship type:
object must be a table or package. relationship_type, the target object must
be a table.
Explanation: An invalid source or target object for this
relationship type was selected. The source and the Explanation: An invalid source or target object for this
target objects must be either a table or a package for relationship type was selected. The target object must
the following relationship types: be a table for the following relationship types:

v T = Trigger v R = RI

v P = Package v L = LOBS

142 IBM Optim Database Relationship Analyzer User’s Guide


GRDG105 • GRDG115

v H = Table hierarchy
GRDG110 The Manage Tree Nodes sequence is
v C = Column improperly formatted.
v V = Version specific
Explanation: The Optim Database Relationship
User response: Select a table for the target object of Analyzer client generated a list that contains a syntax
this relationship. error.
User response: Contact IBM Software Support.
GRDG105 The properties list is empty.
Explanation: The Optim Database Relationship GRDG111 Failed to retrieve predefined groups for
Analyzer client failed to generate a correctly formatted schema schema_name
list.
Explanation: The Optim Database Relationship
User response: Contact IBM Software Support. Analyzer client could not retrieve the predefined group
information from the specified schema.

GRDG106 Failed to retrieve package information User response: Verify the name of the schema, and
from the system catalog. make sure that your network connection is established
properly.
Explanation: The Optim Database Relationship
Analyzer client could not access package information in
the catalog. GRDG112 The user ID user_id does not exist in the
metadata database for DBID id. The user
User response: Verify that the package that you are ID is case-sensitive.
trying to access exists in the system catalog. If it does,
check your connection and perform the action again. If Explanation: The Optim Database Relationship
the problem persists, contact IBM Software Support. Analyzer client could not find the specified user ID.
User response: Make sure that you specify the user ID
GRDG107 The package schema_name.package_name that you use when you login to the Optim Database
does not exist in the user database Relationship Analyzer client. Verify that the ID exists in
catalog. the Optim Database Relationship Analyzer metadata
database.
Explanation: The Optim Database Relationship
Analyzer client could not access the specified package
in the catalog. GRDG113 Could not retrieve table column
information with schema name schema
User response: Verify that the package that you are and table name table.
trying to access exists in the system catalog. If it does,
check your connection and perform the action again. If Explanation: Optim Database Relationship Analyzer
the problem persists, contact IBM Software Support. could not retrieve column information such as column
name and data type for the selected column during the
group discovery process.
GRDG108 Can not activity_type. Another process is
running on the same group discovery User response: Check your connection and try again.
configuration. Try again later. If the error persists, contact IBM Software Support.

Explanation: The Optim Database Relationship


Analyzer client cannot perform the specified action GRDG114 Invalid user database platform type
because another process is running on the same group encountered.
discovery configuration.
Explanation: Optim Database Relationship Analyzer
User response: Wait until the process finishes and has encountered an invalid platform type. Only DB2
perform the action again. If the problem persists, for z/OS, DB2 for Linux, UNIX, and Windows and
contact IBM Software Support. Oracle databases are supported.
User response: Check your connection and try again.
GRDG109 The name must consist of at least one If the error persists, contact IBM Software Support.
alphanumeric character. Whitespace is
not allowed.
GRDG115 The user-defined relationship and
Explanation: An empty or an invalid name was connection key already exists. Define a
specified. relationship with unique connection key
values or verify that the relationship has
User response: Specify a valid name. not been excluded.
Explanation: Duplicate user-defined relationships and

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 143


GRDG116 • GRDG129

connection key combinations are not allowed.


GRDG122 The include relationship list is empty.
User response: Make sure that the user-defined
Explanation: The specified list of relationships that
relationship has not been excluded. Remember that you
Optim Database Relationship Analyzer has sent to the
can define user-defined relationships and then exclude
server does not contain any information.
them. The excluded entries are not visible in the listing
unless the Show excluded relationships check box is User response: Check your connection and try again.
selected. If the error persists, contact IBM Software Support.

GRDG116 Could not exclude additional GRDG123 The additional relationships were
relationship. exported successfully .
Explanation: You can exclude additional relationships Explanation: This information message indicates that
at the group discovery configuration level. If you do the specified process has completed successfully.
not want to have a given additional relationship
User response: None.
considered for the group discovery run you can
exclude it. This error is generated when Optim
Database Relationship Analyzer cannot exclude an GRDG124 Could not export the additional
additional relationship. relationships.
User response: Check your connection and try again. Explanation: Optim Database Relationship Analyzer
If the error persists, contact IBM Software Support. could not export the specified additional relationship to
the user-defined relationships list.
GRDG118 The excluded relationship list is empty. User response: Check your connection and try again.
If the error persists, contact IBM Software Support.
Explanation: The specified list of relationships that
Optim Database Relationship Analyzer has sent to the
server does not contain any information. GRDG127 Could not add additional relationship
between tables table1 and table2. This
User response: Check your connection and try again.
relationship already exists.
If the error persists, contact IBM Software Support.
Explanation: The column mapping combination for
additional relationships must be unique.
GRDG119 Could not include an additional
relationship. User response: Make sure that the user-defined
relationship has not been excluded. Remember that you
Explanation: Optim Database Relationship Analyzer
can define user-defined relationships and then exclude
could not include the additional relationship that has
them. The excluded entries are not visible in the listing
previously been excluded from the group discovery
unless the Show excluded relationships check box is
configuration.
selected.
User response: Check your connection and try again.
If the error persists, contact IBM Software Support.
GRDG128 This option is not for additional
relationships, or the parent or the child
GRDG120 The additional relationships were tables are wrong.
excluded successfully .
Explanation: A mismatch occurred between the type
Explanation: This information message indicates that of the relationship and the option.
the specified process has completed successfully.
User response: Check your connection and try again.
User response: None. If the error persists, contact IBM Software Support.

GRDG121 The additional relationships were GRDG129 Could not add the user-defined
included successfully . relationship between tables table1 and
table2.
Explanation: This information message indicates that
the specified process has completed successfully. Explanation: The Optim Database Relationship
Analyzer server could not insert the user-defined
User response: None.
relationship and connection key information into the
Optim Database Relationship Analyzer metadata
database.
User response: If there is an SQL error associated with
this message, resolve the SQL error and try again. If the

144 IBM Optim Database Relationship Analyzer User’s Guide


GRDG130 • GRDG208

error persists, contact IBM Software Support. Analyzer user interface should not allow to add an
additional relationship without column mapping.
Contact IBM Software Support.
GRDG130 A user-defined relationship with id
id_number was not found.
GRDG136 Could not retrieve database ID for
Explanation: Optim Database Relationship Analyzer
database database_name on system
could not find the specified user-defined relationship.
system_name with port number
This error can happen if the relationship has already
port_number.
been deleted by another user.
Explanation: Optim Database Relationship Analyzer
User response: Refresh the navigation tree in the
could not find the database ID for the specified
Discovery Explorer view and try again. If the
database in the Optim Database Relationship Analyzer
relationship is still visible, contact IBM Software
metadata database.
Support.
User response: Verify that the database exists. Check
your connection and try again. If the error persists,
GRDG131 The user-defined relationship was
contact IBM Software Support.
successfully imported.
Explanation: This information message indicates that
GRDG137 Could not retrieve group with group ID
the specified process has completed successfully.
group_id. The group does not exist.
User response: None.
Explanation: Optim Database Relationship Analyzer
could not find the specified group. This error can
GRDG132 The user-defined relationship was not happen if the group has already been deleted or
found. modified by another user.

Explanation: Optim Database Relationship Analyzer User response: Refresh the navigation tree in the
could not find the specified user-defined relationship. Discovery Explorer view and try again. If the problem
This error can happen if the relationship has already persists, contact IBM Software Support.
been deleted by another user.
User response: Refresh the navigation tree in the GRDG206 Oracle database version version_number
Discovery Explorer view and try again. is not supported.
Explanation: The specified user database version is
GRDG133 The export relationship list is empty. not supported. Refer to the list of Optim Database
Relationship Analyzer software requirements for the list
Explanation: The specified list of relationships that of supported databases.
Optim Database Relationship Analyzer has sent to the
server does not contain any information. User response: Use only the supported user
databases.
User response: Check your connection and try again.
If the error persists, contact IBM Software Support.
GRDG207 DB2 database version version_number is
not supported.
GRDG134 The group discovery configuration ID
id_number is not created or has been Explanation: The specified user database version is
deleted. not supported. Refer to the list of Optim Database
Relationship Analyzer software requirements for the list
Explanation: Optim Database Relationship Analyzer of supported databases.
could not find the specified group discovery
configuration. This error can happen if the User response: Use only the supported user
configuration has already been deleted or modified by databases.
another user.
User response: Refresh the navigation tree in the GRDG208 Database type type is not supported.
Discovery Explorer view and try again.
Explanation: The specified database type is not
supported. See the software and hardware requirements
GRDG135 The additional relationship does not sections for the list of supported database types.
have any column mapping information.
User response: Use a supported database type.
Explanation: You must specify column mapping when
defining an additional relationship.
User response: The Optim Database Relationship

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 145


GRDG209 • GRDUI001

conflict with the system-specified naming convention.


GRDG209 DB2 on z/OS is not supported from an
LUW metadata server.
GRDG214 User_id does not have the privilege to
Explanation: An attempt was made to access DB2 on
perform operation operation_type on
z/OS from a Optim Database Relationship Analyzer
object object_name. SQLCODE=-551
server for Linux, UNIX, and Windows.
SQLSTATE=42501
User response: Install a Optim Database Relationship
Explanation: The specified user does not have the
Analyzer server for z/OS.
appropriate access rights to perform the specified
action. The specified user ID must have the appropriate
GRDG210 Unable to load DB2 node directory: permissions to access the tables that Optim Database
node_directory_name Relationship Analyzer accesses.
Explanation: The Optim Database Relationship User response: Check the permissions on the user
Analyzer client could not access the specified DB2 node database. You need to grant the specified Optim
directory. Database Relationship Analyzer user ID the appropriate
access rights for the specified object.
User response: Verify that the directory you are trying
to access exists. If it does, check your connection and
perform the action again. If the problem persists, GRDG215 User user_id does not have the privilege
contact IBM Software Support. to perform selects on object_name. Please
verify that the user has the privileges to
perform selects on catalog tables and
GRDG211 Unable to retrieve database directory:
views.
database_directory_name
Explanation: The specified user does not have the
Explanation: The Optim Database Relationship
appropriate select rights to perform the specified
Analyzer client could not access the specified database
action. The specified user ID must have the appropriate
directory.
permissions to access the tables that Optim Database
User response: Verify that the directory you are trying Relationship Analyzer accesses.
to access exists. If it does, check your connection and
User response: Check the permissions on the user
perform the action again. If the problem persists,
database. You need to grant the specified Optim
contact IBM Software Support.
Database Relationship Analyzer user ID the appropriate
access rights on the specified object.
GRDG212 Unsupported DB2 client version.
Databases cataloged to this client will
GRDG216 The group discovery configuration
not be retrieved.
configuration_name has become unusable
Explanation: The version of the DB2 client is not due to an error. To continue, copy this
supported. configuration to a new configuration.

User response: Refer to the Optim Database Explanation: The specified group discovery
Relationship Analyzer software requirements for a list configuration has become unusable due to an error.
of supported DB2 clients.
User response: You must copy the group discovery
configuration into a new group discovery configuration
GRDG213 The user defined version name to continue working with it. Contact IBM Software
version_name conflicts with the system Support to restore the original configuration.
default naming convention. Please
choose another version name.
GRDUI000 Unexpected exception: exception
Explanation: The default version names are created
Explanation: Optim Database Relationship Analyzer
according to the following template: DefaultVersionXX,
has returned an unexpected exception.
were XX is the number of the version.
User response: Examine the Optim Database
This error is issued if any of the versions is manually
Relationship Analyzer log files for more information
renamed according to the template. The error prevents
and contact IBM Software Support.
a collision between the manual name and the version
names automatically generated by the group discovery
process. For example, if you try to rename GRDUI001 The Optim Database Relationship
DefaultVersion_1 to DefaultVersion_2, you will receive Analyzer metadata tables could not be
the error. found on this database.
User response: Specify a version name that does not Explanation: The Optim Database Relationship

146 IBM Optim Database Relationship Analyzer User’s Guide


GRDUI002 • GRDUI010

Analyzer metadata tables are not located on the Explanation: The version and release level for the
database that you have selected. Optim Database Relationship Analyzer client and the
Optim Database Relationship Analyzer server do not
User response: Make sure that the Optim Database
match.
Relationship Analyzer server is properly installed on
the selected database. User response: Make sure that the Optim Database
Relationship Analyzer client and the Optim Database
Relationship Analyzer server are at the same level.
GRDUI002 The following tables are already
selected as starting point tables: table1,
table2 .... A table cannot be both a GRDUI007 The group discovery configuration
starting point and a boundary table. ’configuration_name’ contains unsaved
changes. Save the changes before
Explanation: The specified table or tables are already
running the group discovery process.
selected as starting point tables for this group discovery
configuration. You cannot specify the same table both Explanation: The group discovery configuration
as a starting point table and as a boundary table. contains changes that have not been saved.
User response: If you want to add these tables as User response: Save the changes before running the
boundary tables, you need to remove them from the group discovery process, or to discard the changes,
list of starting point tables. close the Group Discovery Configuration Editor
without saving.
GRDUI003 The following tables are already
selected as boundary tables: table1, table2 GRDUI008 The group discovery configuration is
.... A table cannot be both a starting missing starting point tables. At least
point and a boundary table. one starting point table must be
specified.
Explanation: The specified table or tables are already
selected as boundary tables for this group discovery Explanation: You have not specified any starting point
configuration. You cannot specify the same table both tables for this configuration.
as a starting point table and as a boundary table.
User response: Specify at least one starting point table
User response: If you want to add these tables as or select the catalog-wide group discovery option.
starting point tables, you need to remove them from
the list of boundary tables.
GRDUI009 At least one relationship type must be
selected for the Catalog source.
GRDUI004 This relationship is already defined as
Explanation: You have selected Catalog as the
an ignored relationship.
relationship source, but you have not selected any
Explanation: You cannot add an additional relationship types.
relationship if it is already defined as an ignored
User response: Select one or more of the following
relationship.
relationship types: System Referential Integrity,
User response: You can either specify a different Package, or Trigger.
relationship or, to add the selected relationship, remove
it from the list of ignored relationships.
GRDUI010 At least one relationship source or
additional relationship must be
GRDUI005 This relationship is already defined as specified.
an additional relationship.
Explanation: The group discovery configuration does
Explanation: You cannot add an ignored relationship not have a relationship source or any additional
if it is already defined as an additional relationship. relationships specified. The group discovery process
needs a relationship source to discover relationships.
User response: You can either specify a different
relationship or, to add the selected relationship, remove User response: Specify a relationship source in the Set
it from the list of additional relationships. the Scope tab of the Group Discovery Configuration
Editor or add an additional relationship in the Expand
the Scope tab of the Group Discovery Configuration
GRDUI006 The Optim Database Relationship
Editor.
Analyzer client and the Optim Database
Relationship Analyzer server are not at
the same version and release level.
Client version: version_number; server
version: version_number.

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 147


GRDUI011 • GRDUI118

GRDUI011 One or more relationships were not GRDUI016 An unexpected error or exception has
added because of conflicting occurred. Check the log files for more
relationships in the list of ignored information.
relationships.
Explanation: Optim Database Relationship Analyzer
Explanation: One or more of the relationships that has returned an unexpected error or exception.
you are trying to import are already defined as ignored
User response: Examine the Optim Database
relationships. You cannot add an additional relationship
Relationship Analyzer log files for more information
if it is already defined as an ignored relationship.
and contact IBM Software Support.
User response: For the relationships that were not
imported, if you want to import the conflicting
GRDUI017 Unable to retrieve the version
relationships, remove these relationships from the list
information for Optim Database
of ignored relationships first.
Relationship Analyzer on this database.
Explanation: The Optim Database Relationship
GRDUI012 One or more relationships were not
Analyzer server installation might not be correct or
added because they do not have any
complete.
column mapping.
User response: Check your connection and make sure
Explanation: The relationship that you are trying to
that the Optim Database Relationship Analyzer server
import does not have any column mapping associated
installation is complete and successful. For z/OS
with it.
servers, make sure that the stored procedures are
User response: Check the relationship in the list of created properly. See the installation section of the
user-defined relationships. Try deleting and adding it Optim Database Relationship Analyzer users’s guide
again. If the error persists, contact IBM Software for more information.
Support.
GRDUI116 The selected group discovery
GRDUI013 Optim Database Relationship Analyzer configuration cannot be unlocked
cannot find any tables that match your because it contains unsaved changes.
search criteria. Remember that the
Explanation: The group discovery configuration
search is case-sensitive.
contains changes that must be saved.
Explanation: Optim Database Relationship Analyzer
User response: Save the changes before unlocking the
cannot find any tables that match your search criteria.
configuration, or to discard the changes, close the
User response: Verify your search criteria. Group Discovery Configuration Editor without saving.

GRDUI014 An exception occurred while searching GRDUI117 One or more relationships were not
for tables; no results have been added because of conflicting
returned. relationships in the additional
relationship list.
Explanation: An unexpected exception occurred while
Optim Database Relationship Analyzer was processing Explanation: One or more of the relationships that
your search request. you are trying to import are already defined as
additional relationships. You cannot add an ignored
User response: Try searching for the tables again. If
relationship if it is already defined as an additional
the error persists, contact IBM Software Support.
relationship.
User response: For the relationships that were not
GRDUI015 The object that you have selected no
imported, if you want to import the conflicting
longer exists on the Optim Database
relationships, remove these relationships from the list
Relationship Analyzer metadata
of additional relationships first.
database.
Explanation: The object that you are trying to refresh
GRDUI118 This table has already been defined as a
might have been deleted from the Optim Database
starting point table. A table cannot be
Relationship Analyzer metadata database. This error
both a starting point table and a
can occur if multiple users are working with the same
boundary table.
object at the same time.
Explanation: The selected table is already a starting
User response: Right-click the user database in the
point table for this group discovery configuration. You
Discovery Explorer view and select Refresh to refresh
cannot specify the same table both as a starting point
the navigation tree.
table and as a boundary table.

148 IBM Optim Database Relationship Analyzer User’s Guide


GRDUI119 • GRDSL007

User response: If you want to add this table as a


GRDUI123 Unable to connect to the Optim
boundary table, you need to remove it from the list of
Database Relationship Analyzer
starting point tables.
metadata database. Make sure that the
Optim Database Relationship Analyzer
GRDUI119 The connection to the Optim Database metadata database is still active and try
Relationship Analyzer metadata again.
database has been lost. Reconnect the
Explanation: The connection to the Optim Database
database connection for this metadata
Relationship Analyzer metadata database has been lost.
database and try again.
User response: Check your connection and try again.
Explanation: The database connection to the Optim
Database Relationship Analyzer metadata database has
been disconnected. GRDUI124 The selected group discovery
configuration cannot be finalized
User response: Reconnect the database connection.
because it contains unsaved changes.
Explanation: The group discovery configuration
GRDUI120 This database connection could not be
contains unsaved changes.
closed. Close all the open Group
Discovery Configuration Editors and try User response: Save changes before finalizing the
again. configuration. To discard the changes, close the Group
Discovery Configuration Editor without saving.
Explanation: The database connection cannot be
closed when there are Group Discovery Configuration
Editors open. GRDSL002 The DB2 statement event monitor table
table name does not exist.
User response: Close all the open Group Discovery
Configuration Editors and try again. Explanation: The Trace Analyzer process cannot find
the specified DB2 statement event monitor table.
GRDUI121 Unable to locate the new group User response: Verify that the event monitor table
discovery configuration to configure its name is correct and run the Trace Analyzer process
options. again.
Explanation: Optim Database Relationship Analyzer is
not able to locate the new group discovery GRDSL003 An exception occurred while trying to
configuration. insert into table table name. Exception :
exception name.
User response: Contact IBM Software Support.
Explanation: The Trace Analyzer process could not
access the specified table.
GRDUI122 You have not connected to any Optim
Database Relationship Analyzer User response: Check your database connection and
metadata databases. Make sure that you refer to the exception message for problem correction
configure and connect an Optim instructions.
Database Relationship Analyzer
metadata database in the Data Source
GRDSL005 An exception occurred while trying to
Explorer view.
delete from table table name. Exception :
Explanation: You must connect to an Optim Database exception name.
Relationship Analyzer metadata database before you
Explanation: The Trace Analyzer process could not
can select it.
access the specified table.
User response: Make sure that the Optim Database
User response: Check your database connection and
Relationship Analyzer metadata database is configured
refer to the exception message for problem correction
and connected in the Data Source Explorer view. See
instructions.
“Creating a database connection to an Optim Database
Relationship Analyzer metadata database” on page 45
for more information. GRDSL007 Trace Analyzer for job name failed.
Explanation: The Trace Analyzer process for the
specified job failed for an unknown reason.
User response: Check your database connection and
try running the Trace Analyzer process again.

Chapter 5. Troubleshooting Optim Database Relationship Analyzer problems 149


GRDSL008 • GRDSZ001

GRDSL008 Trace Analyzer for job name ran


successfully.
Explanation: The Trace Analyzer process for the
specified job ran successfully.
User response: None.

GRDSO001 Oracle audit view view_name for audit


trace does not exist.
Explanation: The specified audit view for Oracle audit
trace could not be found.
User response: Check the audit view name and make
sure that it exists. If the error recurs, contact your
Optim Database Relationship Analyzer system
administrator to check the Optim Database
Relationship Analyzer metadata database on the Optim
Database Relationship Analyzer server system.

GRDSZ001 DB2 z/OS IFCID record table name for


Optim Database Relationship Analyzer
does not exist.
Explanation: Optim Database Relationship Analyzer
could not find the specified IFCID record table name.
User response: Check your database connection and
the IFCID record table name. Run the Trace Analyzer
process again.

150 IBM Optim Database Relationship Analyzer User’s Guide


Glossary
A
| Additional relationships
| Relationships that you specify for a particular group discovery
| configuration. These relationships will be discovered during the group
| discovery process for this configuration regardless of the relationship
| sources defined in the group discovery options.
| Application ID
| An ID assigned in trace when an object is accessed by an application.
| Objects that have been accessed by the same application will have the
| same application ID.
| Application level granularity
| An option that defines how the group discovery process analyzes the Trace
| Analyzer results. With the application level granularity option, the group
| discovery process groups tables found within the trace based on their
| application IDs. See “Choosing between application level and unit of work
| level granularity for Trace Analyzer results” on page 59.

B
boundary tables
You can specify a table as a boundary table to restrict the scope of the
group discovery process in the group discovery configuration options. The
group discovery process can still include the boundary table in the group
discovery results; however, it will not consider it as a source for drawing
additional tables that are related to that table into that group.

C
catalog-wide discovery
A run of the group discovery process that includes all of the tables in the
database catalog.
client A graphical user interface that interacts with the server.

F
finalized group discovery configuration
When a group discovery configuration is in the finalized state, the group
discovery configuration is final and its options cannot be updated.
Multiple users can run finalized group discovery configurations.

G
| granularity
| The way that the group discovery process analyzes and groups the Trace
| Analyzer results. The Trace Analyzer granularity can be either application
| level or unit of work level. See “Choosing between application level and
| unit of work level granularity for Trace Analyzer results” on page 59.
group A collection of related tables.

© Copyright IBM Corp. 2008, 2009 151


group discovery configuration
A configuration with settings that guide the group discovery process. You
can run the group discovery process for each configuration to create a
version with groups of related tables.
group discovery process
A process that runs on the Optim Database Relationship Analyzer server to
determine the relationships between tables. The group discovery process
then groups those related tables based on the relationships that it finds.

I
ignored relationship
A relationship that the group discovery process will not use to discover
related tables. For example, if a relationship between tables A and B exists,
then table B will be brought into the group that contains A, unless the
relationship between them is specified as ignored.

M
metadata database
A collection of program configuration data, database connections, user
actions, trace information, and other information that is used by Optim
Database Relationship Analyzer. The Optim Database Relationship
Analyzer metadata database for Linux, UNIX, and Windows is an Apache
Derby database, and it is serviced by the Derby Network Service. The
Optim Database Relationship Analyzer metadata database for z/OS is a
DB2 database. The metadata database is configured during the server
installation process, and it resides wherever you decide to install the
server.

N
user-defined relationships
Referential integrity relationships that are not enforced by database system
constraints, but rather defined by the users for each user database. You can
specify these relationships for a database so that other users can import
them to their group discovery configuration options as additional
relationships.

P
pre-finalized group discovery configurations
When a group discovery configuration is in pre-finalized state, the group
discovery configuration is in the test mode. At this stage, you can update
its options and test different group discovery options. A group discovery
configuration in pre-finalized state allows only one user to test it, using
explicit locking method to enforce this requirement.

S
server The components that run on the server.
set A collection of one or more group discovery configurations.
starting point tables
Tables that the user specifies in the group discovery configuration options
to set the scope of the group discovery process. For example, specifying
tables A and B as starting point tables will direct the group discovery
process to find tables that are related only to tables A and B. The group

152 IBM Optim Database Relationship Analyzer User’s Guide


discovery process will return a maximum of two groups: one group that
contains all of the tables that are related to table A, and another group that
contains all of the tables that are related to table B. However, if the group
discovery process finds that any of the tables in the table A group are
related to any of the tables in the table B group, then group discovery
process will draw those groups together and return only one group.
System Referential Integrity (RI)
Referential constraints that have been specified in the database and found
in the catalog to represent referential integrity relationships that are
enforced by the database. When you specify System RI as a relationship
source in the group discovery configuration options, the group discovery
results include relationships between the tables that have column-based
constraints defined in the catalog.

T
Trace Analyzer
A program that accesses trace information and finds tables that are
referenced within it. These tables are then used as input to group discovery
process.
Trace Analyzer results
The results of running the Trace Analyzer process. Related tables that were
accessed within the same application for a given time range as determined
through an analysis of the SQL trace.
| trace ID
| An internally generated ID assigned by the Trace Analyzer to the tables
| discovered in trace.

U
| unit of work
| A recoverable sequence of operations within an application process. Refer
| to your user database documentation for more information.
| unit of work level granularity
| An option that defines how the group discovery process analyzes the Trace
| Analyzer results. With the unit of work level granularity option, the group
| discovery process groups tables found within the trace based on their units
| of work. See “Choosing between application level and unit of work level
| granularity for Trace Analyzer results” on page 59.
| user database
| A database that contains user objects that Optim Database Relationship
| Analyzer can analyze to discover relationships. Optim Database
| Relationship Analyzer metadata database stores connections to user
| databases.

V
version
The result of running the group discovery process on a group discovery
configuration. Versions contain groups.

Glossary 153
154 IBM Optim Database Relationship Analyzer User’s Guide
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user’s responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106-0032, Japan

The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.

This information could include technical inaccuracies or typographical errors.


Changes are periodically made to the information herein; these changes will be
incorporated in new editions of the publication. IBM may make improvements
and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.

Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.

© Copyright IBM Corp. 2008, 2009 155


Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
J46A/G4
555 Bailey Avenue
San Jose, CA 95141-1003
U.S.A.

Such information may be available, subject to appropriate terms and conditions,


including in some cases, payment of a fee.

The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.

Any performance data contained herein was determined in a controlled


environment. Therefore, the results obtained in other operating environments may
vary significantly. Some measurements may have been made on development-level
systems and there is no guarantee that these measurements will be the same on
generally available systems. Furthermore, some measurements may have been
estimated through extrapolation. Actual results may vary. Users of this document
should verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers of


those products, their published announcements or other publicly available sources.
IBM has not tested those products and cannot confirm the accuracy of
performance, compatibility or any other claims related to non-IBM products.
Questions on the capabilities of non-IBM products should be addressed to the
suppliers of those products.

All statements regarding IBM’s future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.

This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, which


illustrate programming techniques on various operating platforms. You may copy,
modify, and distribute these sample programs in any form without payment to
IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating
platform for which the sample programs are written. These examples have not
been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or
imply reliability, serviceability, or function of these programs. You may copy,
modify, and distribute these sample programs in any form without payment to
IBM for the purposes of developing, using, marketing, or distributing application
programs conforming to IBM’s application programming interfaces.

156 IBM Optim Database Relationship Analyzer User’s Guide


Trademarks
The following terms are trademarks or registered trademarks of International
Business Machines Corporation in the United States, other countries, or both.

IBM OS/390
DB2 Redbooks
DB2 Universal Database z/OS
IMS
Optim

A complete and current list of IBM trademarks is available on the Web at


http://www.ibm.com/legal/copytrade.shtml.

Adobe, Acrobat, PostScript and all Adobe-based trademarks are either registered
trademarks or trademarks of Adobe Systems Incorporated in the United States,
other countries, or both.

Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo,
Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or
registered trademarks of Intel Corporation or its subsidiaries in the United States
and other countries.

Linux is a trademark of Linus Torvalds in the United States, other countries, or


both.

Microsoft, Windows, Windows NT®, and the Windows logo are trademarks of
Microsoft Corporation in the Unites States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other
countries.

Other company, product, and service names may be trademarks or service marks
of others.

Notices 157
158 IBM Optim Database Relationship Analyzer User’s Guide
Index
A deleting
group 85
group discovery options
catalog-wide 51
accessibility 18 objects 47 changing 73, 74
adding tables 49 set 85 ignored relationships 67
additional relationships 49, 52 view 85 specifying 49
API 97, 112 diagnostic information starting point tables 51
database object views 109 gathering 131 group discovery process 13
APIs 11, 16, 88 discovering hard-to-find relationships 7 overview 48
application level discovering relationships refining 73
granularity 59 overview 41 reviewing results 71
architecture diagram 2 documentation group discovery results 71
accessing 18 viewing 71
documentation changes 17 Group discovery stored procedure 88
B groups
benefits 4 archiving 11
binding E backing up 11
description 43
JDBC 30 establishing
boundary tables 49, 52 merging 74
authorization on z/OS 33
description 65 viewing group discovery results 71
setting 65

F H
C finalized 70
find
hardware requirementsclient 35
callable interface 88 hardware requirementsserver 22
tables 85
catalog-wide 51 find tables 65
changes
validating 75 I
choosing
Trace Analyzer results G IBM Installation Manager
uninstalling 39
granularity 59 granularity
ignored relationships 49
client application level 59
installing 34
environment variables 38 unit of work level 59
client 35
hardware requirements 35 GRDDISCRUN stored procedure 88
server 21, 23, 29
installation 37 GRDPREDEFGROUPDATA stored
integration APIs 11
installing 35 procedure 102
integration with Database Relationship
log file 123 GRDPREDEFGROUPS stored
Analyzer 97
silent installation 37 procedure 99
database object views 109
software requirements 35 GRDPREDEFGROUPSBYSCHEMA stored
integration with IBM Optim 112
uninstalling 28 procedure 106
integration with IBM Optim 112
configurations GRDSERVERPRODUCTINFO stored
integration with Optim Database
defining relationships 84 procedure 105
Relationship Analyzer 16
configuring GRDVERSIONCOMPARE stored
GRDPREDEFGROUPDATA stored
group discovery options procedure 108
procedure 99, 102
relationship sources 51, 52 group discovery 51
GRDVERSIONCOMPARE stored
server login credentials 25 adding relationships 68
procedure 108
Windows 26 background mode 69
configuring sample tables 115 changing configuration options 73,
connecting 74
metadata database 45 checking status 70 J
user database 46 ignoring relationships 67 JDBC
creating relationship sources 52 binding 30
metadata for z/OS 31 running 68 jobs
new objects 47 setting boundary tables 65 running 69
specifying relationship sources 51 jobs, group discovery
user-defined relationships 84 checking status 70
D group discovery configuration
description 43
data governance 11
database changes
group discovery configurations
copying 84
L
validating 5 legal notices
finalizing 70
database object views 109 trademarks 157

© Copyright IBM Corp. 2008, 2009 159


List of groups by schema stored running stored procedures (continued)
procedure 106 group discovery 69 TRACESPINNER stored
log files 123 Optim Database Relationship procedure 95
logging 83 Analyzer components 39 summary of changes 17
LookAt x trace analysis 77, 78, 80, 81, 82 support
required information 131

M S
merging groups 74 sample data scenario 115, 120 T
message retrieval tool sample relationships 116 table relationships
LookAt x sample tables 116 uses 4
messages samples 115 tables
methods for accessing x configuring sample tables 115 searching 85
overview 131 sample data scenario 120 starting point 51
metadata database 42 security technotes 18
connecting 45 server 87 trace
user ID and password 25 server relationships 52
metadata databases debug log files 123 trace analysis
switching 47 environment variables 24 overview 76
MySupport 18 hardware requirements 22 running on a DB2 for LUW server 77
installation 24 running on a DB2 for z/OS
installing 21, 23, 29 server 80, 81, 82
N log files 123
login 25
running on an Oracle server 78
starting the trace for z/OS 81, 82
network server
security 87 trace analysis relationships 49
starting 26
silent installation 24 Trace Analyzer 7, 59, 76
software requirements 21 overview 14
software requirements for z/OS 30 restrictions 14
O uninstalling 28, 38, 39 running on an Oracle server 78
overview UNIX 28 running on DB2 for Linux, UNIX, and
architecture 2 Windows 38, 39 Windows 77
discovering relationships 41 server installation wizard 23 running on DB2 for z/OS 80
Optim Database Relationship Server product information stored starting the trace for z/OS 81, 82
Analyzer 1 procedure 105 Trace Analyzer results
sets granularity 59
description 43 Trace Analyzer stored procedure 95
P settings 83
silent installation 24, 37
trace context 59
trace information 123
pre-finalized 70
software requirements for TRACESPINNER stored procedure 95
problems
z/OSserver 30 trademarks 157
diagnostic information about 131
software requirementsclient 35 troubleshooting 123, 131
product functions 13
software requirementsserver 21
properties
specifying
viewing object 84
catalog-wide 51
starting point tables 51
U
uninstalling
specifying group discovery options 49
R starting
client 28, 38, 39
IBM Installation Manager 39
recovery procedures Optim Database Relationship
server 27, 28
overview 125 Analyzer components 39
unit of work level
reference 87 starting point tables 49, 52
granularity 59
referential integrity specifying 51
user database
relationship source 51, 52 status, checking 70
connecting 46
refining stored procedure
user databases 43
group discovery 73, 74 schema name 83
switching 46
group discovery process 73 stored procedures 88
using Optim Database Relationship
relationship sources 52 GRDDISCRUN stored procedure 88
Analyzer 41
relationships 71 GRDPREDEFGROUPDATA stored
adding 68 procedure 102
ignoring 67 GRDPREDEFGROUPS stored
sources 52 procedure 99 V
specifying sources 51 GRDPREDEFGROUPSBYSCHEMA validating changes 75
trace analysis 76 stored procedure 106 validating database changes 5
user-defined 84 GRDSERVERPRODUCTINFO stored version comparison 75
relationships to ignore 52 procedure 105 versions
reviewing GRDVERSIONCOMPARE stored description 43
group discovery process 71 procedure 108 specifying relationship sources 51
table relationships 71

160 IBM Optim Database Relationship Analyzer User’s Guide


viewing
object properties 84
views
adding relationships 68

Z
z/OS
authorization 33
z/OS metadata information 31
z/OS metadata information 31

Index 161
162 IBM Optim Database Relationship Analyzer User’s Guide


Program Number: 5724-U77, 5655-U78

Printed in USA

SC27-2716-00

Potrebbero piacerti anche