Comparing DB2 Databases

This document covers the following topics:


Prerequisites

DB2 must be installed. See the section DB2 and SQL/DS in the Predict and Other Systems documentation.

See also General Prerequisites for Comparison Functions.

Calling the Function

The Compare DD Objects with DB2 DBs screen is called with code C and object code D2 in any Predict main menu or with the command COMPARE D2.

17:00:13             *****  P R E D I C T  *****              2007-05-31
Plan   0            - Compare DD Objects with DB2 DBs -          Profile SYSTEM
                                                                               
                                                                               
Database ID ...........                                                        
Belongs to VM .........                                                        
                                                                               
SQL Server ...........*                                  <Default Server>      
                                                                               
List options                          Update options                           
  DB attributes ......* D               DB attributes ......... N (Y/N)        
  Dataspace list .....* D               Links                                  
  File list ..........* D                 Unlink dataspaces ... N (Y/N)        
                                          Unlink files ........ N (Y/N)        
                                                                               
                                                                               
                                                                               
                                                                               
Restrictions ........*    Profile Default ,used                                
                                                                               
Command ===>                                                                   
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
      Help  Next  Stop  Last  LnkEl Flip  Print Impl  AdmFi SelFi Prof  Main   

Parameters

Common parameters which are not included in the table below are described under Common Parameters for All DB2 Types.

Parameters
Selection criteria
Database ID The ID of the Predict database object or objects of type D which are to be compared with the connected DB2 database or databases. Asterisk notation can be used.
Belongs to VM Limits the scope of the function to DB2 databases linked to this virtual machine via association "Contains DA". Asterisk notation can be used.
List options
DB attributes
How attributes of the Predict database object are to be displayed.
Y All database attributes
N No database attributes
D Different: only database attributes whose Predict values differ from the implementation.
Dataspace list
How Predict dataspace objects linked to the Predict database object via association "Contains DC" are to be displayed.
Y All dataspaces.
N No dataspaces.
D Different: only dataspaces that are not implemented as DB2 tablespaces and DB2 tablespaces that are not documented with Predict dataspaces are contained in the list.
File list
How files linked to the Predict database object are to be displayed.
Y All files.
N No files.
D Different: only files that are either not implemented in the DB2 database or not defined in Predict.
Update options
DB attributes
Y The attributes of the Predict database object are to be updated.
Unlink dataspaces
Y Dataspaces not implemented as DB2 tablespaces are to be removed from the dataspace list of the Predict database object.
Unlink files
Y Files that are not implemented in the DB2 database are to be removed form the file list of the Predict database object.

Note:
Unlink files can only be set to Y if Unlink dataspaces is also set to Y.

Comparing DB2 Databases in Batch Mode

Command: COMPARE DB2

Enter parameters on the next line in positional or keyword form.

Field Keyword Position
Database ID DATABASE-ID 1
Belongs to VM PARENT 2
List options
DB attributes LIST-DB 3
Dataspace list LIST-DS 4
File list LIST-FILE 5
Update options
DB attributes UPD-DB 6
Unlink dataspaces UNLINK-DS 7
Unlink files UNLINK-FILE 8
SQL Server SQL-SERVER 9

If you explicitly set SQL-SERVER to blank in order to use the default server, another keyword must be specified after the SQL-SERVER keyword. If it is not possible to specify another keyword, the SQL-SERVER keyword must be followed by "D1=*" as shown below:

SQL-SERVER= ,D1=*

Example

To compare all databases of type D with prefix "TEST" and to display the file lists code the command:

COMPARE DB2
DATABASE-ID=TEST*,LIST-FILE=Y

or

COMPARE DB2
TEST*,,,,Y

The above example uses the Natural parameter ID=, and IA==.