Chapter 18: Using an Alternate Image Copy Source
This section contains the following topics:
Alternate Image Copy Overview (see page 195) Create or Update an Image Copy Map (see page 195) Create or Update an Image Copy Group (see page 196) Use an Image Copy Map (see page 197)
How to Report Table Activity When SYSCOPY Rows are Missing (see page 199)
Alternate Image Copy Overview
CA Log Analyzer uses image copies to complete row images when you select the Image Copy level of detail for your reports. Image copies can also be used as a source of expansion dictionaries for compressed tablespaces. CA Log Analyzer typically uses the image copies listed in the DB2 catalog (SYSIBM.SYSCOPY). However, you can also supply your own image copy data sets and point CA Log Analyzer to them by creating image copy maps and groups. These alternate image copies can be used in addition to or in place of the image copies listed in the DB2 catalog. The ability to define alternate image copies can be useful when generating reports for a tablespace that no longer has image copies listed in the DB2 catalog.
Create or Update an Image Copy Map
An image copy map associates an image copy data set to a table over a specific time range. Image copy maps are useful when a MODIFY RECOVERY has been run on a tablespace because doing so can remove information about copy data sets from the DB2 catalog. As a result, CA Log Analyzer cannot use the catalog to find the image copies that cover the affected time ranges. You can create an image copy map to point CA Log Analyzer to the correct image copy data set.
Follow these steps:
1. Select 3 (Source Mapping) from the CA Log Analyzer Main Menu and press Enter.
The Source Mapping Maintenance panel appears.
2. Select 2 (Image Copy Mapping) and press Enter.
The Image Copy Mapping panel appears.
3. Type M in the display field and press Enter.
The panel switches to the map view.
Create or Update an Image Copy Group
196 User Guide
4. Type C (Create) in the Option field and type a name in the Map Name field.
Note: You can also type U (Update) next to an existing map to modify it.
Press Enter.
The IC Map Editor panel appears.
5. Define the image copy map. The following fields are required:
■ The Start RBA/LRSN value
Note: This value defines the beginning of the range for which this image copy is valid.
■ The image copy type (ICTYPE) and associated subtype (STYPE).
■ The share level of the image copy
■ The data set information for your image copy data set Complete other fields on this panel as needed.
Press PF3 (End).
The image copy map is saved. The Image Copy Mapping panel reappears, showing the map in its list.
Create or Update an Image Copy Group
An image copy group organizes a set of image copy maps for easy reference. These maps can all be on the same tablespace for an extended range of time. Alternately, the maps can be for all tablespaces of interest for a limited time range.
Follow these steps:
1. Select 3 (Source Mapping) from the CA Log Analyzer Main Menu and press Enter.
The Source Mapping Maintenance panel appears.
2. Select 2 (Image Copy Mapping) and press Enter.
The Image Copy Mapping panel appears.
3. Type G in the display field and press Enter.
The panel switches to the group view.
4. Type C (Create) in the Option field and enter a name in the Group Name field.
Note: You can also type U (Update) next to an existing group to modify it.
Press Enter.
The IC Group Editor panel appears.
Chapter 18: Using an Alternate Image Copy Source 197 5. Select the maps to include in the group:
a. Enter selection criteria in the Creator and Map Name fields. Press Enter.
The Alternate IC Selection panel appears.
b. Select the maps to include and press PF3 (End).
The IC Group Editor panel reappears, displaying a list of the selected maps.
6. Press PF3 (End).
The group is saved. The Image Copy Mapping panel reappears, showing the group in its list.
Use an Image Copy Map
This section explains how to use an image copy map when generating a DML Activity Report.
Follow these steps:
1. Select 1 (Process Log) from the CA Log Analyzer Main Menu and press Enter.
The Report Specification panel appears.
2. Select DML Activity and press Enter.
The DML Activity Report Options panel appears.
3. Complete the following fields:
■ Type S (Redo SQL) in the Output Format Field.
■ Type D (Detail) in the Level of Detail field.
■ Type I (Include) in the Table Filters field.
Press PF3 (End).
The Table Filter Specifications panel appears.
4. Enter the following values:
■ Enter the table name in the Table field.
■ Enter the creator in the Creator field.
Press PF3 (End).
The DML Activity Report Options panel reappears.
5. Press PF3 (End).
The Report Specification panel appears.
6. Press PF3 (End) again.
The Report Source Specifications panel appears.
Use an Image Copy Map
198 User Guide
7. Enter the following values:
■ Enter the starting and ending parameters for log processing range.
■ Type Y (Yes) in the Source of DB2 Copy Info field.
Press Enter.
The Copy Source Specifications panel appears.
8. Enter the following values:
■ Type O (IC Maps Only) in the Source Type field.
■ Type L (List) in the O (Option) field of the Create Group line.
■ Enter the information of the image copy map created in step 3 on the Create Map line.
Press PF3 (End).
The Report Source Specifications panel reappears.
9. Press PF3 (End) again.
The Output Specifications panel appears.
10. Enter a data set name for the SQL statements in the Dataset Name field and press PF3 (End).
The Report Submission panel appears.
11. Enter one of the following values in the Execution Mode field:
■ Type O for online mode.
■ Type B for batch mode.
Press Enter.
If you specified online mode, the job is processed immediately and it appears on your screen.
If you specified batch mode, the Batch JCL Specification panel appears.
Chapter 18: Using an Alternate Image Copy Source 199
How to Report Table Activity When SYSCOPY Rows are Missing
In this scenario, your site maintains a table named INVOICES, which contains customer invoice information. As the database administrator (DBA), you have been asked to report on recent activity in this table. Typically, you generate a DML Activity Report and use the image copy level of detail to accomplish this task. CA Log Analyzer retrieves the image copy information from SYSIBM.SYSCOPY to create the report. However, a MODIFY RECOVERY has been run against the parent tablespace (BILLING). This action removed the image copy rows for INVOICES from SYSCOPY, which means that CA Log Analyzer cannot use SYSCOPY to retrieve the image copy information.
This scenario demonstrates how to generate an activity report when the SYSCOPY rows are missing. The process involves defining a set of image copy maps that associates the original copy data sets with the tablespace and applicable log range. You then generate an activity report by using the image copy maps instead of the catalog to retrieve the image copy information.
The following illustration shows how a DBA reports table activity when SYSCOPY rows are missing:
To report table activity when SYSCOPY rows are missing, complete the following tasks:
1. Locate the missing image copy information (see page 200).
2. Create image copy maps (see page 201).
3. Use the maps to generate an activity report (see page 203).
How to Report Table Activity When SYSCOPY Rows are Missing
200 User Guide
Locate the Image Copy Information
Use CA Log Analyzer to find the SYSCOPY information that was deleted from the DB2 catalog.
Follow these steps:
1. Select 1 (Process Log) from the CA Log Analyzer Main Menu and press Enter.
The Report Specification panel appears.
2. Select DML Activity and press Enter.
The DML Activity Report Options panel appears.
3. Complete the following fields:
■ Type S (Redo SQL) in the Output Format field.
■ Type D (Detail) in the Level of Detail field.
Note: We are interested only in deletes from the SYSCOPY table. We do not require an image copy to complete the rows because DB2 logs a complete row image on a delete.
■ Type I (Include) in the Table Filters field.
Note: This scenario uses table filters to limit the scope of the generated SQL to a single table (SYSIBM.SYSCOPY).
■ Type I (Include) in the Statement Type Filters field.
Note: This scenario uses statement type filters to limit the scope of the generated SQL to DELETE statements.
■ Type I (Include) in the Catalog Updates field.
Note: This scenario includes catalog tables in the report.
Press PF3 (End).
The Table Filter Specifications panel appears.
4. Specify the SYSIBM.SYSCOPY table for inclusion and press PF3 (End).
The Statement Filter Specifications panel appears.
5. Select Deletes and press PF3 (End).
The Report Options field reappears.
6. Press PF3 (End) again.
The Report Specification panel reappears.
7. Press PF3 (End) again.
The Report Source Specifications panel appears.