Comparing two schemas
BMC AMI Command Centerenables you to make the following comparisons:
- Db2 catalog to Db2 catalog
- DDL to DDL
- Db2 catalog to DDL
- DDL to Db2 catalog
The same set of reports is available for each type of comparison. For more information, see Schema comparison reports.
Use the following procedure to create and display a Schema Compare View for each comparison that you want to see. You can also navigate to and run a saved schema comparison.
To create a Schema Compare View
The comparison requires two inputs:
- The schema or set of Db2 objects that has the structure definitions that you want to change (called the Primary Input in the procedure)
- The schema that has the preferred structure definitions, to serve as the basis for changing the other schema (called the Secondary Input)
- In the Schema Management perspective, click Add Schema Compare View
.The Compare wizard opens.
On the wizard's General page, complete the following fields and click Next:
Field
Description
Name
Enter a name for the report.
Select a report
Select to create a new report or use an existing report.
- On the wizard's next page, take the appropriate action as follows:
- If you are using an existing report, complete these actions:
On the wizard's Comparison Dataset page, navigate to and select the data set that contains the report and click Next.
For more information, see Viewing and editing a data set.
- (Optional) In the wizard's Options page, select Enable Trace to provide informational messages in the View Messages dialog box.
- Click Finish.
- Click Show Compare Report
to rerun the report.
If creating a new report, on the wizard's Type of Comparison page, complete the following fields and click Next:
Field
Description
Compare Type
Select the type of comparison that you require.
Output Compare Report
Navigate to and select a data set to save the generated CDL output of the comparison.
- If you are using an existing report, complete these actions:
On the wizard's Data Structures page, complete the following fields according to the type of comparison that you are performing:
Field
Description
Db2 objects that do not have the desired structure (primary input)
Object Type
Select the object type.
DB2 Connection
Select the Db2 connection from your list of favorites or add a Db2 connection to the list.
For more information, see Connecting to Db2 subsystems.Filter
Specify a filter for the name of the Db2 objects that you want to compare.
Db2 objects that have the desired structure (secondary input)
DB2 Connection
Select the Db2 connection from the list.
Filter
Specify a filter for the name of the Db2 objects that you want to compare.
Field
Description
Db2 objects that do not have the desired structure (primary input)
DB2 Connection
Select the Db2 connection from your list of favorites or add a Db2 connection to the list, as explained in Connecting to Db2 subsystems.
DDL Data Set
Select the DDL data set. This data set defines the scope of the comparison.
For more information, see Viewing and editing a data set.
Db2 objects that have the desired structure (secondary input)
DDL Data Set
Select the DDL data set.
For more information, see Viewing and editing a data set.
Field
Description
Db2 objects that do not have the desired structure (primary input)
DB2 Connection
Select the Db2 connection where the schema is stored.
Db2 objects that have the desired structure (secondary input)
DDL Data Set
Select the DDL data set. This data set defines the scope of the comparison.
For more information, see Viewing and editing a data set.
Field
Description
Db2 objects that do not have the desired structure (primary input)
DDL Data set
Select the DDL data set. This data set defines the scope of the comparison.
For more information, see Viewing and editing a data set.
Db2 objects that have the desired structure (secondary input)
DB2 Connection
Select the Db2 connection where the schema is stored.
- Click Next.
On the wizard's Dependent objects page, select the dependent objects to include in the comparison and click Next.
- On the wizard's Attributes page, select the attributes for each object type to include in the comparison and click Next.
- On the wizard's Options page, specify the option values for the current definition and click Next.
For information about the options, see Setting Schema Management options.
These values do not affect the global compare options that you specify by using the Options button.
- Click Finish.The Reports tab displays the reports for this comparison. For more information, see Schema comparison reports.
(Optional) If you want to view the generated CDL for the comparison, click Show CDL
to view the CDL in the Scratchpad.
- (Optional) If you want to rerun the comparison, click Show Compare Report
.