You are on page 1of 418

IBM Optim 

Archive User Manual


Version 7 Release 3
IBM Optim 

Archive User Manual


Version 7 Release 3
Note
Before using this information and the product it supports, read the information in “Notices” on page 399.

Version 7 Release 3 (September 2010)


This edition applies to version 7, release 3 of IBM Optim and to all subsequent releases and modifications until
otherwise indicated in new editions.
© Copyright IBM Corporation 1994, 2010.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
About this Guide . . . . . . . . . . vii Open Dialog . . . . . . . . . . . . . 96
Using the Delete Request Editor . . . . . . . 98
Chapter 1. Introduction to Archive . . . 1 Table Access Strategy . . . . . . . . . . 99
General Tab, Delete Request Editor . . . . . 105
Common Elements and Utilities . . . . . . . . 2
Notify Tab, Delete Request Editor . . . . . 108
Process a Delete Request . . . . . . . . . 108
Chapter 2. Processing Flow . . . . . . 5 Schedule a Delete Request . . . . . . . . 108
The Archive Process . . . . . . . . . . . . 5 Run a Delete Request. . . . . . . . . . 108
The Restore Process . . . . . . . . . . . . 6 Delete Request Progress Dialog . . . . . . 109
Archive Directory Maintenance . . . . . . . . 8 Delete Process Report. . . . . . . . . . 110
Optim Server Option . . . . . . . . . . . 8
Sample Database Tables . . . . . . . . . . 8
Chapter 5. Insert . . . . . . . . . . 113
Archive Data . . . . . . . . . . . . . . 9
Open the Insert Request Editor . . . . . . . 114
Open the Archive Request Editor . . . . . . 10
Create an Insert Request . . . . . . . . . 114
Specify the Archive Process Parameters . . . . 11
Using the Insert Request Editor . . . . . . . 115
Define the Data to Archive . . . . . . . . 16
General Tab, Insert Request Editor . . . . . 117
Run the Archive Process . . . . . . . . . 28
Age Function Tab, Insert Request Editor . . . 124
Browse Archived Data . . . . . . . . . . . 33
Global Aging Tab, Insert Request Editor . . . 127
Search Archive Files . . . . . . . . . . 33
Currency Tab, Insert Request Editor . . . . . 127
Select a Table to Browse . . . . . . . . . 39
Report Options Tab, Insert Request Editor . . . 129
View Related Data . . . . . . . . . . . 40
Notify Tab, Insert Request Editor . . . . . . 130
Restore Archived Data. . . . . . . . . . . 43
Process an Insert Request . . . . . . . . . 130
Open the Restore Request Editor . . . . . . 44
Schedule an Insert Request . . . . . . . . 130
Locate the Archive File . . . . . . . . . 46
Run an Insert Request . . . . . . . . . 130
Apply Local Selection Criteria . . . . . . . 50
Insert Request Progress Dialog . . . . . . 131
Modify the Access Definition . . . . . . . 51
Insert Process Report . . . . . . . . . . 132
Choose a Restore Method — Insert or Load . . 54
Specify Insert Process Parameters . . . . . . 54
Run the Restore Process . . . . . . . . . 59 Chapter 6. Load . . . . . . . . . . 135
Open the Load Request Editor. . . . . . . . 137
Chapter 3. Archive . . . . . . . . . . 63 Create a Load Request . . . . . . . . . 137
Resource Estimation . . . . . . . . . . 137
Open the Archive Request Editor . . . . . . . 65
Load Request Editor Options Dialog . . . . 140
Creating an Archive Request. . . . . . . . 65
Using the Load Request Editor . . . . . . . 143
Selecting an Archive Request to Edit . . . . . 66
General Tab, Load Request Editor . . . . . 144
Using the Archive Request Editor . . . . . . . 67
DB Alias Tab – DB2, Load Request Editor . . . 146
General Tab, Archive Request Editor . . . . . 69
DB Alias Tab - iSeries, Load Request Editor . . 153
Objects Tab, Archive Request Editor . . . . . 75
DB Alias Tab - Teradata, Load Request Editor 154
Point and Shoot Tab, Archive Request Editor . . 76
DB Alias Tab – Oracle, Load Request Editor . . 158
Variables Tab, Archive Request Editor . . . . 78
DB Alias Tab – Sybase ASE, Load Request
Object List Tab, Archive Request Editor . . . . 79
Editor . . . . . . . . . . . . . . . 163
Collections Tab, Archive Request Editor . . . . 81
DB Alias Tab – SQL Server, Load Request Editor 166
Notify Tab, Archive Request Editor . . . . . 83
DB Alias Tab – Informix, Load Request Editor 171
Delete Tab, Archive Request Editor . . . . . 83
DB Alias Tab – z/OS, Load Request Editor . . 174
Process an Archive Request . . . . . . . . . 85
Age Function Tab, Load Request Editor . . . 177
Schedule an Archive Process. . . . . . . . 88
Global Aging Tab, Load Request Editor. . . . 180
Run an Archive Process Request . . . . . . 88
Currency Tab, Load Request Editor . . . . . 181
Error Messages . . . . . . . . . . . . 88
Report Options Tab, Load Request Editor . . . 182
Warning Messages . . . . . . . . . . . 88
Notify Tab, Load Request Editor . . . . . . 183
Archive Request Progress. . . . . . . . . 89
Process a Load Request . . . . . . . . . . 183
Archive Process Report . . . . . . . . . 91
Schedule a Load Request . . . . . . . . 183
Run a Load Request . . . . . . . . . . 183
Chapter 4. Delete . . . . . . . . . . 95 Load Request Progress Dialog . . . . . . . 185
Open the Delete Request Editor . . . . . . . 95 Load Process Report . . . . . . . . . . 186
Create a Delete Request . . . . . . . . . 95
Selecting a Delete Request to Edit . . . . . . 96
Chapter 7. Report . . . . . . . . . 189

© Copyright IBM Corp. 1994, 2010 iii


Open the Report Request Editor . . . . . . . 190 Chapter 10. Manage Archive Media 289
Create a new Report Request . . . . . . . 190 Secondary Media . . . . . . . . . . . . 289
Select a Report Request to Edit . . . . . . 190 Restoring or Browsing Data from Secondary Media 290
Using the Report Request Editor . . . . . . . 191 Retention Periods . . . . . . . . . . . . 290
General Tab, Report Request Editor . . . . . 192 Storage Profile . . . . . . . . . . . . . 290
Archive Criteria Tab, Report Request Editor . . 194 Personal Options . . . . . . . . . . . . 291
Source File Tab, Report Request Editor . . . . 199 Product Options . . . . . . . . . . . . 291
Archive Details Tab, Report Request Editor . . 203 Open the Storage Profile Definition Editor. . . . 291
Formatting Tab, Report Request Editor . . . . 204 Create a New Storage Profile . . . . . . . 291
Notify Tab, Report Request Editor . . . . . 206 Select a Storage Profile to Edit. . . . . . . 292
Process a Report Request . . . . . . . . . 206 Open a Storage Profile Dialog . . . . . . . 292
Schedule a Report Process . . . . . . . . 206 Using the Storage Profile Definition Editor . . . 293
Run a Report Request . . . . . . . . . 206 Primary Copy Tab, Storage Profile Definition 295
Report Process Report . . . . . . . . . 206 Duplicate Copy Tab, Storage Profile Definition 296
Centera Tab, Storage Profile Definition . . . . 298
Chapter 8. Restore . . . . . . . . . 209 NetWorker Tab, Storage Profile Definition . . . 300
Open the Restore Request Editor . . . . . . . 212 Tivoli Tab, Storage Profile Definition . . . . 302
Create a New Restore Request. . . . . . . 212 File Retention Tab, Storage Profile Definition 304
Using the Restore Request Editor . . . . . . . 213 Retention Policy Tab, Storage Profile Definition 306
List Archive Files . . . . . . . . . . . 220
Filtering Listed Archive Files . . . . . . . 228 Chapter 11. Archive Performance . . . 309
Search and Selection Criteria . . . . . . . 228 Processing Strategies . . . . . . . . . . . 309
Process a Restore Request . . . . . . . . . 239 Performance Tools . . . . . . . . . . . . 310
Match Each Archive File to an Insert or Load Statistical Reports . . . . . . . . . . . 311
Request . . . . . . . . . . . . . . 239 Table Access Strategy . . . . . . . . . . 319
Create Subset Extract Files . . . . . . . . 239 Index Analysis . . . . . . . . . . . . 321
Load or Insert Data . . . . . . . . . . 240 Multiple Database Connections . . . . . . 324
Run a Restore Request from the Command Line 240 Buffer Size Limit . . . . . . . . . . . 324
Schedule a Restore Request. . . . . . . . 240
Run a Restore Request Immediately . . . . . 240 Chapter 12. Command Line Interface
Restore Request Progress Dialog . . . . . . 241
Restore Process Report . . . . . . . . . 244
— Processing Utilities . . . . . . . 327
Archive, Delete, Restore, and Report Processes . . 328
Syntax For Command Line Processing of
Chapter 9. Archive Maintenance Archive, Delete, Report, and Restore Requests . 328
Utilities . . . . . . . . . . . . . . 249 Command-line Keywords For Archive, Delete,
Archive Directory Maintenance . . . . . . . 250 Report, and Restore Requests . . . . . . . 331
Grid Details . . . . . . . . . . . . . 251 Overrides For Archive, Delete, Report, and
Archive Directory Maintenance Shortcut Menu Restore Requests . . . . . . . . . . . 333
Commands . . . . . . . . . . . . . 253 Examples (Running Archive and Restore
Index Search Selection Criteria Dialog . . . . 256 Processes From Command Line) . . . . . . 344
Searching Listed Archive Files . . . . . . . 259 Search and Restore Process . . . . . . . . . 346
Archive Directory Entry Information Dialog . . 259 Command Line Processing of Search and
Export Archive File Security Dialog . . . . . 265 Restore Requests . . . . . . . . . . . 347
Exporting Security Information . . . . . . 266 Command-line Keywords For Search and
Archive File Filters . . . . . . . . . . 266 Restore Processing. . . . . . . . . . . 354
Archive Registration Utility . . . . . . . . 267 Examples . . . . . . . . . . . . . . 360
Registering Archive Files . . . . . . . . 268 Restart or Retry a Process . . . . . . . . . 362
Grid Details . . . . . . . . . . . . . 268 Syntax For Restarting or Retrying an Insert or
Shortcut Menu Commands . . . . . . . . 269 Delete Process . . . . . . . . . . . . 362
Register the Archive Files . . . . . . . . 270 Command-line Keywords . . . . . . . . 363
Archive Index Maintenance. . . . . . . . . 272 Example . . . . . . . . . . . . . . 364
Select Archive Files . . . . . . . . . . 272 Return Codes . . . . . . . . . . . . . 365
Modifying an Archive Index File . . . . . . 273
Creating Archive Index Files for Multiple Chapter 13. Command Line Interface
Archive Files . . . . . . . . . . . . 274
Index Maintenance Dialog . . . . . . . . 274
— Maintenance Utilities . . . . . . . 367
Generating Archive Indexes . . . . . . . 283 Archive Directory Maintenance . . . . . . . 368
Archive File Collections . . . . . . . . . . 284 Syntax for Archive Directory Maintenance . . . 368
Archive File Collection Processing . . . . . 286 Command Line Keywords . . . . . . . . 369
Creating an Archive File Collection . . . . . 287 Examples . . . . . . . . . . . . . . 373
Archive File Migration . . . . . . . . . . 374

iv IBM Optim: Archive User Manual


Syntax For Archive File Migration . . . . . 374 Appendix B. ODBC Access to
Command Line Keywords For Archive File Archived Data . . . . . . . . . . . 389
Migration . . . . . . . . . . . . . 375 ODBC Server Command Console. . . . . . . 389
Example (Archive File Migration Using Define a Data Source . . . . . . . . . . . 391
Command Line) . . . . . . . . . . . 378 Creating a Parameter File . . . . . . . . 395
File Maintenance Facility . . . . . . . . . 378 Retrieving Data from the Selected Archive File 396
Syntax for File Maintenance Facility Processing 379
Remove Rows Process . . . . . . . . . 380
Compress Process . . . . . . . . . . . 382
Notices . . . . . . . . . . . . . . 399
Trademarks . . . . . . . . . . . . . . 401
Appendix A. SQL Grammar for Search
Index . . . . . . . . . . . . . . . 403
and Restore . . . . . . . . . . . . 387

Contents v
vi IBM Optim: Archive User Manual
About this Guide
This User Manual provides information on how to use the Archive component of the IBM® Optim™
solution. Archive allows you to extract sets of relational data from one or more databases and store the
data for future use.

This release runs in the Microsoft Windows environment and supports the IBM DB2®, Oracle, Sybase
Adaptive Server Enterprise (ASE), Microsoft SQL Server, and IBM Informix® database management
systems. Additional database management systems may be supported in future releases.

© Copyright IBM Corp. 1994, 2010 vii


viii IBM Optim: Archive User Manual
Chapter 1. Introduction to Archive
The Archive component of the IBM Optim solution allows you to extract sets of relational data from one
or more databases and store the data for future use.

The IBM Optim solution manages enterprise data throughout every stage of the information lifecycle.
Optim enables your company to assess, classify, subset, archive, store, and access enterprise application
data. Using the archiving features in Optim, you can
v Isolate historical data from current activity and safely remove it to a secure archive.
v Access archived historical data easily, using familiar tools and interfaces.
v Restore archived data to its original business context when it requires additional processing.

The Optim test data management capabilities provide an efficient alternative to database cloning,
allowing you to create development and testing environments that are sized appropriately.

Optim helps you achieve these benefits with the following components: Archive, Move, Edit, and
Compare. This manual describes the Archive component.

Archive provides everything you need to create and manage archives of relationally intact data from
databases with any number of tables, interconnected with any number of DBMS and
applicationmanaged relationships, regardless of their complexity.

After creating an Archive File, Archive selectively removes data from the production database, according
to your instructions, to maximize database performance and response time. An indexing feature allows
you to quickly search Archive Files for needed information and, if necessary, restore all or a precisely
selected, referentially intact, portion of the data.

Archive allows you to introduce application-specific logic into your archiving operation, thereby
integrating archiving with your applications. The Archive Actions allow you to define and execute
custom SQL statements or calls to a stored procedure at pre-defined points in the Archive and Restore
Processes. For example, you might instruct Archive to call a routine you have written that updates a
column with a value each time it deletes a row from your production database. Your application can then
use this value to determine if a customer's data has been archived.

Archiving data with Archive is a simple two-step process. You first create an Access Definition to specify
the tables and relationships that define the set of referentially intact data to be archived. In the Access
Definition, you also indicate any data to be deleted from the production database after archiving, set up
indexing parameters, and define Archive Actions. In the second step, Archive copies the data described in
the Access Definition to an Archive File, executes appropriate actions, creates indexes used subsequently
to find archived data, and deletes the selected data from the database.

The powerful, yet safe, delete feature resolves the problem of deleting production data. Using standard
facilities for all operations, Archive quickly and accurately deletes all or a portion of the archived data.
For example, you might want to archive data for customers that have been inactive for the past year. You
can create an Archive File of all data pertaining to the inactive customers and delete only the order and
payment history from the production database, leaving intact the master account information, such as
name and address.

Search facilities allow you to search Archive Files, specifying criteria to narrow the search. Search results
can be presented in an interactive display, allowing you to browse archived data without having to
restore it to your production system, a method useful in many situations – for example, to answer
customer inquiries.

© Copyright IBM Corp. 1994, 2010 1


If archived data must be restored, Archive can reassemble data from hundreds of tables (across platforms,
if necessary), identify the pertinent set of related rows, and restore them. The Restore Process allows you
to restore archived data to the production database or to a separate database and accommodates data
model changes during the restoration. In addition, you can find or restore data using criteria that differ
completely from that used to create the archive.

For organizations that have developed a comprehensive archiving strategy, Archive and Restore Processes
can be automated, with archiving occurring on a regularly scheduled basis and restoration triggered by
applications that provide the criteria for data to be restored.

Archive addresses a critical operational need for organizations with large, complex databases. Old data
can be archived in a precise manner and production databases optimized for peak performance. Archived
data can be browsed or selectively restored as needed. With Archive, an enterprise can maximize its
investment in its applications and operational platform. At the same time, the level of service is
maximized because production database searches and response times are minimized. Programmers and
DBAs are not required to spend hours writing and debugging complex archive and one-time restoration
programs.

Intelligent window handling technology allows you to display multiple dialogs, pop-up windows,
context-sensitive online help, and tutorials.

Common Elements and Utilities


Optim components have many features and utilities in common.

Features common to all Optim components, Archive, Move, Edit, and Compare, are explained in the
Common Elements Manual .

To carry out its functions, Optim relies upon userdefined objects as supplements to objects defined to
the database (for example, tables, primary keys, relationships, stored procedures). These userdefined
objects (collectively, Optim objects) are stored in the Optim Directory.

Optim Directory and Common Optim Objects

The Optim Directory is a set of tables in which Optim tracks processing status and store objects needed
for processing. You must use the Configuration program to create or configure the Directory tables and
stored procedures needed to access the Directory.

Objects in the Directory that are common to Optim include:


v Access Definitions. An Access Definition identifies a set of related data to be processed. It references
the database tables and their relationships, and provides criteria to select specific rows within tables.
An Access Definition is required for an Archive Process and is sometimes used for a Restore Process.
v Column Maps. A Column Map provides specifications needed to match columns between two tables
referenced in a Table Map. Also, a Column Map can be used to transform data, age dates in tables, and
exclude one or more columns from processing.
A Column Map can be referenced in a Table Map for an Insert or Load Process used in a Restore
Process.
v Column Map Procedures. A Column Map Procedure facilitates data transformations in a Convert,
Insert, Load, or Restore Process that are beyond the scope of native Column Map functions.
For example, you can use a Column Map Procedure to round Year-to-Date Sales amounts before
restoring data for analysis or reporting.
v DB Aliases. A DB Alias provides parameters needed to connect with a specific database.
A DB Alias name is used as a high-order qualifier for an object or table name, providing information
Optim needs to access the appropriate database. A DB Alias is needed anytime a database object is

2 IBM Optim: Archive User Manual


referenced. For example, to qualify the name of an Optim primary key, Optim relationship, or a
database table referenced in an Access Definition, Column Map, or Table Map.
v Primary Keys. Primary key columns uniquely identify each row in a database table.
A primary key can be used to create an Optim relationship, and is required for a table that is changed
by a Delete, Insert, or Restore Process or a table that is visited more than once in an Archive Process. A
primary key is also required to enable the row selection (Point and Shoot) feature for an Access
Definition or an Archive Process.
v Relationships. A relationship is a defined connection between the rows of two tables that determines
the parent or child rows to be processed and the order in which they are processed.
Optim uses relationships to determine the data to be retrieved from related tables and relies upon
relationships defined to the database, when available. However, you can also define relationships to
supplement those in the database. Generally, a relationship is needed in a process that uses an Access
Definition.
v Table Maps. A Table Map identifies and matches two tables or sets of tables in an Insert or Load
Process used in a Restore Process and can exclude one or more tables from processing.
A Table Map is required for an Insert, Load, or Restore Process.

Common Utilities

The Archive utilities (Directory Maintenance, Register Files, and Index Maintenance) and the Storage
Profile utility are documented in the Archive User Manual. Other utilities that are common to all Optim
components are documented in the Common Elements Manual, as follows:
v Restart/Retry. Use the Restart/Retry Utility to restart a process that terminated abnormally or to retry
a process for which all rows are not successfully processed. You can use this utility to restart or retry a
Delete, Insert or Insert/Update Process.
v Calendar. Use the Calendar Utility to customize handling of dates for aging data in a Convert, Insert,
or Load Process and for scheduling process requests.
v Currency. Use the Currency Utility to customize currency conversion parameters for Convert, Insert, or
Load Processes.
v Schedule. Use the Scheduler to schedule processes and monitor processing.
v Browse. Use the Browse Utility to review the contents of an Archive, Extract, or Control File.
v Export/Import. Use the Export/Import utilities to copy Optim objects from one Optim Directory to
another.
v Create. Use the Create Utility to create database objects from definitions in an Archive or Extract File.

Options

Personal and Product Options are used to maintain the Optim environment. Generally, Product Options
parameters enforce site and system requirements, while you can use Personal Options to customize
Optim for use at each workstation. (Refer to the Installation and Configuration Guide and the Common
Elements Manual .)

Security options allow you to establish as many as three levels of security for using Optim. Functional
security allows you to control user access to the interface for functions provided by Optim, object security
allows you to control access to specific objects in the Optim Directory, and Archive File security allows
you to control access to data in Archive Files. All security options are documented in the Installation and
Configuration Guide .

Chapter 1. Introduction to Archive 3


4 IBM Optim: Archive User Manual
Chapter 2. Processing Flow
An effective archiving strategy can help you streamline your databases to improve database performance
and reduce costs associated with expensive upgrades. Archive can archive complex relational data
quickly and accurately, while providing access to archived data — referentially intact and complete.

First, create an Archive Request and an Access Definition that provide instructions to archive a set of
related data. Archive follows these instructions to extract and save the data, including the metadata that
describes tables, columns and relationships. During this process, Archive creates indexes for archived
data, according to your instructions.

To streamline your databases for peak efficiency, you can accurately delete all or part of the archived data
from the production database.

To answer a customer query, you can search for the appropriate Archive File, using criteria, and browse
data in it. You can also search for and restore archived data easily, using a variety of options, specified in
a Restore Request. You can restore data to the production database or to another database. If the data
model has changed, you can restore archived data to the new model or restore the data to a different
database.

The Archive Process


The Archive Process selects data from a source (one or more tables in a database) and copies that data to
a destination (an Archive File).

To archive data, you must create an Archive Request that includes the specifications for the data to be
archived, called the Access Definition, and the parameters for the Archive Process. You can process the
Archive Request immediately or schedule the process to run automatically, at predetermined intervals.
You can also run the Archive Process from the command line, using overrides for specifications in the
request.

Archive Request

Use the Archive Request Editor dialog to define parameters for processing the Archive Request. These
parameters include the Archive File, Archive Index File, group name, Access Definition, row limit and
delete preferences. If Archive File Security is used to control access to data in the file, a File Access
Definition is referenced and if Open Data Manager is used to access archived data, one or more Archive
File Collections are referenced.

Archive File

The Archive File contains the selected, relationally intact data described in the Access Definition and the
object definitions needed to re-create the database, if necessary. The Archive File is stored locally on the
client system or on a shared file server. Archive Directory entries provide general information about each
Archive File and any Archive Indexes for the file.

After you have extracted data and created an Archive File, you can browse the contents of the file to
answer questions or satisfy a customer request. You can search Archive Directory entries, Archive Index
Files, and Archive Files, using criteria for the files and data of interest. If necessary, you can restore
selected data from the Archive File. Also, using your own application, you can copy an Archive File to
tape, delete it from your disk files, and retain the Archive Directory entries on the client system or shared
file server. The retained Archive Directory entries and Archive Index Files can be searched to determine
the Archive Files to be returned to disk for browsing or restoring.

© Copyright IBM Corp. 1994, 2010 5


Archive Index File

The Archive Index File facilitates searches for archived data to browse or restore. Parameters for indexing
archived data are specified in the Access Definition.

Access Definition

The Access Definition governs the overall Archive Process. An Access Definition identifies the tables,
relationship traversal, and selection criteria for the data you want to archive, and may identify tables
from which archived data is deleted. It also provides parameters for Indexes and Archive Actions –
user-defined SQL statements executed at predefined points in an Archive or Restore Process. You can
select a named Access Definition or create a new Access Definition for a single Archive Request. Use an
Access Definition to:
v Identify the tables from which data is archived in the Archive Process. You can insert the name of a
single table and request that Archive provides the names of all related tables. One table is identified as
the Start Table, or table from which data is first archived.
v Identify tables from which data is deleted after archiving. An option allows you to review and change
your selections before data is deleted.
v Select relationships to be traversed and the direction of traversal when archiving the data. You can use
relationships defined to the database and create relationships in the Optim Directory to replicate those
managed by your applications.
v Define criteria for the set of related rows to be archived, using:
– Selection criteria based on the age of the data or values in one or more columns.
– A manually selected list of Start Table rows (Point and Shoot).
v Set up indexes to be created when data is archived.
v Establish Archive Actions to be executed when data is archived or restored.
v Use the Show Steps function to review how Archive will traverse the database to ensure that the
desired data is archived.

Process Options

As a safeguard, you can limit the number of rows to be archived in a process. You can also choose to
defer the deletion of rows from the database, or review an Archive Delete list before deleting the archived
rows from the database.

Delete Process

Archived data from selected database tables can be deleted as part of the Archive Process, or you can
delete archived data in a separate step. In either case, you can review and change your selections before
deleting data.

Archive Process Report

An Archive Process Report is generated as part of the Archive Process. The report contains general
information and statistics about the process. The content of the report reflects the data and object
definitions that have been archived.

The Restore Process


The Restore Process obtains data from a source (one or more Archive files) and copies that data to a
destination (one or more tables in a database).

6 IBM Optim: Archive User Manual


There are two steps to a Restore Process. First one or more Archive Files that contain the data to be
restored must be located, and the desired data selected. Second, the data is restored to the database using
the Insert or Load Process.

To restore archived data, you must create a Restore Request. Using the Restore Request, you can select
data from one or more Archive Files and restore it to the original or a different database. Because the
object definitions are included in the Archive File, you can also clone the original database if desired. You
can process the Restore Request immediately or use it as a template for application-generated jobs run
from the command line, using overrides as appropriate. A Restore Request can also be scheduled, if
circumstances warrant.

Restore Request

Use the Restore Request Editor to define parameters in a Restore Request. These parameters include the
name or names of source Archive Files, criteria for the data to be restored, the type of process (Load or
Insert) used to restore the data, and Insert or Load Requests that can be used to restore the data.

Considerations that apply when deciding the method used to restore archived data include: the volume
of data, the number of rows to be restored, the need for user access during a Restore Process, and the
need to replace rows and insert rows in one step.

Insert Request or Load Request

Use the Insert Request Editor to define parameters in an Insert Request or use the Load Request Editor to
define parameters in a Load Request. Among other parameters, an Insert or a Load Request includes:
v The name of an Extract or Archive File (this Source File may be the Archive File that is actually
restored or, in an automated process, it can serve as a template or place holder for the Archive File that
is restored).
v The name of the Control File that tracks the process.
v The Table Map that identifies and matches source with destination tables and can be used to exclude
one or more tables from restoration.

Control File

A Control File records information about the success or failure of Insert or Load Processing for each
selected row in the Archive File. You must specify the name of a Control File when you create the Insert
or Load Request. Diagnostics identify why any discarded rows were not processed.

Table Map

A Table Map matches tables in the restored Archive File to tables in the destination database. Individual
tables can be excluded and tables with different names can be mapped. You can use an existing Table
Map or define the Table Map as part of the Insert or Load Request specifications.

Object Definitions

If destination tables do not exist, Optim can generate SQL to create the tables, using the object definitions
in the Archive File. The tables are created as part of the Insert Process or in a separate step. In addition to
tables, other object definitions can be created.

Restore Process Report

A Restore Process Report is generated as part of the Restore Process. The report contains general
information and statistics about each step of the process and provides details about data that has been
restored.

Chapter 2. Processing Flow 7


Archive Directory Maintenance
Use the Archive Directory Maintenance Utility to search for Archive Directory entries.

Using filters and selection criteria to search for entries of interest, you can update or delete Archive
Directory entries, or browse an Archive File associated with a listed Archive Directory entry to resolve a
problem or answer a question. You can also create new or modify existing Archive File Indexes.

Optim Server Option


The Optim Server option allows a user to define tasks on a workstation and direct any resource-intensive
data processing functions to a more suitable machine. This potentially minimizes network traffic and
maximizes efficiency. When a task requires the movement, processing or storage of very large volumes of
data, the request can be defined at the workstation in the normal way, then directed for remote
processing on a machine hosting Optim Server.

This contrasts with the standard configuration, in which Optim operates as a client application with all
processing taking place directly on the Windows workstation. Unless the database is installed locally,
Optim uses the appropriate DBMS client software to communicate with the remote database through a
network.

If your site has installed the Optim Server option on a machine, you can direct Archive Requests, Delete
Requests, and Insert or Load Requests used in the Restore Process to the Optim Server for processing.
Controls on the Archive Request Editor, Delete Request Editor, Insert Request Editor, and Load Request
Editor allow you to delegate processing to a machine hosting Optim Server.

For details about the Optim Server, refer to the Installation and Configuration Guide .

Sample Database Tables


Optim is distributed with sample database tables. You can use these sample tables to test and
demonstrate the facilities in Optim.

The sample database tables distributed with Optim, which correlate to the tables used in examples in this
manual, are as follows:
v OPTIM_SALES
v OPTIM_CUSTOMERS
v OPTIM_ORDERS
v OPTIM_DETAILS
v OPTIM_ITEMS
v OPTIM_MALE_RATES
v OPTIM_FEMALE_RATES
v OPTIM_SHIP_TO
v OPTIM_SHIP_INSTR
v OPTIM_STATE_LOOKUP

Note: The tables used in examples in this manual do not contain the prefix “OPTIM_” in their names.

The relationships between pairs of tables in the sample database are shown in the following diagram. The
arrows indicate the flow from parent to child.

8 IBM Optim: Archive User Manual


In this diagram, the relationships between tables are represented by three-letter codes consisting of the
letter "R", the first letter of the parent table, and the first letter of the child table.

The relationships between tables are as follows:


v OPTIM_SALES is a parent of OPTIM_CUSTOMERS (relationship RSC)
v OPTIM_CUSTOMERS is a parent of OPTIM_ORDERS (relationship RCO)
v OPTIM_ORDERS is a parent of OPTIM_DETAILS (relationship ROD)
v OPTIM_ITEMS is a parent of OPTIM_DETAILS (relationship RID)

The sample database includes four additional tables:


v OPTIM_CUSTOMERS2
v OPTIM_ORDERS2
v OPTIM_DETAILS2
v OPTIM_ITEMS2

These four tables are distributed empty and are related in the same way as the similarly named tables
above. The empty tables are provided for demonstrating the facilities in Optim.

For a complete description of the sample database tables, see the Installation and Configuration Guide .

Archive Data
This scenario demonstrates how to use the Archive Process, browse an Archive File, and restore selected
data from an Archive File.

Using Archive to implement an Active Archiving strategy, you can easily obtain a set of referentially
intact data from a production database and copy the data to an Archive File. To streamline your database,
you can delete all or part of the archived data. You can delete data as part of the Archive Process, or you
can defer the deletion. Deferring the deletion gives you the opportunity to review the archived data using
the Browse Utility. Afterward, you can use the Delete Process to delete the desired data from the
database. The archived data remains referentially intact and is easy to search or restore, if necessary.

To archive data, you run an Archive Process to select and copy data to an Archive File. The Archive
Process is controlled by an Archive Request, which you create using the Archive Request Editor.

Scenario Overview

You are the database administrator for a company that sells videos to video stores nationally. The size of
the production database for which you are responsible is increasing relentlessly, affecting the performance
of mission-critical applications and limiting your company's ability to respond to customer needs.
Chapter 2. Processing Flow 9
In the past, there were few viable solutions to this problem, and “business as usual” often meant letting
the production database continue to grow. Now, however, you want to try a new method — Active
Archiving.

With Active Archiving, you can remove infrequently used data from the production database, yet keep
the archived data available to search and selectively restore when needed.

Based on an evaluation of data needed for day-to-day activities, your company decides to archive orders
more than two years old from the production database. To keep the archived orders in context, the
archive must include the customers who placed the orders, each ordered item including unit price and
description, and the order and ship dates. As a result, you will archive data in the CUSTOMERS,
ORDERS, DETAILS, and ITEMS tables and copy the data to an Archive File.

After archiving, you will streamline your database by deleting archived rows in selected database tables.
Specifically, you will delete archived rows from the ORDERS and DETAILS tables, because this
transactional data is out-of-date and infrequently used. However, you will retain the archived rows in the
CUSTOMERS and ITEMS tables, since this data is pertinent to recent and future orders. For example, the
CUSTOMERS table contains master account information such as names and addresses, and the ITEMS
table contains information about each product in inventory. You will delete archived rows from the
ORDERS and DETAILS tables during the Archive Process.

After you delete archived ORDERS and DETAILS rows from the production database and complete the
Archive Process, you will search for a customer's orders in the ORDERS table and browse the related
DETAILS to verify the shipment of a specific item for the customer. To demonstrate the Restore Process,
you will then search for and restore the ORDERS and related DETAILS rows to the production database.

To archive the data, you will:


v Open the Archive Request Editor.
v Specify the Archive Process parameters.
v Define the data to archive by creating an Access Definition — selecting the tables, defining selection
criteria, setting up an archive index, and defining the traversal path.
v Run the Archive Process — to copy the selected data to an Archive File.

The Delete Process, Browse Utility, and Restore Process are discussed in this chapter.
v “Open the Archive Request Editor” on page 65
To begin the Archive Process, open the main window and click File → New → Archive from the menu
to display the Archive Request Editor.
v “Specify the Archive Process Parameters” on page 11
The first step when creting a new Archive Request is to specify the parameters for the Archive Process.
v “Define the Data to Archive” on page 16
After specifying the Archive Process parameters, you must provide an Access Definition.
v “Run the Archive Process” on page 28
After you define the data to archive, you are ready to run the Archive Process.

Open the Archive Request Editor


To begin the Archive Process, open the main window and click File → New → Archive from the menu to
display the Archive Request Editor.

10 IBM Optim: Archive User Manual


You use the Archive Request Editor to create and edit requests for archiving data from a database.

Specify the Archive Process Parameters


The first step when creating a new Archive Request is to specify the parameters for the Archive Process.

Description

A description indicates the type of information in the Archive File or provides other useful information.
Developing a convention for descriptions can help you categorize Archive Files, and when browsing or
restoring data, you can reference the description to focus the search on specific Archive Files. For this
scenario, type Archive Orders for Order-Entry Appl v1.0.

Server Name

Directing resource-intensive processing to a server potentially minimizes network traffic and maximizes
efficiency. Server Name indicates the server or workstation used to run the Archive Process. If the Optim
Server option is not installed (as for this scenario), you must use your local workstation to process the
Archive Request. If the Optim Server option is installed on one or more machines, you can select a server
on which to process the Archive Request.

Chapter 2. Processing Flow 11


Archive File

The Archive File contains the archived data. You can use one or more macros to dynamically create a
unique name for each Archive File created by running this Archive Request. Each time you run the
Archive Process, Archive resolves any macros and generates the file name.

Note: You can use macros to name any file that is generated by Optim, including Archive Index or
Control Files. Macros in file names may be especially useful in a process that is scheduled to run
automatically at specified intervals, so that a new name is generated each time the process is executed.

For this scenario, type scenario<$SEQ>. Using the macro, the sequence number is increased by a single
digit each time Optim generates a file name. The generated number causes the file name for each run to
be unique.

Optim adds the default .af extension for Archive Files. If you do not include a path with the file name,
the default Archive Directory specified in Personal Options is used. If a default Archive Directory is not
specified, the default Data Directory specified in Personal Options is used.

Archive Index File

You can expedite the process of searching for Archive Files to be browsed or restored by creating an
Archive Index File. The Archive Index File contains index information for data in the Archive File. By
default, Archive populates the Archive Index File box with the name of the Archive File, giving it the
default extension .afx. For this scenario, use the default file name.

Note: If you do not index the archived data, an Archive Index File is not created, even if a name is
specified.

Group

A group is a name or tag that you can associate with the Archive File and corresponding archived data.
Developing a convention for groups can help you categorize Archive Files. For example, you might use
the group “HumResrc” for data you archive from payroll and benefits applications. Before browsing or
restoring data, you can reference the group to filter the list of potential Archive Files before you search
them. For this scenario, type ORDERS.

Storage Profile

A Storage Profile allows you to define parameters for creating the Archive File on secondary media and
automatically creating a duplicate Archive File. Examples of secondary media include zip disks and
backup devices. For this scenario, do not specify a Storage Profile.

File Access Definition

A File Access Definition allows you to secure an Archive File by controlling access to the tables and
columns in the file. You can define access permissions for a table, column, or the default setting by
associating it with an access control list. To create a secured Archive File, enter the name of a new or
existing File Access Definition. For this scenario, do not enter a File Access Definition.

Process Options

Process Options allow you to establish safeguards for the Archive Process. You can ensure the process
does not archive an unexpectedly large number of rows and can defer, review, or change a decision to
delete archived data from the database.
Row Limit

12 IBM Optim: Archive User Manual


A row limit is the maximum number of rows to archive. For example, if you expect to archive
fewer than 10 million rows, you can use a row limit to cause the Archive Process to fail if the
number of archived rows exceeds 10 million. A row limit can be any value between 1 and the
maximum limit specified in Product Options.
Database Connections
You can increase the number of concurrent database connections for the Archive Process.
Increasing database connections improves performance by allowing multiple threads to archive
rows concurrently. This option is only available if Maximum Database Connections on the
Database tab of Product Options is 2 or greater. For this scenario, Database Connections is
unavailable.
Defer Delete after Archive
You can delete the data at any time after the Archive Process completes. Archive lets you delete
archived data from the database as part of the Archive Process or defer the deletion of data.
v You can select the Defer Delete after Archive check box to defer the Delete Process. Use this
option if you prefer to review the archived data prior to deleting data from all or selected
tables. For example, after the Archive Process is complete, you can browse the Archive File to
verify the data is as expected. Then, you can use the Delete Process to delete the archived data
from the database.
v You can clear the Defer Delete after Archive check box to delete archived data from the
database as part of the Archive Process. If you clear this check box, the Review Archive Delete
List check box is enabled.
For this scenario, clear the Defer Delete after Archive check box.
Review Archive Delete List
If you select this check box, Archive displays the Delete after Archive Specifications dialog when
you run the Archive Process. The dialog is displayed prior to processing and lists the tables to be
archived. You can review the list to confirm or change the tables from which rows are to be
deleted. For this scenario, select the Review Archive Delete List check box.
Create Report
Selecting this check box enables the Report Options. You can use Report Options to name a
Report Request, and enable access to the Report Request Editor, where reporting parameters can
be defined. For this scenario, leave the Create Report check box cleared.
Generate Statistical Report
You can select this check box to include statistical information in the Archive Process Report. (For
details, see “Statistical Information” on page 94.) For this scenario, leave the Generate Statistical
Report check box cleared.
Process File Attachments
Select this check box to archive file attachments identified in the Access Definition.
Compression Options
Select this button to compress the Archive File. Optim can perform compression at a processing
point that you specify or you can select individual tables to compress. See “General Tab, Archive
Request Editor” on page 69 for the section on Compression Options.

Access Definition Options

An Access Definition describes the set of data to be archived, governing the overall Archive Process. You
can create a Local Access Definition, which is exclusive to the current Archive Request. Another option is
to specify the name of a new or existing Access Definition, which can be used with other process

Chapter 2. Processing Flow 13


requests. Access Definition Options let you specify the type of Access Definition to be used in the Archive
Request. For this scenario, select Local.

Delete Parameters
Because you have cleared the Defer Delete after Archive check box, rows from selected tables are
deleted as part of the Archive Process. You must provide processing parameters for the Delete portion of
the process. Click the Delete tab on the Archive Request Editor.

Complete the elements of the Delete tab as described as follows.

Control File

The Control File records the success or failure of Delete Processing for each row. The process verifies that
each archived row that is selected for deletion matches exactly the corresponding row to be deleted from
the database. Any rows that do not match exactly are discarded—noted in the Control File and not
deleted from the database. After the process is completed, you can browse the Control File to identify the
rows that could not be deleted and to determine the cause.

You can use one of the following methods to specify a Control File:

14 IBM Optim: Archive User Manual


v Select from a list of recently used files by clicking the down arrow.
v Select from a directory by clicking the Browse button.
v Type the file name in the Control File box. Archive adds the default extension .cf. If you do not
specify a path with the file name, the default Data Directory specified in Personal Options is used.

For this scenario, type control as the name of the Control File.

Delete Control File

If you click the Delete Control File button , Archive automatically deletes the Control File at the end
of the process if all rows are successfully deleted from the database.

Delete Options

The following options help you manage the Delete portion of the Archive Process:
Lock Tables
You can lock database tables during processing. A table is locked until all rows are processed.
Locking ensures that other database activity does not interfere with the process, but prevents
other users from accessing tables involved in the process. Since this behavior may be undesirable
for some organizations, permission to lock tables can be denied. For this scenario, clear the check
box.
Compare Row Contents
You can compare rows of data in the Archive File with rows in the database prior to deletion.
Rows are deleted from the database that exactly match rows in the Archive File, and rows that do
not exactly match are discarded and noted in the Control File. For this scenario, leave the check
box selected (default).
Include LOB columns in row comparison
This option is available only if Compare Row Contents is selected. You can include LOB columns
in the row comparison. For this scenario, leave the check box selected (default).
Generate Statistical Report
You can select this check box to include statistical information for the Delete Process in the
Archive Process Report. (For details, see “Statistical Information” on page 94.) For this scenario,
leave the Generate Statistical Report check box cleared.
Commit Frequency
You can specify the number of rows to process before committing changes to the database.
Frequent commits keep locking and use of the database log files to a minimum, but may slow the
process. For this scenario, clear the check box to use the maximum Product Options limit.

Note: If the process ends abnormally, you can use the Restart/Retry Utility to restart the Delete
Process from the last commit point. See the Common Elements Manual .
Discard Row Limit
You can limit the number of rows that can be discarded while deleting rows during the Archive
Process. The process stops after the specified number is reached and all rows in the array are
processed.

Note: This limit is an approximate value due to array processing for the Delete Process. See
“Delete Options” on page 84 for details.

Chapter 2. Processing Flow 15


To process with no limit on the number of rows that can be discarded, specify 0 or leave blank.
For this scenario, specify 0.
Database Connections
You can increase the number of concurrent database connections for the Delete Process. This
improves performance by allowing multiple threads to process rows concurrently. (Available only
if Maximum Database Connections on the Database tab of Product Options is 2 or greater.) For
this scenario, Database Connections is unavailable.

Define the Data to Archive


After specifying the Archive Process parameters, you must provide an Access Definition.

The Access Definition references the tables that contain the data, provides selection criteria for the data,
prescribes the way that relationships between tables are traversed, and provides other specifications such
as index parameters and Archive Actions (userdefined SQL statements, including calls to stored
procedures) to be executed during processing. In other words, an Access Definition defines the data you
want to archive and provides table-specific parameters for processing.

For this scenario, you will create an Access Definition that is Local, or exclusive to the current Archive
Request. You will:
v Select the tables that contain the data you want to archive, and specify delete and archive index
preferences for tables.
v Define selection criteria for the data — in this example, a set of ORDERS more than two years old.
v Define the traversal path — the relationships between tables that Archive traverses and the direction in
which they are traversed during the Archive Process.
v Review the traversal path to ensure the appropriate data is selected.

Open the Access Definition Editor


The first step in the scenario is to select the tables that contain the data that you want to archive. You can
select these tables by using the Access Definition Editor.

To open the Access Definition Editor, click Tools → Edit Access Definition in the Archive Request Editor.
The Access Definition Editor is displayed with Tables as the active tab.

16 IBM Optim: Archive User Manual


You use the Access Definition Editor to create and edit Access Definitions. In the Description box, you
can enter the purpose or function of the Access Definition. For this scenario, type Archive orders older
than two years.

You will use the Tables tab to list the names of tables that contain the desired data and to define
specifications for the data in the listed tables.

Select the Tables


After you open the Access Definition Editor, the next step in the scenario is to select the tables that
contain data that you want to archive.

In this scenario, you will archive information for orders more than two years old. The ORDERS,
CUSTOMERS, DETAILS, and ITEMS tables contain the desired data. Use the options on the Tables tab to
select the tables.

Default Qualifier

The Default Qualifier saves time when you enter table names in the grid, or Table List. A fully qualified
table name has three parts: Dbalias.Creatorid.Tablename. Dbalias is a user-defined name that provides
parameters needed to connect to the database. Creatorid qualifies a table name and often reflects the user
who created it. Tablename is the base table name.

You can use the Default Qualifier to provide one or both parts for you — generally, use a Default
Qualifier that applies to most or all tables in the Table List. To prefix the table names in the Access
Definition in this scenario, enter the Dbalias and Creatorid that correspond to the sample database tables.

Chapter 2. Processing Flow 17


Start Table

Each Archive Process begins with a Start Table — the table from which data is first archived — and
proceeds to obtain related data from the remaining tables in the Table List. Since you want to archive a
specific set of data related to orders more than two years old, as determined by dates in a column in the
ORDERS table, you must specify ORDERS as the Start Table. Archive automatically places ‘ORDERS' in
the first line of the Table List.

If you do not specify a Start Table, the first name entered in the Table List is the assumed Start Table. You
can change the Start Table by typing a new name or selecting from the Start Table drop-down list, or
right-clicking a name on the Table List and selecting Set as Start from the shortcut menu.

Table List

The Table List references tables from which data is archived. When you add a table name to the Table
List, Archive automatically displays the type of object referenced by the table name and the name of the
DBMS for the table.

You can use two methods to add table names to the list. One method is to type names in the Table/View
column. An easier method, however, may be to let Archive find the tables that contain related data. Using
the Select Table(s) dialog, you can direct Archive to list tables related to the Start Table. You can review
the list and select tables you want to include in the Archive Process.

Select Tables Dialog

To display the Select Table(s) dialog, right-click the ORDERS table name in the Table List and select Add
Tables from the shortcut menu. The dialog provides a list of tables, based on the Default Qualifier.

To limit the list to tables related to the ORDERS table, use the options in the Find Tables Related to Table
area. Select the Find Tables Related to Table check box, ensure default settings Both and All Levels are
selected, and click Display.

18 IBM Optim: Archive User Manual


Note: The default settings ensure that Archive retrieves all related tables (children, parents, grandparents,
grandchildren, and so on) for the entire data model.

Locate the following tables in the list: CUSTOMERS, DETAILS, and ITEMS. Select each table while
pressing the Ctrl key and click Select to add the tables to the Table List in the Access Definition.

Choose the Data to Delete


After you select the tables that you want to archive, the next step in the scenario is to specify whether
you want to delete rows that are archived by the Archive Process.

In the Archive Process, you copy selected data to an Archive File. You can delete archived data from all
or selected database tables during the Archive Process or you can defer the delete.

Deferring the deletion of archived data gives you the opportunity to verify the data after the Archive
Process is complete. For example, you can browse the Archive File to ensure the correct data is archived
before using the Delete Process to delete the archived data from the database.

Regardless of whether you delete during the Archive Process or defer the delete, you must indicate the
data intended for deletion. That is, the database tables from which archived rows are to be deleted. You
can identify the tables in the Access Definition or in the Archive Delete List on the Delete After Archive
Specifications dialog.

For this scenario, you will streamline your database by deleting archived rows from the ORDERS and
DETAILS tables. You intend to retain the archived rows in the CUSTOMERS and ITEMS tables, because
this data (names, addresses, and information about each product in inventory) is pertinent to recent and
future orders.

Chapter 2. Processing Flow 19


To delete the selected rows from each table, select the Delete Rows After Archive check boxes for
ORDERS and DETAILS.

When defining the Archive Process parameters earlier in this scenario, you chose to delete rows as part of
the Archive Process. After you run the Archive Process, Archive will remove archived rows from the
ORDERS and DETAILS tables.

Understand Table Specifications


Table specifications provide display and criteria parameters for data. You can provide specifications for
any table in the Table List by rightclicking the table name and selecting a Table Specifications option
from the shortcut menu.

A brief description of each option follows:


Columns
Select columns to be included and excluded from a Point and Shoot display. You can use the
Point and Shoot facility to visually select specific rows from the Start Table.
Selection Criteria
Specify criteria to select rows according to values in one or more columns in a table.
SQL Create an SQL Where clause for complex selection criteria, for example, criteria that requires a
combination of OR and AND logical operators.
Sort Arrange Start Table rows in a Point and Shoot display according to values in one or more
columns.
Archive Actions
Define user-written SQL statements, including calls to stored procedures, to be executed at
predefined points in an Archive or Restore Process.
Archive Index
Establish index parameters for a column (or set of columns).
File Attachments
Provide parameters needed to archive a file referenced within or associated with a row of
extracted data and include it in an Archive File.

In this scenario, you will use table specifications to specify selection criteria for the data you want to
archive and to establish an Archive Index. The next sections demonstrate how to accomplish these tasks.

Specify Selection Criteria for the Data


The next step in the scenario is to select the data that you want to archive using selection criteria.

Selection criteria allow you to pinpoint the data you want to archive. You can select data according to
values in one or more columns. Selection criteria must conform to SQL syntax and include relational or
logical operators.

For example, you can select data for archiving by:


v Age — determined by values in one or more DATE columns.

20 IBM Optim: Archive User Manual


v Values in one or more columns — such as an ‘inactive' indicator.
v Manually selecting rows in the Start Table using Point and Shoot.

In the following examples, the operators and syntax may not be valid for all database management
systems. However, the functions demonstrated are universal.

Example 1

To archive data for all customers with names beginning with the letter A, from Pennsylvania, you can
specify:
CUSTNAME
LIKE ‘A%'
STATE
= ‘PA'

Example 2

To archive data for an item that is no longer sold to customers (for example, The Man Who Would be
King), you can specify:
ITEM_ID
= ‘AD013'

Select Rows on the Basis of Date

In this scenario, you will archive information for orders more than two years old. You can define
selection criteria for the data based on values in a DATE column — particularly, the value in the
ORDER_DATE column in the ORDERS table. To accomplish the task, you can use a unique operator
provided by Archive.

The syntax for the operator is: BEFORE (nD, nW, nM, nY)

The D, W, M, and Y arguments, in any combination, indicate the number of days, weeks, months, or years
subtracted from the current date at runtime. Rows with a date older than the calculated date are
archived.

The BEFORE operator allows you to specify generic criteria for an Archive Request, which can be
scheduled to run repeatedly. For example, if you wish to retain data for no more than 5 years, you can
specify:

BEFORE(5Y)

as selection criteria for an Archive Request and schedule the Archive Process to run automatically every
quarter, without having to change the selection criteria for each run.

In the Table List, right-click the ORDERS table name. On the shortcut menu, click Table Specifications →
Selection Criteria. The Table Specifications dialog is displayed with Selection Criteria as the active tab.

Chapter 2. Processing Flow 21


In the Selection Criteria column, type BEFORE(2Y) as selection criteria for ORDER_DATE. To return to the
Table List, click File → Close or click the Close button in the title bar. Note the presence of the Selection
Criteria icon in the Table List.

Define an Archive Index


After you select the data that you want to archive using selection criteria, the next step in the scenario is
to establish Archive Indexes for your archived tables.

You can establish one or more Archive Indexes for each archived table. An Archive Index consists of
values in one or more Index Columns. Archive Index information is stored in an Archive Index File,
which Archive can search more quickly than it can search an entire Archive File. When you browse or
restore data, Archive will determine if it can use an index to expedite the search.

Using the Archive Index tab in the Table Specifications dialog, you can create as many as 16 Archive
Indexes for each table in the Archive File. In this scenario, you will create one Archive Index of values for
CUST_ID in the CUSTOMERS table, since you anticipate searching Archive Files based on values for
customer ID.

In the Table List, right-click the CUSTOMERS table name. On the shortcut menu, click Table
Specifications → Archive Index. The Table Specifications dialog is displayed with Archive Index as the
active tab.

22 IBM Optim: Archive User Manual


Note: Initially, the name of the table for which you opened the shortcut menu is displayed. To edit
specifications for another table in the Table List, you can select the name from the Table drop-down list.

Index names are generated by default, in the form Indexn, where n is a sequential number that provides
a unique name for each index. For this scenario, use the default index name.

Available Columns lists columns in the selected table that you can use as Index Columns. Double-click
CUST_ID to add the column name to the Index Columns list. The column is defined as an Index Column.
You can also drag a column name from Available Columns to Index Columns.

Note: If the index consists of more than one Index Column, you can change the order of the columns in
the index by dragging a column name to the desired position. The order determines the sequence in
which the column values are searched.

When finished, click File → Close to save the Archive Index specifications and return to the Access
Definition Editor. Note the presence of the Archive Index icon in the Table List. The Archive Index
created in the Archive Process will be used later in this scenario.

Review Table Specifications


After you establish Archive Indexes for your archived tables, the next step in the scenario is to review the
table specifications to ensure that they are correct.

Icons on the Table List indicate the table specifications used in this scenario.

Chapter 2. Processing Flow 23


The Selection Criteria icon indicates that selection criteria is specified for the ORDERS table.

The Archive Index icon indicates that an Archive Index is defined for the CUSTOMERS table.

You can click an icon to quickly display the table specifications on the corresponding tab in the Table
Specifications dialog.

Define the Traversal Path


After you review the table specifications, the next step in the scenario is to define the traversal path. That
is, you select the relationships to be used and the direction in which the relationships are traversed —
from parent to child, from child to parent, or in both directions — during the Archive Process.

24 IBM Optim: Archive User Manual


The traversal path determines the sequence in which Archive selects data from tables referenced in the
Access Definition. Consider the database structure of the tables you selected for archiving.

In the diagram and in the following discussion, the relationships between tables are indicated by a
three-letter code: the letter "R", the first letter in the name of the parent table, and the first letter in the
name of the child table.

ORDERS is the Start Table, because you want to archive a specific set of data related to ORDERS more
than two years old. Based on the relationships between each pair of tables:
v CUSTOMERS is a parent of ORDERS (relationship RCO).
v ORDERS and ITEMS are parents of DETAILS (relationships ROD and RID).

To obtain the desired set of data for this scenario, you will include relationships RCO, ROD, and RID in
the Archive Process and specify the direction in which Archive traverses them.

You use the options on the Relationships tab to define the traversal path for selecting data from the
tables referenced in the Access Definition.

Chapter 2. Processing Flow 25


All relationships between pairs of tables in the Table List are displayed. The parent table and the
corresponding child table in each relationship is provided.

Review Status

Each listed relationship has a status, which indicates:


New Relationship is listed for the first time. The status of a relationship is New the first time the list is
displayed after:
v A new relationship between tables on the list is defined.
v A table is added to the list.
(Once you have viewed the relationship, the status is no longer new, which is indicated by a
blank status the next time you display the Relationships tab.)
When you run the Archive Process, a warning message advises you of any new relationships.
Although you may proceed despite the warning, it may be prudent to review the relationship
usage list, which is the point of the warning.
blank Relationship is defined and is not new to the list.
Ref Relationship is ignored because the parent or child table is a reference or lookup table, as
specified on the Tables tab.
Unknown
Relationship does not exist. This condition can occur when a change in Default Qualifier causes a
new set of tables and relationships to be referenced in the Access Definition. Relationships with
Unknown status are ignored during a process. To remove a relationship in Unknown status,
right-click to open the shortcut menu and select Remove or Remove All Unknown.

26 IBM Optim: Archive User Manual


The Use new relationships check box is selected by default to include all relationships with a New status
in the Archive Process. If you clear this check box, you must manually select new relationships to include
them in an Archive Process. Clearing the check box ensures that a completed Access Definition is not
affected by the addition of a new relationship.

Select Relationships

The Select column determines whether a relationship is used in the Archive Process. For this scenario,
verify that check boxes for relationships ROD, RCO, and RID are selected.

Specify Options 1 and 2

By default, the Archive Process begins at the Start Table and proceeds through the data model, traversing
selected relationships from parent to child — ORDERS to DETAILS. Specifically, Archive obtains rows
from ORDERS that match your selection criteria and then traverses the relationship ROD to obtain related
DETAILS rows, the children of ORDERS.

However, to select related data from ITEMS and CUSTOMERS, Archive must traverse the remaining
relationships from child to parent. For example, to obtain CUSTOMERS rows related to ORDERS and
maintain referential integrity, Archive must traverse the relationship RCO from child to parent. Similarly,
to obtain ITEMS rows related to DETAILS, Archive must traverse the relationship RID from child to
parent.

You can use the Options check boxes to extend the traversal path:
v Option (1) determines whether Archive traverses a relationship from child to parent and archives a
parent row for each selected child row. By default, Option (1) is selected. As a result, this setting
maintains the relational integrity of the data.
v Option (2) determines whether additional child rows are archived when a parent row is archived
because of Option (1). In other words, if Archive has traversed a relationship from child to parent and
archived a parent row, all children of that parent are archived when Option (2) is selected. By default,
Option (2) is cleared.

Examples

The Option (1) and Option (2) specifications are relevant when:
v The Start Table is a child table. For example, if the ORDERS table is the Start Table, the Option (1)
setting determines whether the related CUSTOMERS rows are extracted and, if so, the Option (2)
setting determines if additional ORDERS rows, related to the CUSTOMERS rows, are selected.
v A table has more than one parent table. For example, if the ITEMS table is the Start Table, related rows
are extracted from the DETAILS table because it is a child of the ITEMS table. However, the ORDERS
table is also a parent of the DETAILS table. The Option (1) setting determines whether Archive then
traverses from child to parent to extract the ORDERS rows related to the DETAILS rows and, if so, the
Option (2) setting determines if additional DETAILS rows, related to the ORDERS rows, are selected.

In this scenario, the default settings for each relationship direct Archive to:
v Select data from rows in the ORDERS table, which meet the selection criteria BEFORE(2Y) for
ORDER_DATE.
v Select parent rows from the CUSTOMERS table because Option (1) is selected for the relationship RCO
between CUSTOMERS and ORDERS.
v Select child rows from the DETAILS table to follow the basic traversal path from parent to child for the
relationship ROD between ORDERS and DETAILS.
v Select parent rows from the ITEMS table because Option (1) is selected for the relationship RID
between DETAILS and ITEMS.

Chapter 2. Processing Flow 27


Review the Traversal Path
After defining the traversal path but prior to running the Archive Process, verify that the appropriate
data will be archived.

Use the Show Steps option to display the steps to be performed in the Archive Process.

Click Tools → Show Steps to display a narrative that describes the traversal path.

To return to the Relationships tab, click File → Close. Then click File → Update and Return to update the
Access Definition and return to the Archive Request Editor.

Note: See the Common Elements Manual for additional information about using Access Definitions.

Run the Archive Process


After you define the data to archive, you are ready to run the Archive Process.

If the Archive Process is to be run on a scheduled basis, you can click File → Schedule to establish the
date and time for the first Archive and intervals for subsequent Archives. For this scenario, however, click
File → Run. The process begins, and the Archive Request Progress dialog displays status information.

28 IBM Optim: Archive User Manual


Note: In the Archive Request Progress dialog, the Delete area appears dimmed if you chose to defer the
deletion of archived rows. Also, the Report area is dimmed if you did not specify a Report Request.

Before commencing the Delete portion of the Archive Process, Archive displays the Delete After Archive
Specifications dialog.

Chapter 2. Processing Flow 29


You can use this dialog to review or override your delete selections before proceeding with the Delete
portion of the Archive Process.

30 IBM Optim: Archive User Manual


Chapter 2. Processing Flow 31
Note: The report information displayed in the sample illustration might vary from the results displayed
on your workstation.

If you delete archived rows as part of the Archive Process, information regarding the Delete Process
follows the Archive Process Report.

You can optionally save or print the Archive Process Report. Click File → Save As to save the report or
click File → Print to print the report. Then click File → Close to return to the Archive Request Editor.

If you close the report and need to refer to it again, click File → Redisplay Results. Then select Current to
redisplay the report from the last Archive Process run (from the current instance of the Archive Request
Editor), or All to display a list of all retained Archive Process Reports. For details about retaining process
reports, refer to the Common Elements Manual information on .

Save the Archive Request


To be reused or processed on a scheduled basis, an Archive Request must be saved. For this scenario,
save the Archive Request.

In the Archive Request Editor, click File → Save to display the Save the Archive Request dialog.

Developing a naming convention for Archive Requests can be a useful way to organize requests for easy
access. To identify the Archive Request for this scenario, type PSTDEMO.SCENARIO1 in the Enter pattern for
Archive Request box and click Save.

When finished, click File → Close to close the Archive Request Editor.

Note: See Chapter 3, “Archive,” on page 63 for additional information about the Archive Process.

32 IBM Optim: Archive User Manual


Browse Archived Data
Using the Browse Utility, you can quickly and easily review data stored in an Archive File.

For example, you can browse an Archive File to:


v Satisfy a customer inquiry, without having to restore a single row to a database.
v Ensure the archived data is as expected, before deleting any data from the database.
v Determine if the file is appropriate for a Restore Process.

When searching archived data, you can begin with data in any archived table and join to related data in
other archived tables. For example, even though orders-related information was archived on the basis of a
date in the ORDERS table, you can look for archived information pertaining to a specific item by
browsing archived rows from the ITEMS table and joining to related rows in other tables.

This section demonstrates how to use the Browse Utility.

Scenario Overview

In the Archive Process, you copied selected data to an Archive File and deleted archived rows from the
ORDERS and DETAILS tables.

Archive Directory Maintenance allows you to search for data in Archive Files. When combined with the
Browse Utility, this search capacity provides a powerful way to resolve a problem or answer a customer
inquiry, without restoring archived data. For this scenario, you will browse archived data from the
CUSTOMERS table, joining to related rows in the ORDERS table and the DETAILS table to confirm that a
specific item was ordered and shipped more than two years ago.

To browse the data, you will:


v Search for an Archive File that contains orders for the inquiring customer.
v Open the Archive File — the Archive File created earlier in this scenario.
v Select a table to browse — the CUSTOMERS table — and locate the row for the inquiring customer.
v Join a table — the ORDERS table, then the DETAILS table, to confirm the item in question was ordered
and to provide the order and shipment dates to the customer.
v “Search Archive Files”
To browse data, you first search for an Archive File that contains orders for the inquiring customer.
v “Select a Table to Browse” on page 39
After you open an Archive File, you can select a table to browse within the Archive File.
v “View Related Data” on page 40
When you browse data within a table, you can use the Join facility to join to tables related to the
displayed data. This feature is useful for reviewing related data. You can join to one, several, or all
directly related tables in one join operation.

Search Archive Files


To browse data, you first search for an Archive File that contains orders for the inquiring customer.

Archive stores each Archive File in the file system location you specify in the Archive Request. In
addition, Archive creates an Archive Directory entry for the Archive File. The Archive Directory entry is
in the Optim Directory and includes the:
v Archive File name and location.
v Group and description (as entered in the Archive Request Editor).
v Optim Server (machine on which the Archive File was created).
v User ID of the person who created the Archive File and creation date.

Chapter 2. Processing Flow 33


When browsing or restoring archived data, you can locate Archive Files and associated Archive Indexes
automatically, on the basis of information in the Archive Directory, or you can browse the file system to
visually select a file. For this scenario, you will use the Archive Directory to locate Archive Files that
include information for the customer.

Display Archive File Entries


To start the search for an archive file, click Utilities → Archive → Directory Maintenance in the menu on
the main window.

The Archive Directory Maintenance and Archive File Filters dialogs open at the same time, with the
Archive File Filters dialog on top.

You can use the Archive File Filters dialog to limit the list of Archive File entries displayed in the Archive
Directory Maintenance dialog. By entering patterns and text in the appropriate boxes, you can list entries
for Archive Files that meet all filter criteria. For example, you can:
v Enter a specific file name, Optim Server name, group, creator ID, table name, or description. You can
enter a pattern for any of these using the % (percent) symbol and the _ (underscore) as wildcards.
v Enter a date range to limit the list to entries for Archive Files created within a specific time frame.

For this scenario, the customer question involves the order-entry application. Under the Archive File
naming conventions at your site, Archive Files that contain data from the order-entry application are
given the Group designation “ORDERS.” For this scenario, you will type ORDERS as the Group filter.
Accept the wildcard entered by default for the remaining filters and click OK. The Archive Directory
Maintenance dialog is displayed.

34 IBM Optim: Archive User Manual


Note: Using the filter will probably list only the file created for this scenario. The Archive Directory
Maintenance dialog used for illustration shows files as though the Archive Process had been run
quarterly for several years.

You can browse an Archive File by right-clicking the name on the Archive Directory Maintenance dialog
and clicking Browse Archive File from the shortcut menu. Before doing this, however, you can instruct
Archive to search Archive Indexes and Archive Files associated with the listed entries and remove any
entries for Archive Files that do not contain data in which you are interested. Selected check boxes in the
Searchable grid column indicate that Archive can search the Archive File or Archive Index that
corresponds to the listed Archive Directory entry.

Note: Any place an Archive File name is displayed, you can browse the file by right-clicking the file
name and clicking Browse Archive File from the shortcut menu. You can also browse an Archive File. To
do this, first click Utilities → Browse from the menu on the main window to open the Browse dialog. You
can then open the File menu on the Browse dialog to select the file to be browsed. The search capacity
described here is available only from the Archive Directory Maintenance dialog or the Select Archive
File(s) dialog. See “Enter Search Criteria” on page 48 for information about the Select Archive File(s)
dialog.

Set Personal Options


To determine how the search proceeds and how the results are displayed, you will temporarily open
Personal Options and set the Only Use Index to Perform Search and Automatically Trim Search List
options on the Archive tab.

In the main window, click Options → Personal from the menu to display the Personal Options dialog.
Then click the Archive tab.

Chapter 2. Processing Flow 35


Only Use Index to Perform Search

When you clear the Only Use Index to Perform Search check box, Archive initially searches for matches
in the Archive Index Files, if any are present. An index search can be a more expedient way to find
archived data, but may not be definitive when you search an unindexed column. If the Archive Index
information is inadequate to determine a match for the search criteria, or an Archive Index File is not
available, Archive checks the Archive File to resolve the search.

You can select the Only Use Index to Perform Search check box to search only the Archive Indexes for
possible matches to the specified criteria. Shortcut menu commands Resolve and Resolve All enable you
to complete the search by searching the data in the Archive File when a match cannot be determined
from Archive Index information. This can happen when you search an unindexed column.

Selecting Only Use Index to Perform Search is especially useful if you use an external application to
remove Archive Files from disk storage. You can search Archive Indexes to determine the Archive Files
that must be returned to disk storage for future processing.

For this scenario, ensure that the Only Use Index to Perform Search check box is clear.

36 IBM Optim: Archive User Manual


Automatically Trim Search List

You can select the Automatically Trim Search List check box to automatically exclude any Archive Files
from the Archive Directory Maintenance dialog that are not possible matches. For this scenario, select this
check box.

When finished, click OK to close the Personal Options dialog. You are ready to enter the search criteria
for the entries listed on the Archive Directory Maintenance dialog.

Search Criteria

Right-click in the grid and click Search → All Media from the menu to display the Index Search Selection
Criteria dialog.

The customer that has asked for information about the archived order is Pick-a-Flick in Kissimmee,
Florida. The CUST_ID for Pick-a-Flick is ‘00026'. Archive can search indexes for all Archive Files listed on
the Archive Directory Maintenance dialog using criteria you supply. Click Operator for the CUST_ID
column, select the = operator from the drop-down list, and type 00026 in Selection Criteria. Use the close
button to close the Index Search Selection Criteria dialog.

When Personal Options are set to Automatically Trim Search List, only Archive Files that include data
that matches the search selection criteria are displayed on the Archive Directory Maintenance dialog.

Chapter 2. Processing Flow 37


At this point, you know that the listed Archive File contains data for Customer 00026. You do not know,
however, if archived orders for Customer 00026 include an order for Item DC002, a documentary that the
customer is trying to trace.

Right-click the Archive File name and click Browse Archive File to display the Browse Archive File
dialog.

38 IBM Optim: Archive User Manual


The Tables tab displays the fully qualified name and total number of extracted rows for each table in the
Archive File.

The Information tab provides information about the Archive File, including the user ID for the person
that ran the process in which the Archive File was created, the workstation where the Archive File was
created, the date and time the Archive File was created, and the server that processed the request.

Select a Table to Browse


After you open an Archive File, you can select a table to browse within the Archive File.

You can browse data in any table in an Archive File. To display rows in the CUSTOMERS table,
double-click the table name. In the Browse Archive File Table Data dialog, a browse window displays the

data.

The browse window toolbar lets you select display options and menu choices that pertain to the display.
For example, you can display or hide column attribute information, join and unjoin tables to view related
data, and switch the display format. Shortcut menu commands, available when you right-click a column
heading, allow you to find, include, or exclude rows that contain specific data.

Data is in columnar format (column names are displayed across the top and data is displayed in columns
beneath headings) or sidelabel format (column names are on the left and a row of data is displayed to the
right of headings). The sidelabel format is useful if you want to view all columns or data in a wide
column for a row, without having to scroll the display horizontally. The default format is set in Personal

Options; however, you can switch the display format using the Columnar toolbar button and the

Sidelabel toolbar button .

To determine if Customer 00026 ordered Item DC002, you must first locate the CUSTOMERS row with
CUST_ID 00026. Right-click a column heading and click Find from the shortcut menu to display the Find
dialog.

Chapter 2. Processing Flow 39


Type 00026 in Find what and, on the Columns tab, select CUST_ID. When you click Find Next, the
Browse Archive File Table Data dialog is scrolled to the CUSTOMERS row for CUST_ID 00026 and
“00026” is highlighted. To determine if this customer ordered Item DC002, you must join to the ORDERS
table to browse related Orders rows and, from ORDERS, join ITEMS to browse related Items rows.
(Before going on to view the related date, close the Find dialog.)

View Related Data


When you browse data within a table, you can use the Join facility to join to tables related to the
displayed data. This feature is useful for reviewing related data. You can join to one, several, or all
directly related tables in one join operation.

Join

In the grid, right-click the row highlighted when you clicked Find Next. Click Join from the shortcut
menu to display the Select Join Table dialog.

40 IBM Optim: Archive User Manual


One table is related to CUSTOMERS: ORDERS is the child of CUSTOMERS. Join to ORDERS by
double-clicking the table name.

Related data is displayed in an additional browse window.

Join Arrow

You can see that Pick-a-Flick has several archived orders in the Archive File, but you must join to the
archived DETAILS rows to determine if any of the four include Item DC002. In the ORDERS browse
window, click the Join Arrow button to open the Select Join Tables dialog and double-click DETAILS
to display the Select Join Table dialog.

Chapter 2. Processing Flow 41


The names of tables directly related to ORDERS are displayed: CUSTOMERS is the parent of ORDERS,
and DETAILS is the child of ORDERS. Join to DETAILS by double-clicking the table name. Related data
is displayed in an additional browse window.

42 IBM Optim: Archive User Manual


Current Row Indicator

In the Current Row Indicator column, click the cell next to an ORDERS row to display the related
DETAILS rows. To move to a different row, scroll the ORDERS window and click the Right Arrow grid
cell for the desired row. Notice that when the current row indicator is on the row for ORDER_ID 375,
the DETAILS window shows that 12 copies of Item DC002 were included in the order. By scrolling the
ORDERS window to the right, you can record the date the order was posted and the date it was shipped,
in order to provide this information to the customer, Picka-Flick.

When finished, return to the Archive Directory Maintenance dialog by closing the Browse Archive File
Table Data and Browse Archive File dialogs.

Note: See the Common Elements Manual for additional information about the Browse Utility.

Restore Archived Data


Using the Restore Process, you can easily locate one or more Archive Files that contain data you want to
restore and restore the data to the original or a new database.

For example:
v If the need arises, you can restore archived data to the production database so that your application
can access the information.
v If archived data is required for analysis or reporting, you can restore the data to a staging database.
v If the data model has changed, you can restore archived data to the new model or to a different
database.

To restore data, you run a Restore Process to insert or load data into a database. The Restore Process is
controlled by a Restore Request, which you create using the Restore Request Editor. A Restore Request
provides the instructions needed to restore data to a database, listing the Archive File or Archive Files
containing the desired data, specifications for restoring all or part of the data, and the method used to
restore the data—either the Load or Insert Process.

This section explains how to use the Restore Process.

Scenario Overview

At the start of this scenario, your production database included information for out-of-date orders. You
archived a relationally intact set of data from the ORDERS, CUSTOMERS, DETAILS, and ITEMS tables
and, to streamline the database, deleted the archived rows from the ORDERS and DETAILS tables.

To accomplish these tasks, you created an Archive Request. In the Archive Request, you specified the
Archive Process parameters (such as the Archive File to contain the data) and the Access Definition to be
used in the Archive Process. In the Access Definition, you defined the data to copy to an Archive File,
selected the tables from which rows were to be deleted, and specified other parameters such as Archive
Index information. You then ran the Archive Process and, as part of the Archive Process, deleted archived
rows from the ORDERS and DETAILS tables.

Recently, Customer 00026 (Pick-a-Flick from Kissimmee, Florida) called to inquire about an order which
you researched, using the Browse Utility, and for which you provided order and ship dates to the
customer. After reviewing its records, Pick-a-Flick now disputes this order. Consequently, the order must
be restored.

To restore the data, you will:


v Open the Restore Request Editor.
v Define Restore Process options.

Chapter 2. Processing Flow 43


v Locate the Archive File that contains the customer's orders and add it to the Restore Request.
v Define the subset of data to restore by applying local selection criteria and modifying the Access
Definition.
v Select the Insert Process as the restore method.
v Create an Insert Request.
v Run the Restore Process.
v “Open the Restore Request Editor” on page 212
To restore archived data, first open the Restore Request Editor.
v “Locate the Archive File” on page 46
After you have specified the options for restoring information, locate the Archive File that contains the
customer's orders and add it to the Restore Request.
v “Apply Local Selection Criteria” on page 50
After you locate the Archive File from which you want to restore data, refine the subset of data to
restore by applying local selection criteria and modifying the Access Definition.
v “Modify the Access Definition” on page 51
Define the subset of data to rstore by applying local selection criteria and modifying the Access
Definition.
v “Choose a Restore Method — Insert or Load” on page 54
After adding the Archive File name, establishing local selection criteria, and modifying the Access
Definition, you must select the method used to restore the data to the database.
v “Specify Insert Process Parameters” on page 54
In the Restore Request Editor, select Insert as the Restore Process option.
v “Run the Restore Process” on page 59
After you specify the insert process parameters for the Restore Process, you are ready to run the
Restore.

Open the Restore Request Editor


To restore archived data, first open the Restore Request Editor.

In the main window, click File → New → Restore from the menu to display the Restore Request Editor.

44 IBM Optim: Archive User Manual


You use the Restore Request Editor to create and edit requests for restoring data to a database. The
Restore Request Editor has two main areas. You use the upper area to select Restore Process options, list
the Archive Files containing the desired data, and define the data to be restored. You use the lower area
to select the method for restoring the data, either the Insert Process or the Load Process, and to specify
Insert or Load Process parameters.

In the Description box, you can enter text that describes the purpose or function of the Restore Request.
Developing a convention for descriptions can help you categorize Restore Requests. For this scenario,
type Restore Order for Customer.

Select Restore Process Options


Use Restore Request options to manage the Restore Process.
Automatically Generate Subset Extract Files at Runtime
When you restore part of an Archive File (that is, perform a selective restore using selection
criteria), the subset of data to restore is copied to a Subset Extract File. Archive then restores the
data from the Subset Extract File.
v Select this check box to generate a name for each Subset Extract File, as needed. Generated
Subset Extract File names are in the form PSTnnn.xf. The files are stored in the location
specified on the Archive tab in Personal Options: in the default Data Directory or, if specified,
in the Temporary Work Directory.
v If you clear this check box, you must type a Subset Extract File name in the Archive Files grid
for each Archive File to which you apply selection criteria. If the name you provide is not fully
qualified, the Subset Extract File is stored in the default Data Directory.
For this scenario, select the Automatically Generate Subset Extract Files at Runtime check box.

Chapter 2. Processing Flow 45


Compress Subset Extract Files
You can select this check box to automatically compress Subset Extract Files. For this scenario,
clear this check box.
Delete Subset Extract File after successful Restore
You can select this check box to automatically delete any Subset Extract Files created during the
Restore Process, if the process is successful. If you retain a Subset Extract File, you may reuse it.
For this scenario, clear this check box.
Continue Processing if Errors
If restoring data from several Archive Files, you can select this check box to process any
remaining Archive Files after an error condition. (No prompt is displayed.) For this scenario, clear
this check box.

Locate the Archive File


After you have specified the options for restoring information, locate the Archive File that contains the
customer's orders and add it to the Restore Request.

For each Archive Process, Archive stores the Archive File in the file system location you specify. In
addition, Archive creates an Archive Directory entry for the Archive File. The Archive Directory entry is
in the Optim Directory and includes the:
v Archive File name and location.
v Group and description (as entered in the Archive Request Editor).
v Optim Server (machine on which the Archive File was created).
v User ID of the person who created the Archive File and creation date.

For the Restore Process, you can locate Archive Files and associated Archive Indexes automatically, on the
basis of information in the Archive Directory, or you can manually browse the file system. You can then
add the Archive Files to the Restore Request.

List Archive File Entries


The first step in locating an Archive File that contains a customer's orders is to right-click the Archive
Files grid in the Restore Request Editor and click Add Archive File(s) → Archive Directory Index.

The Select Archive File(s) and Archive File Filters dialogs open at the same time, with the Archive File
Filters dialog on top.

46 IBM Optim: Archive User Manual


The Archive File Filters dialog is the same as that described in page “Display Archive File Entries” on
page 34. In this case, however, it is used to limit the list of Archive File entries displayed in the Select
Archive File(s) dialog. By entering patterns and text in the appropriate boxes, you can list entries for
Archive Files that meet all filter criteria. Type ORDERS in the Group filter. Accept the wildcard entered by
default for the remaining filters and click OK. The Select Archive File(s) dialog is displayed.

Chapter 2. Processing Flow 47


Note: Using the filter will list only the file created for this scenario. The Select Archive File(s) dialog used
for illustration shows files as though the Archive Process had been run quarterly for several years.

You use this dialog to select entries for Archive Files that contain the data to restore. When you select an
entry, the Archive File is listed on the Restore Request.

In addition to the information from the Archive Directory, the status of the associated Archive File and
the search status of the entry are displayed. Archive File status indicates whether the Archive File or the
Archive Index File is accessible. Search status indicates the result of searching the file or index.

Moreover, you can further refine the list of entries by specifying Archive File Filter parameters at the
bottom of the dialog, or by searching Archive Files using selection criteria for values within the archived
data.

Enter Search Criteria


You can search Archive Files for which entries are listed on the Select Archive File(s) dialog. By entering
column criteria or SQL Where clauses for a table, you can find Archive Files that contain specific data.

In the Select Archive File(s) dialog, right-click the grid and select Search All from the shortcut menu. The
Index Search Selection Criteria dialog is displayed.

48 IBM Optim: Archive User Manual


The Table drop-down list provides the names of tables in the Archive Files for which entries are listed on
the Select Archive File(s) dialog. Because you want to restore orders for a specific customer, select
CUSTOMERS.

In this scenario, you want to restore data for an order placed by PickaFlick, which is identified by
customer ID 00026. To locate the Archive File(s) that contain the orders, you will use this value as search
criteria. For CUST_ID, click the Operator column and select =. Then type 00026 in the Selection Criteria
column.

In addition, to obtain the disputed order and related details, select ORDERS from the Table drop-down
list. For ORDER_ID, select = as the operator and type 375, without delimiters, in the Selection Criteria
column.

Search the Files

To begin the search, click File → Close from the menu. Archive searches Archive Indexes for the Archive
Files listed on the Select Archive File(s) dialog. If an Archive Index is inadequate for the search, the
Archive File is also searched. In this scenario, Archive locates customer ID 00026 using the Archive Index
File but must search the Archive File to determine if order ID 375 is present.

When the search is finished, Archive Files with data that meets the search criteria are listed on the Select
Archive File(s) dialog.

Chapter 2. Processing Flow 49


Only one Archive File, the file created earlier in this scenario, contains data that matches the search
criteria. If, however, you searched indexes for a list of Archive Files as described in “List Archive File
Entries” on page 46 and matching data was found in two or three files, entries for those files would
remain on the list.

Selecting the Automatically Trim Search List check box in Personal Options causes Archive to remove
entries from the list for which no match is found.

Select the File

Having limited the list to entries for Archive Files that contain matching data, click Select All to list the
Archive File on the Restore Request.

Apply Local Selection Criteria


After you locate the Archive File from which you want to restore data, refine the subset of data to restore
by applying local selection criteria and modifying the Access Definition.

So far, you have searched for and located the Archive File that contains order 375 for customer 00026,
Pick-a-Flick. For this scenario, one file is to be restored.

If restoring data from several Archive Files in a single Restore Process, you can define global criteria that
generally applies to all files in the process. You can also override the global criteria by defining local
criteria for selected Archive Files. By default, any selection criteria used to search Archive Files is copied
to the Restore Request as local criteria for the matching Archive File.

To review the criteria, right-click the Archive File name in the Archive Files grid and click Apply Local
Selection Criteria from the shortcut menu. The Local Selection Criteria dialog is displayed.

50 IBM Optim: Archive User Manual


In the Table drop-down list, select CUSTOMERS. Note that the criteria you used when searching the
Archive Files is copied to the Restore Request as local selection criteria. The criteria for ORDERS is also
copied to the Restore Request.

After reviewing, click File → Close from the menu to return to the Restore Request Editor. LOCAL
appears in the Sel Crit column, which indicates that local selection criteria has been applied to the
Archive File.

Modify the Access Definition


Define the subset of data to restore by applying local selection criteria and modifying the Access
Definition.

In a Restore Request, you can modify the Access Definition associated with a listed Archive File before
restoring the data to a database. For example, you can change the Start Table, deselect relationships, and
change options that determine the traversal path between tables in the Archive File.

Any changes to the Access Definition are saved in the Restore Request as a Modified Access Definition
and do not affect the original Access Definition used in the Archive Process.

Because you want to restore orders for a specific customer, you must change the Start Table from
ORDERS to CUSTOMERS in the Access Definition.

Chapter 2. Processing Flow 51


Change the Start Table

In the Archive Files grid, right-click the file name and click Browse → Access Definition → Original from
the shortcut menu.

The Access Definition used to archive the data is displayed in the Access Definition Editor. To change the
Start Table, select CUSTOMERS in the Start Table drop-down list.

52 IBM Optim: Archive User Manual


Review the Traversal Path

Archive follows the traversal path when selecting data from tables in the Archive File. You can click the
Relationships tab to review or change the options that define the traversal path. The current settings for
each relationship are appropriate and direct Archive to:
v Select data from rows in the CUSTOMERS table that meet the selection criteria “00026” for CUST_ID.
v Select child rows from the ORDERS table to follow the basic traversal path from parent to child for the
relationship RCO between ORDERS and CUSTOMERS, limited by selection criteria “375” for
ORDER_ID.
v Select child rows from the DETAILS table to follow the basic traversal path from parent to child for the
relationship ROD between ORDERS and DETAILS.
v Select parent rows from the ITEMS table because Option (1) is selected for the relationship RID
between DETAILS and ITEMS.

When finished, click File → Update and Return from the menu to return to the Restore Request Editor.
Note that the Modified AD check box is selected in the Archive Files grid.

Chapter 2. Processing Flow 53


Choose a Restore Method — Insert or Load
After adding the Archive File name, establishing local selection criteria, and modifying the Access
Definition, you must select the method used to restore the data to the database.

Data can be restored using an Insert Process or a Load Process. You define parameters for each method in
the Insert Request Editor or Load Request Editor, respectively. When deciding which method to use,
consider that:
v For a large volume of data, the speed of using the database load utility may offset the advantages of
the Insert Process.
v The database load utility may require exclusive control of the database and prevent user access during
the Load Process. The database is available to other users while the Insert Process is running.
v The database load utility either inserts new data or replaces existing data. The Insert Process allows for
Update/Insert Processing in one step.

For this scenario, you will restore the data using the Insert Process.

Specify Insert Process Parameters


In the Restore Request Editor, select Insert as the Restore Process option.

Specify Request Selection Mode


An Insert or Load Request is required to restore data from each Archive File. You can list several Insert or
Load Requests, and provide criteria to match each restored Archive File with the appropriate Insert or
Load Request. Use the Request Selection Mode options to specify the type of criteria.

During processing, each Archive File is compared with the listed Insert or Load Requests, according to
the Request Selection Mode criteria. The first request that matches the criteria is used to restore the data
in that Archive File. If no match is found, data from the Archive File is not restored, and an error occurs.

You use the Request Selection Mode box to select a mode and provide criteria for each listed Insert or
Load Request, as follows:
Data Model
When you select Data Model, each Archive File is compared to the Archive File (or Extract File)
specified as the source in each listed Insert or Load Request until a match is found. The Archive
File referenced in the Insert or Load Request must exist. The two Archive Files match if:
v They contain the same number of tables with the same names.
v If the Table Map references a Column Map, the corresponding Archive File and database tables
must match exactly, containing the same number of columns with the same names, and
compatible data types.
The first listed Insert or Load Request that meets these conditions is used to restore data in the
Archive File. The data model is the only criteria for this selection mode. The description
associated with each listed Insert or Load Request is displayed for reference.
Date
When you specify Date as the selection mode, you must enter a Start date and an End date for
each listed Insert or Load Request. Click the down arrow to select a date from a calendar. The
creation date of each Archive File is compared with the date criteria you specify for an Insert or
Load Request. If the date falls within the range, the Insert or Load Request is used to restore data
in the Archive File.

Note: If the data model does not match, the result of using the request to restore the Archive File
is unpredictable.
Description

54 IBM Optim: Archive User Manual


When you specify Description as the selection mode, you must enter a description for each listed
Insert or Load Request. The description contained in each Archive File is compared with the
description you specify for each Insert or Load Request. If the description matches, the Insert or
Load Request is run to restore the data in the Archive File.

Note: If the data model does not match, the result of using the request to restore the Archive File
is unpredictable.
Group
When you specify Group as the selection mode, you must enter a group name for each listed
Insert or Load Request. The group name contained in each Archive File is compared with the
group name you specify for each Insert or Load Request. If the group name matches, the Insert or
Load Request is run to restore the data in the Archive File.

Note: If the data model does not match, the result of using the request to restore the Archive File
is unpredictable.

For this scenario, select Data Model as the request selection mode.

Add Insert Request


You can use an existing Insert Request, or create a new Insert Request. A named Insert Request is stored
in the Directory and can be used in other processes; a local Insert Request is stored with the Restore
Request and is not available to other processes.

To list an existing Insert Request, right-click the Insert Request(s) grid and click Add Insert Request →
Existing from the shortcut menu to open the Select an Insert Request dialog. The submenu also provides
selections that open the Insert Request Editor, populated with the most recent entries, to allow you to
create a new named or local Insert Request. For this scenario, however, you will create a local Insert
Request, based on the Archive File listed on the Restore Request.

Create Local Insert Request

In the Archive Files grid, right-click the file name and click Create Insert Request → Local from the
shortcut menu. The Insert Request Editor is displayed.

Chapter 2. Processing Flow 55


You use the Insert Request Editor to create and edit Insert Requests. In the Description box, you can
enter text that describes the purpose or function of the Insert Request. For this scenario, type Restore
Order for Customer.

Source File

The name of the selected Archive File is inserted as the Source File. Other controls and options on the
Insert Request Editor are populated with the most recent entries. The Source File serves several purposes:
v When creating a new Insert Request, the Source File serves as the model for building the Table Map
used with the Insert Request.
v If the Insert Request Selection Mode is Data Model, the Source File provides the data model used to
match the Insert Request with the Archive File in the Restore Process.
v When the Insert Request Selection Mode for the Restore Process is Data Model, each Archive File to
be restored is compared to the Source File in listed Insert or Load Requests until a match is found. If
the Insert Request Selection Mode is not Data Model, the Date, Description, or Group for the Archive
File is compared to that for listed Insert or Load Requests until a match is found.

56 IBM Optim: Archive User Manual


Note: If the data model for the Archive File does not match that of the Source File, the result of using
the Insert or Load Request to restore the file is unpredictable.
v When you restore an Archive File using the Insert Request, Archive overrides the Source File with the
name of the restored Archive File.

Control File

The Control File records the success or failure of Insert Processing for each row. In this scenario, select the
name of the Control File used in the Delete Process. A confirmation dialog will prompt you to overwrite
the file when you run the Restore Process.

Table Map Options

A Table Map directs the placement of data in the Restore Process by identifying and matching tables in
the source, or Archive File, with those in the database. In addition, you can use a Table Map to exclude
tables from processing.

Table Map Options allow you to use a named Table Map that is saved and can be used with other
process requests, or a Local Table Map saved as part of the Insert Request. For this scenario, select Local
to create a Local Table Map.

Delete Options

Delete Options let you delete rows from all or specified destination tables or retain all rows in destination
tables for processing (no delete). For this scenario, use the default setting No Tables to retain rows
already in the database.

Process Options

Process Options allow you to select the type of Insert Processing to be performed and specify parameters
to be used. You can insert new rows only; insert new rows and update existing rows; or update existing
rows only. You can apply these options globally, or on a table-by-table basis.

You can also lock each table until all rows are processed, process a specified number of rows before
committing the changes to the database, and discard rows until a particular number is reached and then
stop the process. See “Delete Options” on page 15 for additional information about these options.

For this scenario, ensure that Insert is selected, clear the Lock Tables check box, clear the Commit
Frequency box to use the maximum Product Options limit, and specify 0 for Discard Row Limit.

The remaining options, Process File Attachments, Disable Triggers, Disable Constraints, and Always Call
Create, do not apply to this scenario. Retain the default settings.

Note: See Chapter 5, “Insert,” on page 113 for more information on the Insert Process.

Edit the Table Map


At this point in the scenario, edit the Table Map to specify how the Restore Process is to place data
within the destination tables.

A Table Map matches the source tables in the Archive File to the destination tables in the database. You
can also use a Table Map to exclude tables from the Restore Process.

In the Insert Request Editor, click Tools → Edit Table Map from the menu to display the Table Map
Editor.

Chapter 2. Processing Flow 57


The Source Archive File name and the qualifier for tables in the Archive File are displayed. You must
provide a Destination Qualifier to identify the destination tables. To prefix the table names in the Table
Map, enter the dbalias and creatorid that correspond to the sample database tables.

A description can be a useful way to identify a Table Map. For this scenario, type Map ORDERS and
DETAILS.

Tables Tab

Using the grid on the Tables tab, you can match source tables in the Archive File to destination tables in
the database. Archive initially populates the Destination Table column with names of tables for which
Delete Rows after Archive was selected in the Access Definition used to create the source Archive File.

To restore archived rows to the ORDERS and DETAILS database tables, verify that the Table Map
matches:
v Source table ORDERS to destination table ORDERS.
v Source table DETAILS to destination table DETAILS.

To exclude the ITEMS and CUSTOMERS tables from processing, verify that the destination table cells for
source tables ITEMS and CUSTOMERS are blank.

Note: See the Common Elements Manual for additional information about using Table Maps.

58 IBM Optim: Archive User Manual


When finished, click File → Update and Return from the menu to return to the Insert Request Editor.
Then click File → Update and Return from the menu on the Insert Request Editor to return to the Restore
Request Editor.

Run the Restore Process


After you specify the insert process parameters for the Restore Process, you are ready to run the Restore
Process.

A Restore Request is usually run from the graphical user interface or from the command line. For
unplanned restorations, you will typically define the Restore Request and run it from the Restore Request
Editor, as in this scenario, by clicking File → Run in the menu.

Many organizations can anticipate and plan restorations, however. These organizations can define the two
parts of the Restore Request in advance: listing an Archive File in the Restore Request as a surrogate for
the files restored at runtime and listing Insert or Load Requests to use with files that may be restored.

This approach accommodates changes in the data model by allowing you to list a “template” Archive File
in the Restore Request that mirrors the current data model for an application. The rules for restoring data
from this template are typically straightforward, and you can create an Insert or Load Request to match
the template Archive File. As the application and data model evolve over time, the Insert or Load
Request for an early Archive File can be updated, creating a new Insert or Load Request to accommodate
files that reflect the more recent data model.

Using the command line interface, all Archive Files for the application are searched, and the names of
matching Archive Files are used as overrides for files listed in the Restore Request. The Insert or Load
Request referenced in the Restore Request that matches the Archive File is then used to restore the
selected data.

Note: See Chapter 12, “Command Line Interface — Processing Utilities,” on page 327 for further
information on running processes from the command line.

Restore the Data

In the Restore Request Editor, click File → Run in the menu to process the Restore Request. The Restore
Request Progress dialog displays status information as the Restore Process executes.

Chapter 2. Processing Flow 59


Each time you run the Restore Process, Archive generates a Restore Process Report. The report contains
details about the row selection process for each created Subset Extract File, and a summary of each Insert
or Load Process performed.

60 IBM Optim: Archive User Manual


Chapter 2. Processing Flow 61
You can optionally save or print the Restore Process Report. Click File → Save As from the menu to save
the report or click File → Print from the menu to print the report. Then click File → Close in the menu to
return to the Restore Request Editor.

If you close the report and need to refer to it again, click File → Redisplay Results → Current in the menu
to redisplay the report from the last Restore Process run (from the current instance of the Restore Request
Editor), or click File → Redisplay Results → All in the menu to display a list of all retained Restore
Process Reports. For details on about retaining process reports, refer to the Common Elements Manual .

Save the Restore Request


For this scenario, you will save the Restore Request so that you can reuse the Restore Request in the
future.

In the Restore Request Editor, click File → Save from the menu to display the Save the Restore Request
dialog.

Developing a naming convention for Restore Requests can be a useful way to organize requests for easy
access. To identify the Restore Request for this scenario, type PSTDEMO.SCENARIO1 in the Enter pattern for
Restore Request box and click Save.

When finished, click File → Close from the menu to close the Restore Request Editor.

Note: See Chapter 8, “Restore,” on page 209 for further information on the Restore Process.

62 IBM Optim: Archive User Manual


Chapter 3. Archive
Use the Archive Process to select a precisely defined set of related rows from a database and save the
rows to an external Archive File.

The Archive File is a sequential file that contains the archived data and the table-related definitions
needed to re-create objects for restoration. You can browse or selectively restore data in an Archive File at
any time.

Archive Request Editor

You must use the Archive Request Editor to define parameters for an Archive Process and store them as
an Archive Request. An Archive Request provides information needed to archive and delete data from
source tables. The Archive Request references an Access Definition that describes the data to be archived
and the data to be deleted. The Access Definition may also include supplemental SQL statements (or
Actions) that are executed at selected phases of the Archive or Delete Process. Options in the Archive
Request Editor allow you to defer the deletion of data at run time, or review and override deletion
instructions specified in the Access Definition. You can also reference a named Storage Profile in the
Archive Request to create a duplicate Archive File automatically, to copy an Archive File to a backup
device, or to automatically delete the Archive File once the data is no longer active. ****Compression
options allow you to choose a point in the processing cycle to compress the Archive File or to select
individual tables to be compressed.****

For infrequent or unplanned Archive Processes, you will typically use the Archive Request Editor to
define and run the Archive Process from the graphical user interface. However, most organizations can
plan their Archive Processes and run them automatically, using the command line interface or the
scheduler. These organizations use the Archive Request Editor to define the Archive Request. However,
the Archive Process is run in an automated fashion (typically in batch).

Overrides allow you to run the Archive Request from the command line, specifying a different Archive
and Index File name or referencing a different Access Definition or criteria for selecting the data to
archive.

Storage Media for Archive Files

You can create Archive Files on fixed or secondary media. Fixed media includes local hard drives or
network drives. Examples of secondary media includes zip disks, diskettes, and backup devices (for
example, tape).

Note: Archive Index information, stored in an Archive Index File, is always stored on fixed media. An
Archive Index consists of values from one or more Index Columns. When you browse or restore data,
Archive can use index information to search quickly for data. If the Archive Index search reveals that the
desired Archive File is stored on inaccessible media, you are prompted to mount the media.

Factors that influence the type of storage to use depend on your business objectives. Specific factors to
consider include the cost effectiveness of each type of media, longevity of storage required, mandates for
off-site storage, security, and resource management (time and personnel). For example, if quick access to
data in Archive Files is of primary importance, you may decide to store Archive Files on a hard disk.
However, as Archive Files accumulate, it may be important to move older files for which browsing or
restoration is less likely, to cheaper, perhaps less accessible media. In addition to minimizing disk storage,
a need for off-site storage or portability may make secondary media a logical choice. Durability of the
media could be another consideration — for Archive Files you must retain for an extended period of
time, a networked storage system may be the best choice. Conversely, tape storage might be more

© Copyright IBM Corp. 1994, 2010 63


desirable for short-term storage, due to the large capacity and cost effectiveness of the media. For more
information about storing Archive Files, refer to Chapter 10, “Manage Archive Media,” on page 289.

Support for Secondary Media

When an Archive File is created on secondary media, the capacity of the media must be considered. If an
Archive File is larger than the space on the target media, the file must be divided into segments to allow
the file to span more than one volume. The segment names used for an Archive File are recorded as part
of the Archive Directory information for the Archive File. You can specify default segment size values in
Personal Options. Refer to the Common Elements Manual for complete information.

In addition to Personal Options defaults, Archive provides Storage Profile Definitions to allow you to
override default settings and provide additional secondary media parameters to the Archive Process.

Storage Profile

You can use a Storage Profile Definition to automate the creation of a duplicate Archive File, or to copy
an Archive File to a backup device. You can also use a Storage Profile to override Personal Options
default values for segment size. Use a Storage Profile by specifying the name of the Storage Profile in an
Archive Request. During processing, the storage parameters are referenced by the Archive Process.

The parameters you define in a Storage Profile Definition can be saved and reused. Use the Storage
Profile Definition Editor to define, name, and save Storage Profile Definitions. Refer to “Using the Storage
Profile Definition Editor” on page 293.

Archive File Retention Policy

If the Archive File is to reside on an Optim Server, you can use the Storage Profile to set a retention
policy for the file. The retention policy applies to the primary copy of the Archive File, usually saved to
fixed media (for example, a local hard drive or network drive). Once the retention period has expired, the
Optim Server automatically deletes the Archive File. Refer to “Using the Storage Profile Definition
Editor” on page 293.

Cross-Platform Compatibility

Archive can archive data from a variety of databases (DB2, Oracle, Sybase ASE, SQL Server, and
Informix) and restore data to the same or a different type of database.

Section Contents

This section explains how to create, maintain, and process an Archive Request, including how to:
v Specify the Archive File, Archive Index File, and group names, referenced when searching, browsing,
or restoring archived data.
v Select or create the Access Definition for an Archive Request.
v Choose Point and Shoot list options. A Point and Shoot list is used to select specific rows from the Start
table to archive.
v Assign variable default values.
v Specify Delete options.
v Compress the Archive File or individual tables in the file
v Specify media options, including parameters for creating a duplicate Archive File, copying an Archive
File to a backup device, storing files on secondary media, and setting a retention policy.
v Add the Archive File to an Archive File Collection.
v Specify notification options.

64 IBM Optim: Archive User Manual


v Run, save, and schedule an Archive Request.
v Review, save, and print the Archive Process Report.
v “Open the Archive Request Editor”
Use the Archive Request Editor to create or edit requests to archive data.
v “Using the Archive Request Editor” on page 67
In the Archive Request Editor you can create, modify, or delete Archive Requests. You can also save
Archive Requests to the Optim Directory.
v “Process an Archive Request” on page 85
An Archive Request is run in several steps. The steps differ slightly if you schedule the Archive Process
to run later, rather than run the Archive Process immediately.

Open the Archive Request Editor


Use the Archive Request Editor to create or edit requests to archive data.

Archive requests can be stored in the Optim Directory. There are different ways to open the editor
depending on whether you want to create a new Archive Request or edit an existing Archive Request.
v “Creating an Archive Request”
You can create an Archive Request from the main window or from the Archive Request Editor.
v “Selecting an Archive Request to Edit” on page 66
You can select an Archive Request for editing from the main window or from the Archive Request
Editor.

Creating an Archive Request


You can create an Archive Request from the main window or from the Archive Request Editor.

From the Main Window


You can create an entirely new Archive Request from the main window.

To create an Archive Request:


1. In the main window, click File → New → Archive from the menu to open the Archive Request Editor.
2. On the General tab, enter the name of the Archive File and the Archive Index File, and select the type
of Access Definition: Named or Local. If you select Named, enter the name of a new or existing
Access Definition.
3. Click Tools → Edit Access Definition from the menu to create or edit the Access Definition.
4. After editing the Access Definition, save and close the Access Definition Editor.
5. Provide any additional parameters.
6. In the Archive Request Editor, click File → Save from the menu to open the Save the Archive Request
dialog.
7. In the Pattern box, type a unique name for the new Archive Request and click Save.

From the Archive Request Editor


You can create a new Archive Request that is based on an existing Archive Request from the Archive
Request Editor. You can also create an entirely new Archive Request from the Archive Request Editor.

To create an Archive Request from the Archive Request Editor, complete one of the following:
v To create a new Archive Request, click File → New from the menu in the Archive Request Editor.
v To create a new Archive Request modeled on an existing one, open the desired Archive Request and
click File → Save As from the menu.
v To create and store a copy of the active Archive Request and continue editing, click File → Save Copy
As from the menu.

Chapter 3. Archive 65
These steps are the minimum required to create an Archive Request. After you create a request, you can
run the process immediately, or save the request and schedule it. Because the options to create an Archive
Request and to modify an Archive Request are similar, see “Using the Archive Request Editor” on page
67 for complete details.

Selecting an Archive Request to Edit


You can select an Archive Request for editing from the main window or from the Archive Request Editor.

Select the latest Archive Request that you edited


To select the latest Archive Request that you edited, click Actions → Archive from the menu of the main
window to open the last edited Archive Request in the Archive Request Editor.

From the Main Window


You can use the main window to select Archive Requests other than the latest Archive Request that you
edited.

To select an Archive Request to edit:


1. In the main window, click File → Open in the menu to display the Open (object selection) dialog.
When you click File → Open from the menu of the main window or an editor, the Open dialog is
displayed. For general information about this dialog, see the Common Elements Manual .
2. Under Identifier, open Archive Request and click ID to display a list of Archive Requests.
3. To limit the list based on your criteria, specify these criteria under Pattern and click Refresh.
4. Double-click the grid row for the desired Archive Request to open the Archive Request Editor.

66 IBM Optim: Archive User Manual


Using the Archive Request Editor
In the Archive Request Editor you can create, modify, or delete Archive Requests. You can also save
Archive Requests to the Optim Directory.

Description
Text to describe the purpose of the Archive Request (up to 40 characters).
Server Name
If the optional Optim Server component is installed on your network, you can select (Local) to
process the request on the workstation or click the down arrow to select a server on which to
process the request.
Tabs Use the Archive Request Editor tabs to provide parameters and select options to for Archive
processing. Each tab in the editor serves a unique purpose.
General
Parameters required by the Archive process, including the Archive File name, Archive
Index File name, Group information, the Access Definition, a limit for the number of rows
to archive, and options for reviewing or deferring the deletion of rows. Each time you
open the editor, the General tab is shown first.

Chapter 3. Archive 67
Objects
The type of objects to archive (all objects are selected by default).
Point and Shoot
Overrides for the Point and Shoot specification in the Access Definition.
Variables
Values for substitution variables, if used in the Access Definition. (This tab is displayed
only when variables are used.)
Object List
Additional database object definitions to archive.
Collections
Archive File Collections for ODM access to data in the Archive File.
Notify Options for automatic email notification of the success or failure of the process.
Delete Delete parameters for deleting rows after archiving. This tab is not displayed if you defer
the Delete process.

Menu Commands

In addition to the standard File, Edit, and Tools menu commands, you can select the following
commands from the Tools menu:
Edit Access Definition
Open the Access Definition Editor. Use the Access Definition Editor to edit the list of tables, select
relationships, define selection criteria for the data to archive, select columns for indexing, set a
Start Table row limit, and define Archive Actions.
Edit Point and Shoot
Open the Point and Shoot Editor. Use the Point and Shoot Editor to create a list of Start Table
rows to archive. See the Common Elements Manual for detailed information on Access Definitions
and using Point and Shoot.
Edit Delete Strategy
Open the Table Access Strategy dialog. Use the dialog to override the default method (scan or
key lookup) of accessing the parent or child table for each relationship. (For details, see “Table
Access Strategy” on page 99.)
Edit Storage Profile
Open the Storage Profile Definition Editor. Use the Storage Profile Definition Editor to override
default settings for segment size, automatically create a duplicate Archive File, copy an Archive
File to a backup device, or specify a retention policy for the primary Archive File. Refer to
Chapter 10, “Manage Archive Media,” on page 289.
Edit Report Request
Open the Report Request Editor, where you can review and modify specifications for creating a
report on the contents of the Archive File created.
v “General Tab, Archive Request Editor” on page 69
Use this tab to identify the Access Definition that describes the data to be archived and the friles where
the archived data and indexes are stored. You can also select processing options that help you
troubleshoot the Archive or Delete Process.
v “Objects Tab, Archive Request Editor” on page 75
Use this tab to indicate the objects to archive other than the tables and columns listed in the Access
Definition.
v “Point and Shoot Tab, Archive Request Editor” on page 76
Use this tab to override Point and Shoot specifications in the Access Definition.

68 IBM Optim: Archive User Manual


v “Variables Tab, Archive Request Editor” on page 78
Use this tab to create variables with default values for the Access Definition.
v “Object List Tab, Archive Request Editor” on page 79
Use this tab to specify database objects that are not selected automatically for archiving. Depending on
the DBMS, certain objects might not be automatically included.
v “Collections Tab, Archive Request Editor” on page 81
Use this tab to list Archive File Collections to which the Archive File is added.
v “Notify Tab, Archive Request Editor” on page 83
Use this tab to specify options and addresses for automatic email notification of the success or failure
of the process. The process report generated when the process completes is automatically sent as an
attachment.
v “Delete Tab, Archive Request Editor” on page 83
Use this tab to specify a Control File name and parameters for deleting archived data.

General Tab, Archive Request Editor


Use this tab to identify the Access Definition that describes the data to be archived and the files where
the archived data and indexes are stored. You can also select processing options that help you
troubleshoot the Archive or Delete Process.

Chapter 3. Archive 69
Archive File

The Archive File name. When you enter the name of a new or existing Archive File, the default .af
extension is added automatically. If the Archive File exists, a run time prompt confirms that you want to
overwrite the file, unless you have disabled this Personal Option. Refer to the Common Elements Manual
section for Personal Options for more information.
Path You can include an explicit path with the file name (network drives resolve to the appropriate
Universal Naming Convention (UNC) name) or, by providing no path, store the file in the default
Archive Directory specified in Personal Options. If writing the Archive File to secondary media,
however, you must provide the path to the desired device.
Automated Processes
If you want to automate your Archive process by running the Archive Request from the
command line or the scheduler, you can use macros to dynamically create unique file names for
each Optim process. A macro is resolved when a process is run, generating a new name each time
the request is executed. (See the Common Elements Manual section for Enhanced File Names for
information about macros.)
Browse
To browse the contents of an existing Archive File, right-click and select Browse from the shortcut
menu. For details, refer to the Common Elements Manual section for Browse.

File Access Definition

If Archive File security is implemented at your facility, you can enter the name of a new or existing File
Access Definition (FAD) to secure Archive Files created by running the Archive Request. Use the browse
button to display a selection list of FADs or type the two-part name, identifier.name.

If you enter the name of an FAD that does not exist, any Archive Files created by running this Archive
Request are not accessible until the FAD is created. Once a file is created, you cannot associate the file
with a different FAD.

For more information about Optim security features and FADs, refer to the Installation and Configuration
Guide section for Security.

Archive Index File

An Archive Index File facilitates searches for a particular Archive File to browse or restore. Parameters for
indexing archived data are provided on the Table Specifications dialog within the Access Definition
Editor. By default, Archive Index File is populated with the name in Archive File and given the extension
.afx. You can change the default name or extension or, if archived data is not indexed, delete the default
name.
Path You can include an explicit path with the file name (network drives resolve to the appropriate
Universal Naming Convention (UNC) name) or, by providing no path, store the file in the default
Archive Index Directory specified in Personal Options.

Group

A group name for the Archive File. Logical group names help qualify and categorize the Archive File and
corresponding archived data. Also, you can reference a group name to locate Archive Files for searching
or restoring data. For these reasons, group naming conventions may be important.

70 IBM Optim: Archive User Manual


Storage Profile

A Storage Profile is needed to override Personal Options settings for segment size, to create a duplicate
Archive File, to copy an Archive File to a backup device, or to implement a retention policy for the
primary Archive File. Use the browse button to display a selection list of Storage Profiles or type the
name.

To edit an existing Storage Profile or create a new one, click Tools → Edit Storage Profile from the menu
to open the Storage Profile Definition Editor. Refer to Chapter 10, “Manage Archive Media,” on page 289
for complete information about defining a Storage Profile.

Process Options
Row Limit
Maximum number of rows to process. If the Row Limit is reached during processing, the Archive
File is not registered in an Archive Directory Entry.
blank Use the maximum limit specified in Product Options. (See the Installation and
Configuration Guide section for Product Options.)
n A number from 1 to the maximum limit specified in Product Options.

You can use a row limit as a validation check when archiving data. For example, if you expect to
archive fewer than 1000 rows from a table, using a row limit that causes the process to fail if the
number of archived rows exceeds 1000 allows you to troubleshoot your specifications for the
process.
Database Connections
The number of concurrent database connections for the Archive Process. Available if Maximum
Database Connections as set on the Database tab for Product Options is 2 or greater.
1 Use a single connection
2 to site maximum
To increase the maximum number of connections, select an even number or (Maximum)
from the drop-down list.

Increasing the number of database connections in order to use multiple threads to archive rows
concurrently may improve performance when processing large quantities of data. However,
increasing the number of database connections to process small amounts of data may decrease
performance.
Defer Delete after Archive
If the Access Definition includes instructions to delete archived rows from database tables, you
can select this check box to instruct Archive to bypass those instructions. Rows selected for
deletion can be deleted in a separate process. This check box is selected by default. Clear the
check box to execute delete instructions during the Archive process.
Review Archive Delete List
Select this check box to display the Delete After Archive Specifications dialog during processing.
Use this dialog to review and override Access Definition delete options for the tables to be
archived. Review Archive Delete List is unavailable if Defer Delete after Archive is selected.
Create Report
Select this check box to enable Report Options. You can use a Report Request to create a report
about the contents of the Archive File.
Generate Statistical Report
Statistical information may help you troubleshoot performance. (For more information, see
Chapter 11, “Archive Performance,” on page 309.) This check box is selected by default to include
statistical information in the Archive Process Report.

Chapter 3. Archive 71
Process File Attachments
This check box is selected by default to archive file attachments identified in the Access
Definition.
Compression Options
Select this box to choose options for compressing the Archive File or specific tables in the Archive
File. The Compression Options dialog displays:

This dialog has the following options:


Compress Archive File
Select this check box to compress the Archive File. Next, select a Compression Model.
Compression Models:
Choose the type of compression from this drop-down list:
Inline Compression
Data is compressed as it is extracted and before it is written to the Archive File.
Inline Compression has lower I/O and shorter elapsed time for the Archive,
though it requires longer time to be connected to the database, when compared
with Post Compression.
Post Compression
Data is compressed after it is extracted and written to the Archive File. Compared
with Inline Compression, Post Compression has a higher I/O rate and a longer
elapsed time for the Archive, though the connection to the database is for a
shorter time.
Enable Active Compression
Select this check box to perform compression on an individual table basis.
Default Table Threshold:
Specify the default threshold for compressing the tables in the Archive File. Choose a
72 IBM Optim: Archive User Manual
value for the percentage of reduction in table size that you expect compression to achieve.
For example, if you specify a value of 20, Optim compresses any table in the Archive File
that can be reduced in size by 20 percent or more. Allowable values are 1 - 99.
Table Threshold:
Select this box to specify compression options for individual tables. The Compression
Table Threshold dialog displays:

Threshold
For each table, specify ON or OFF for compression or specify a value for Optim to use as the
compression threshold. If no value is specified for a table, the default is to set compression on
and use the Default Table Threshold. Allowable values are:
ON Sets compression ON for this table. This is the default. The Default Table Threshold
value is used to determine whether compression is performed. If no value is specified for
Default Table Threshold, the table is compressed. This is the default.
OFF Sets compression OFF for this table.
n Sets compression ON for this table and uses this value as the threshold. Allowable values
are 1 - 99. The threshold value is the minimum amount of reduction in size that you
expect to achieve by compressing the table. Enter a value in the range 1 - 99 to set a
threshold value for that table.
Right-click on the line next to the table name to display these options:
Clear Clears any Threshold column setting for this table. Use Clear All to clear
Threshold column settings for all tables in this Archive File.

Chapter 3. Archive 73
Compression Off
Turns off compression for this table. Use Compression Off All to turn off
compression for all tables in this Archive File. Selecting Compress Off All
overrides any value in the Threshold column.
Compression On
Turns on compression for this table. If Default Table Threshold is specified, that
value determines whether to compress the table. If no Default Table Threshold is
specified, the table is compressed. Use Compression On All to turn on
compression for all tables in this Archive File. Selecting Compression On All
overrides any value in the Threshold column.

Access Definition Options

An Access Definition identifies the Start Table and other tables from which data is archived, as well as
the data to be archived, the relationships used in the process and the directions in which they are
traversed, and columns to be indexed.

The Access Definition may also include Archive Actions, or custom SQL statements, to be executed at
selected phases of an Archive, Delete, or Restore Process. For complete information about Archive
Actions, refer to the Common Elements Manual Access Definitions section.
Local Select this option to create an Access Definition that is stored, and can be used only with the
active Archive Request.
Named
Select this option to an Access Definition stored in the Optim directory and available for use with
other process requests. Selecting this option activates Access Definition Name.
Access Definition Name
The two-part name of an Access Definition, entered as identifier.name.
v identifier – Qualifier (1 - 8 characters) to identify the Access Definition.
v name – Name of the Access Definition (1 - 12 characters).

To edit an existing Access Definition or create a new one, click Tools → Edit Access Definition in the
menu to open the Access Definition Editor. Editing may be necessary in the event of changes to database
tables since the last time the Access Definition was used. Optim displays a warning message when you
open the Access Definition, when you save the Access Definition, or when you use the Access Definition.

Complete information is available in the Common Elements Manual section on Access Definitions.

Report Options

If creating a report on the contents of the Archive File, use the Report Options to select the type of Report
Request referenced in the Archive Process (Local or Named) and, if using a named Report Request, to
provide the name. Report Options are available only if you select the Create Report Process Option.
Local Select this option to use a Report Request that is stored, and can only be used, with the active
Archive Request.
Named
Select this option to use a named Report Request, stored in the Directory and to activate Report
Request Name.
Report Request Name
The two-part name of the Report Request as identifier.name.
v identifier – Qualifier (1 - 8 characters) to identify the Report Request.
v name – Name of the Report Request (1 - 12 characters).

74 IBM Optim: Archive User Manual


The Report Type for the named Report Request must be File.

To edit an existing Report Request or create a new one, click Tools → Edit Report Request from the menu
to open the Report Request Editor. For complete information, refer to Chapter 7, “Report,” on page 189.

Objects Tab, Archive Request Editor


Use this tab to indicate the objects to archive other from the tables and columns listed in the Access
Definition.

By default, the Archive Process archives all objects for archiving.

Objects

Common objects available for archiving. Select a check box to archive the corresponding object. To
exclude an object, clear the corresponding check box.

Chapter 3. Archive 75
Extended Objects

Additional objects available for archiving. Select a check box to archive the corresponding object. To
exclude an object, clear the corresponding check box.

Select All Deselect All

Click Select All to archive all listed objects. Click Deselect All to exclude all listed objects from the
Archive Process.

Point and Shoot Tab, Archive Request Editor


Use this tab to override Point and Shoot specifications in the Access Definition.

The Access Definition used in the Archive Process may reference a Point and Shoot list to select Start
Table rows for processing. Any Point and Shoot specification in the Access Definition is used by default.
You can:
v Bypass the use of a Point and Shoot list referenced in the Access Definition
v Provide a named or local replacement for the Point and Shoot list referenced in the Access Definition
v Provide a named or local Point and Shoot list to be used even though the Access Definition does not
reference a Point and Shoot list

76 IBM Optim: Archive User Manual


Start Table

The name of the Start Table as designated in the Access Definition for the Archive Request.

File Options

Select the Override AD Point and Shoot Definition check box to disregard Point and Shoot
specifications in the Access Definition. Then, select one of the following options:
None Select this option to disregard any Point and Shoot specification in the Access Definition when
running the Archive Request.
Local Select this option to use a Local Point and Shoot list that is stored, and can only be used, with the
active Archive Request
File Select this option to use a named Point and Shoot list to select Start Table rows in the Archive
process and to activate Name.
Name The name of the Point and Shoot file are saved in ASCII format and have a .pns
extension by default. A Point and Shoot File is sometimes referred to as a Row List File.
Information about the format of these files is in the Common Elements Manual.

Chapter 3. Archive 77
To edit an existing Point and Shoot list or create a new one, click Tools → Edit Point and Shoot List in
the menu to open the Point and Shoot Editor. For complete information, refer to the Common Elements
Manual .

Variables Tab, Archive Request Editor


Use this tab to create variables with default values for the Access Definition.

Selection criteria define a subset of related data from the list of tables in the Access Definition. This
subset of data is copied to the Archive File. You can define explicit selection criteria in the Access
Definition, or create variables with default values that can be overridden by values specified on the
Variables tab in the Archive Request Editor. You can also choose to be prompted for values at runtime.

Note: The Variables tab is available only if the Access Definition required in the Archive Request
includes substitution variables. To define variables, click Tools → Edit Access Definition from the menu.

The flexibility provided by using variables allows you to use the same Access Definition for different
purposes.

78 IBM Optim: Archive User Manual


Grid Details

Information for each variable in the Access Definition is presented in three parts on the grid. The name of
the variable is shown in the left column. The grid cell in the right column is divided in two. The prompt
string for the variable displays in the top half of the cell and the value used as criteria displays in the
bottom.
Variable
The list of variables defined in the Access Definition. The name of the variable displays in italics,
unless the default value is overridden by a value entered on the Variables tab. You can modify
the name of the variable in the Access Definition Editor only. To open the Access Definition
Editor, click Tools → Edit Access Definition from the menu.
Prompt String
Text that prompts for the value at run time. You can modify the prompt string only in the Access
Definition Editor. To open the Access Definition Editor, click Tools → Edit Access Definition from
the menu.
Value The value assigned to the variable. You can right-click and select Set Default Value to use the
values assigned as defaults in the Access Definition.

Note: A value for each variable is required to perform the Archive Process. If a default value is
not specified in the Access Definition and no value is provided on the Variables tab, you are
prompted for a value at run time.

Specify Values
Assigned values must be the appropriate data type and size for the column and must conform to SQL
syntax.

For example, assume a variable named ST is assigned to a character column containing state
abbreviations. The variable delimiter is a colon. If the variable is defined with single quotes in the Access
Definition, you must specify the value without single quotes on the Variables tab:

Access Definition Value


= ':ST' CA

If the variable is defined without single quotes in the Access Definition, you must specify the value with
single quotes on the Variables tab:

Access Definition Value


= :ST 'CA'

Note: Values are not validated until run time. Errors during processing may result if the value is an
incorrect data type or size for the column, or the resulting specification does not conform to SQL syntax.

Always Prompt for Values at Run Time

Select the Always Prompt for Values at Run Time check box to display the prompt string before each
Archive Process is performed, regardless of whether a value has been assigned. Clear the check box to
display the prompt string only when a value for a variable has not been assigned.

Object List Tab, Archive Request Editor


Use this tab to specify database objects that are not selected automatically for archiving. Depending on
the DBMS, certain objects might not be automatically included.

Chapter 3. Archive 79
Default Qualifier

The two-part qualifier serves as a prefix to unqualified object names in the Object List. To select from a
list of the most recently used qualifiers, click the down arrow. To select a qualifier that is not on the list,
click the browse button.

The Default Qualifier consists of:


dbalias Alias of the database in which an object is defined (1 to 12 characters).
creatorid
Creator ID assigned to the object (1 to 64 characters).

Object
Type The type of object to archive: Default, Function, Package, Procedure, Rule, Sequence, UDT, or
View. Click the grid cell to display a down arrow, then click the down arrow to select from a list.
You must specify an object type for each entry. The last line in the grid can remain blank.
To clear entries, right-click a grid cell and click Remove or Remove All from the shortcut menu.

80 IBM Optim: Archive User Manual


To add objects, right-click a grid cell, and click Add → the object type in the shortcut menu. You
can drag an object name from the Select dialog in the grid. The type, name, and status are
inserted in the list. You can also add objects to the list manually.
Name Name of the explicit object to archive. You cannot specify duplicate object names for the same
object type. The fully qualified object name consists of:
dbalias Identifies the database where the object resides.
creatorid
Creator ID assigned to the object.
objectname
Base object name.

Status

The status of the listed object.


Defined
Object exists in the database.
Inaccessible
Cannot connect to the database indicated by the DB Alias.
Incomplete
Object type is not specified, or the object name is not fully qualified. Select an object type, or
specify a Qualifier or a three-part object name, as appropriate.
Pending
When you select an object type, the status is Pending until you specify an object name.
Unavailable
Object type is not supported for the specified DB Alias (DBMS type).
Unknown
Object does not exist. To create an object, use the Create Utility.

Ignore Unknown Objects

Click this check box to ignore Unknown or Unavailable objects when you run the Archive Request. If
you clear this check box, the status of all objects must be Defined in order to save or run the Archive
Request.

Collections Tab, Archive Request Editor


Use this tab to list Archive File Collections to which the Archive File is added.

Each Archive File Collection serves as a data source for access to archived data using Optim Open Data
Manager. Shortcut menu commands allow you to create a list of Archive File Collection names. For more
information about Archive File Collections, see “Archive File Collections” on page 284.

Note: If the Archive File cannot be added to any listed Archive File Collection, the Archive Process will
fail.

Chapter 3. Archive 81
Creator ID

The Creator ID associated with the Archive File Collection.

Name

The Archive File Collection name.

Shortcut Menu Commands

Right-click the Collections list to display the following commands:

Remove Remove an Archive File Collection name from the list.


Remove All Remove all Archive File Collection names from the list.
Add Collection Display an Open dialog, allowing you to select one or
more Archive File Collections.
Replace Collection Display an Open dialog, allowing you to select an Archive
File Collection to replace the listed Archive File Collection.

82 IBM Optim: Archive User Manual


Notify Tab, Archive Request Editor
Use this tab to specify options and addresses for automatic email notification of the success or failure of
the process. The process report generated when the process completes is automatically sent as an
attachment.

Delete Tab, Archive Request Editor


Use this tab to specify a Control File name and parameters for deleting archived data.

Note: If you select Defer Delete after Archive on the General tab, the Delete tab is not shown.

Control File

Enter the name of a Control File. During the process, this file is used to track the deletion process and
record the success or failure for each row in the Archive File. Control Files have a .cf extension by
default. If you do not specify a path for the Control File, the process uses the drive and directory defined
in Personal Options as the default Data Directory. Refer to the Common Elements Manual .

Chapter 3. Archive 83
If you specify the name of a Control File that already exists, a dialog prompts you to confirm that you
want to overwrite the file when you run the Archive Request. Use a Personal Option to disable this
feature.

Note: You can browse the contents of an Archive File or Control File by clicking Utilities → Browse from
the menu or by rightclicking and clicking Browse in the shortcut menu. See the Common Elements
Manual for details on the Browse Utility.

Delete Options
Lock Tables
Select this check box to lock database tables during processing. A table is locked until all rows for
that table in the Archive File are processed. Lock tables to ensure that the other database activity
does not interfere with the Delete Process. Locking, however, prevents other users from accessing
tables involved in the Delete Process. If a site option prevents you from locking tables, this option
is disabled.
Compare Row Contents
Select this check box to compare rows of data in the Archive File with rows in the database prior
to deletion. Rows are deleted from the database that exactly match rows in the Archive File, and
rows that do not exactly match are discarded and noted in the Control File. If you clear this
check box, the row comparison is not performed, and rows can be deleted from the database that
do not exactly match rows in the Archive File. (This check box is selected by default.)
Include LOB columns in row comparison
This option is available only if Compare Row Contents is selected. Select this check box
to include LOB columns in the row comparison. Clear this check box to exclude LOB
columns from the row comparison. (This check box is selected by default.)

Note: Clearing these check boxes may improve performance significantly; however, you risk
losing any updates to the data in the database since the Archive was performed. Also, you will
not receive any warning conditions (e.g., a “not found” condition if the row in the Archive File
does not exist in the DBMS).
Commit Frequency
Number of rows to delete before committing the changes to the database. Frequent commits keep
locking to a minimum, but may slow the process. If the process ends abnormally, click Utilities →
Restart/Retry from the menu to resume processing from the last commit point. The Commit
Frequency is a number from 1 to the maximum limit (999999) specified in Product Options. To
use the maximum Product Options limit, clear this box.
Generate Statistical Report
Select this check box to include statistical information for the Delete Process in the Archive
Process Report. (For details, see “Statistical Information” on page 94.)

Note: Statistical information may indicate whether you can improve performance by overriding
the default method (scan or key lookup) of accessing a table. (For details, see “Table Access
Strategy” on page 319.)
Discard Row Limit
Enter the number of rows that can be discarded while deleting rows during an Archive Process,
up to a maximum of 99999999. The process stops after the specified number is reached and all
rows in the array are processed. To allow an unlimited number of rows to be discarded, specify
zero (0) or leave blank.

Note: Discard Row Limit is an approximate value due to array processing for the Delete Process.
For example, assume the discard limit is set to 50 and the array supports 200 rows for a given

84 IBM Optim: Archive User Manual


table. If the first 50 rows fail, the DBMS continues to process the other 150 rows in the array,
before evaluating the discard limit. (The number of rows that can be deleted via one call to the
DBMS depends on the size of the row.)
Database Connections
Increase the number of concurrent database connections for the Archive Process. Increasing
database connections improves performance by allowing multiple threads to archive rows
concurrently.
To increase the maximum number of connections, select an even number from 2 to the site
maximum as specified on the Product Options dialog.

Notes:
v Option is available only if Maximum Database Connections on the Database tab of Product
Options is 2 or greater. (Refer to the Common Elements Manual.)
v You can select only an even number of database connections.

Process an Archive Request


An Archive Request is run in several steps. The steps differ slightly if you schedule the Archive Process
to run later, rather than run the Archive Process immediately.

The steps are described in the following paragraphs.

Validate the Access Definition

Archive validates the specifications in the Access Definition. If the Access Definition is valid, processing
continues. If the Access Definition is invalid, processing proceeds as follows:
v If the Archive Process is scheduled, the Stop on Error parameter on the Steps tab of the Job Details
dialog determines whether processing continues.
v If the Archive Process is run immediately, Archive displays an error message and processing stops.

Locate and Prompt for Archive Directory Entry

Archive locates any Archive Directory entry associated with the Archive File name you entered. If an
Archive Directory entry does not exist, Archive creates it at the successful conclusion of the process. If the
Archive Directory Entry does exist, processing proceeds as follows:
v If the Archive Process is scheduled, processing continues. The existing Archive Directory entry is
deleted, and a new entry is created at the successful conclusion of the process.
v If the Archive Process is run immediately, a dialog prompts you to confirm deletion of the existing
Archive Directory entry. If you choose not to delete the existing entry, processing stops.

Locate the Archive File

Archive locates the Archive File. If the file does not exist, Archive creates it. If the Archive File does exist,
processing proceeds as follows:
v If the Archive Process is scheduled, processing continues. The file is overwritten.
v If the Archive Process is run immediately, a dialog prompts you to confirm that the data in the file is to
be overwritten. Use a Personal Option to disable this feature.

Locate the Archive Index File

Archive locates the Archive Index File. If the file does not exist, Archive creates it if Archive Index
parameters are specified in the Access Definition. If the Archive Index File does exist and Archive Index
parameters are specified in the Access Definition, processing proceeds as follows:

Chapter 3. Archive 85
v If the Archive Process is scheduled, processing continues. The file is overwritten.
v If the Archive Process is run immediately, a dialog prompts you to confirm that the data in the file is to
be overwritten. Use a Personal Option to disable this feature.

Validate Variable Value

Archive checks whether variables are defined in the Access Definition, and if so, verifies that valid values
are provided for each variable.
v If valid values are provided, processing continues.
v If invalid values are provided (for example, the data type, size, or resulting SQL syntax is invalid),
processing stops and errors are recorded in the Archive Process Report.
v If values are missing or the check box labeled Always Prompt for Values at Run Time is selected on
the Variables tab (see “Variables Tab, Archive Request Editor” on page 78), processing proceeds as
follows:
– If the Archive Process is scheduled, processing stops and errors are recorded in the Archive Process
Report.
– If the Archive Process is run immediately, the Archive File Variable Values dialog is displayed. Enter
values for variables, as required, to continue processing.

Validate Point and Shoot

If a Point and Shoot list is specified, Archive verifies that the rows are valid.
v If the rows in the Point and Shoot list are valid, processing continues.
v If a Point and Shoot list file is specified and cannot be found, processing stops.
v If the rows in a Point and Shoot list are invalid, missing, or if primary key values in the file do not
exist in the Start Table, processing proceeds as follows:
– If the Archive Process is scheduled, the Stop on Error parameter specified on the Steps tab of the
Job Details dialog determines whether processing continues.
– If the Archive Process is run immediately, you are prompted to specify how to proceed. You can
continue processing the Archive Process without using the Point and Shoot list, or cancel the
Archive Process.

Archive Data

Archive performs the Archive Process for each table specified in the Access Definition.

Delete Data

Archive performs the Delete After Archive Process for each table listed in the Access Definition, according
to your specifications. If you selected the Defer Delete after Archive option, data is not deleted. If you
selected Review Archive Delete List, the Delete After Archive Specifications dialog is displayed.

Delete After Archive Specifications Dialog

Use the Delete After Archive Specifications dialog to verify or override delete specifications in the Access
Definition. Select a check box to delete archived rows in the corresponding table. To select or clear all
check boxes at once, you can click Tools → Set All in the menu, or you can use the toolbar buttons or the
shortcut menu.

86 IBM Optim: Archive User Manual


Cascading Delete/Update Confirmation Dialog

Archive performs a cascading delete/update check during processing of an Archive Request, and
displays the Cascading Delete/Update Confirmation dialog if the following conditions are true:
v The Warn on Cascade Delete/Update option must be set to Runtime or Always in either Product or
Personal Options. (Refer to the Installation and Configuration Guide and the Common Elements Manual )
v At least one table must have Delete After Archive specifications.
v The cascade delete or update must affect at least one table that is not explicitly included in the Archive
Process.

Click OK to continue processing, or click Cancel to stop processing and return to the Archive Request
Editor.

For details on this dialog, refer to the Common Elements Manual .

Archive Process Report

Archive generates an Archive Process Report.


v If the Archive Process is scheduled, the process proceeds when scheduled and the report is saved to a
file. Open and print the process report from the Scheduler after the Archive Process completes.
v If the Archive Process is run immediately, the Archive Request Progress dialog displays a status
message as rows of data are archived from each table. The process report displays automatically when
the Archive Process completes and is retained according to defaults set on the Actions tab for Personal
Options. Review and print the report, as required.
v “Schedule an Archive Process” on page 88
Use this task to schedule an Archive Process. Use an Archive Process to select a precisely defined set of
related rows from a database and save the rows to an external Archive File. An Archive Process can be
scheduled either to run once or to run repeatedly at intervals.
v “Run an Archive Process Request” on page 88
Use this task to run an Archive Process immediately. Use an Archive Process to select a precisely
defined set of related rows from a database and save the rows to an external Archive File.

Chapter 3. Archive 87
Schedule an Archive Process
Use this task to schedule an Archive Process. Use an Archive Process to select a precisely defined set of
related rows from a database and save the rows to an external Archive File. An Archive Process can be
scheduled either to run once or to run repeatedly at intervals.

To schedule an Archive Process to run once at a specified future time or repeatedly at intervals, save the
Archive Request, and click File → Schedule from the menu.
v Processing is initiated at the scheduled time; you do not review the Archive Process as it is performed.
v If warning conditions exist, processing continues without prompting, depending on the Stop on Error
parameter you specified on the Steps tab of the Scheduling Job dialog.
v If an error occurs during the Archive Process, processing stops.

For details on scheduling, refer to the Common Elements Manual .

Run an Archive Process Request


Use this task to run an Archive Process immediately. Use an Archive Process to select a precisely defined
set of related rows from a database and save the rows to an external Archive File.

To process an Archive Request immediately, click File → Run in the menu. It is not necessary to save the
Archive Request before it is run.
v Before processing begins, the Archive Request is verified. If errors exist, you can review the details on
the message bar at the bottom of the Archive Request Editor.
v After the Archive Request has been verified, the process parameters are verified. If warnings or errors
exist, you can review the details in the Warnings dialog and choose to continue or cancel the Archive
Process.
v If an error occurs during the Archive Process, processing stops.

Error Messages
If error conditions are detected in the Access Definition or the Archive Request when the Archive Process
is run, processing stops and an error message is displayed. Error messages display in the message bar of
the Archive Request Editor.

For example, errors can occur if changes have been made to the tables since the Access Definition was
created.

Warning Messages
If one or more warning conditions exist, the Warnings dialog opens to report the details. Warning
messages indicate conditions that may require attention.

88 IBM Optim: Archive User Manual


Warnings Dialog
Sample warnings are shown in the following dialog.

Command Buttons
Proceed
Click Proceed to continue the Archive Process, regardless of warnings. Review details of
warnings in the Archive Process Report.
Abort Click Abort to cancel the Archive Process.

Archive Request Progress


When the Archive Process begins, the Archive Request Progress dialog displays current status
information.

Chapter 3. Archive 89
Objects

As common objects are archived, the number of each type is displayed.

Extended Objects

As additional objects are archived, the number of each type is displayed.

Data

Archive refreshes these details after a number of rows (specified on the Actions tab in Personal Options)
are archived for each table, and when archiving for one table completes and the process begins for the
next table. (Refer to the Common Elements Manual for more information.)
Rows Archived from current table
The number of rows archived from the current table.
Total Rows Archived
The total number of rows archived from all tables.

Delete

Rows are deleted table by table. Some tables may be revisited as relationships are traversed.

90 IBM Optim: Archive User Manual


Rows Deleted from current table
The number of rows deleted from the current table.
Rows not found in current table
The number of rows not found in the current table.
Rows failed current table
The number of rows that failed to be archived or deleted from the current table.
Total Rows Deleted
The total number of rows deleted from all tables.

Report

Rows are reported table by table. Some tables may be revisited as relationships are traversed.
Rows Reported from current table
The number of rows reported from the current table.
Total Rows Reported
The total number of rows reported from all tables.

Cancel Process

To stop the process, click Cancel Process. A confirmation dialog is displayed:


v To cancel the Archive Process, click Yes to return to the Archive Request Editor. You can review the
Archive Process Report, respecify parameters, and restart the Archive Process.
v To continue processing, click No to close the confirmation dialog.

Status Bar

Describes the action being performed and indicates the name of the table being processed, as applicable.

Process Time

Lists the elapsed process time for the Archive Process.

Archive Process Report


The Archive Process generates an Archive Process Report that provides general information and statistics
about the Archive Process.

The following is a sample of an Archive Process Report.

Chapter 3. Archive 91
92 IBM Optim: Archive User Manual
The Archive Process Report displays the following information:
v Name of the Archive Request (or Untitled if you did not save the request).
v Name of the Server where processing occurred, or (Local) for local workstation.
v Name of the generated Archive File, or Archive File segments.
v Name of the generated Archive Index File.
v Name of the Access Definition for the Archive Request or LOCAL.
v Name of the Storage Profile associated with the Archive Request or (None).
v Name of the File Access Definition associated with the Archive Request or (None).
v Indicator for whether file attachments are processed (Skipped or Processed).
v User IDs of the user requesting the Archive Process.
v Date and time the Archive Process started.
v Date and time the Archive Process completed.
v The elapsed time.
v Indicator for whether the Archive File is copied to a backup device (Yes or No). If Yes, the backup
device is displayed.
v The minimum retention period for protecting the generated Archive File if saved to an EMC Centera
Server, and whether the Archive File saved to disk is deleted or saved.
v The minimum retention period for protecting the generated primary and duplicate Archive Files if
saved to a WORM device.

Archive Process Warnings

A list of any warnings or errors that occur during processing is provided.

Process Summary

Statistics for the data archived are provided.


v Total number of Tables Processed.
v Total number of Rows Archived.
v Total number of Rows with Errors.
v Total number of First Pass Table Rows.

Object Details

The number of objects copied to the Archive File, or Not Selected if the object was not selected in the
Archive Request.

Row Details

Statistics for each table are provided.


v Total number of rows archived from each table.
v Total number of failed rows for each table.
v Names of tables used in the Archive Process. The tables are listed in the same order as in the Access
Definition.

Delete Process Report

If you elected to delete data after Archive Processing, a Delete Process Report follows the Archive Process
Report. The Delete Process Report contains details of the delete processing, including:
v Name of the Server where processing occurred, or Local, for local workstation.

Chapter 3. Archive 93
v Name of the Control File, specified on the Delete tab of the Archive Request.
v User IDs of the user requesting the process.
v Date and time the Delete Process started.
v Date and time the Delete Process completed.
v The elapsed time.
v Delete Process status. If errors or warnings occur during processing, a list of the errors or warnings is
provided.

Process Summary

Statistics for the data deleted are provided.


v Total number of Tables Processed.
v Total number of Rows Deleted.
v Total number of Rows Not Found.
v Total number of Rows with Errors.

Row Details

Statistics for each table are provided.


v Total number of rows deleted from each table.
v Total number of rows not found in each table.
v Total number of rows that failed in each table.
v Names of tables used in the Delete Process. The tables are listed in the same order as in the Access
Definition.

Statistical Information
If you selected the Generate Statistical Report check box on the Archive Request Editor for either the
Archive or Delete Process, detailed performance information for each step in the traversal path is
displayed at the end of the report.

The steps correspond to those displayed using the Show Steps command, available from the Tools menu
in the Access Definition Editor.

For more information about Archive Statistical Information, see “Statistical Reports” on page 311.

Save the Report


To save the report to a file, click File → Save As from the menu to open the Windows Save dialog.

Print the Report


To print the report, click File → Print from the menu to open the Print dialog.

Redisplay the Report


Click File → Redisplay Results → Current to redisplay the report from the last Archive Process run, or
click File → Redisplay Results → All to display a list of all retained Archive Process Reports.

For details about retaining process reports, see the Common Elements Manual .

94 IBM Optim: Archive User Manual


Chapter 4. Delete
Use the Delete Process to remove subsets of related data from a database. The Delete Process uses an
Extract or Archive File to identify the set of rows to be removed. Specifications for the Delete Process can
be stored as a Delete Request.

The Source File does not change during the Delete Process and can be used to reload or restore the
deleted data. You can use the Delete Process in combination with the Archive or Extract Process to safely
remove data from a database. You can save the data for future restoration, as required, or load that data
into another database or set of tables. (For details on creating an Archive File, see Chapter 3, “Archive,”
on page 63. For information about creating an Extract File, refer to the Move User Manual .)

Run or Schedule

You can process a Delete Request immediately (by clicking File → Run) or you can schedule the request
for processing at a later time (by clicking File → Schedule). You must save the request before it is
scheduled, but it is not necessary to save the request before it is run.

Naming Conventions

The fully qualified name of a Delete Request consists of: identifier.name.


identifier
Identifier that serves as the prefix for the Delete Request name (1 to 8 characters).
name Name assigned to the Delete Request (1 to 12 characters).

When you create Delete Requests, it is helpful to use a logical set of naming conventions to identify the
use for each and to organize them for easy access.

Section Contents

This section explains how to create, maintain, and process a Delete Request, including how to do the
following:
v Specify a Source File and Control File to be used for the Delete Request.
v Choose a commit frequency and assign a discard row limit.
v Specify whether tables should be locked during the Delete Process.
v Diagnose and modify the access method used to delete tables from the Source File.
v Specify notification options.
v Run, save, and schedule a Delete Request.
v Review, save, and print a Delete Process Report.

Open the Delete Request Editor


Use the Delete Request Editor to create and maintain requests to remove data from a database. These
requests are stored in the Optim Directory. There are different ways to open the editor depending on
whether you want to create a new request or select an existing request to edit.

Create a Delete Request


Use this task to create a Delete Request. A Delete Request is a set of specifications that determines how
the Delete Process deletes data.

© Copyright IBM Corp. 1994, 2010 95


To create a Delete Request:
1. In the main window, click File → New → Delete from the menu to open the Delete Request Editor.
2. Specify the Source File Type.
3. Specify the name of a Source File and a Control File.
4. Specify Process Options to complete the Delete Request.

These steps are the minimum required to create a Delete Request. After you create a Delete Request, you
can run the process immediately, or save the request and schedule it. Because the options to create and
modify a Delete Request are similar, see “Using the Delete Request Editor” on page 98 for complete
details.

Alternate Path
An alternate method for opening the Delete Request Editor is to click Actions → Delete in the main
window. By default, the last Delete Request you edited is shown.

Your next step depends on your purpose:


v To create a new Delete Request, click File → New in the Delete Request Editor.
v To create a new Delete Request modeled on an existing one, open the desired Delete Request and click
File → Save As in the Delete Request Editor.
v To create and store a copy of the active Delete Request and continue editing, click File → Save Copy As
in the Delete Request Editor.

Selecting a Delete Request to Edit


Use this task to select a delete request to edit.

To select a Delete Request to edit:


1. Click File → Open from the menu to open the object selection dialog.
2. Under Identifier, open Delete Request and click ID to display a list of Delete Requests.
3. To limit the list based on your criteria, specify these criteria under Pattern and click Refresh.
4. Double-click the grid row for the desired Delete Request to open the Delete Request Editor.

Open Dialog
The Open dialog is divided into two areas. The identifiers and object types (icons) are listed on the left
and the associated objects are displayed on the right.

The list of objects varies depending on the identifier you select.

96 IBM Optim: Archive User Manual


Pattern

Use a Pattern to limit the list of requests in the Open dialog. A Delete Request name consists of two
parts: identifier.name. The Pattern must also have two parts. You can use the % (percent) wild card to
represent one or more characters or use the _ (underscore) wild card to represent a single character in an
object definition name. (The underscore must be selected as the SQL LIKE character on the General tab of
Personal Options.)

Note: After you specify a Pattern, click Refresh to redisplay the list based on your criteria.

Chapter 4. Delete 97
Using the Delete Request Editor
In the Delete Request Editor, you can create, delete, or modify Delete Requests stored in the Optim
Directory.

Description
Enter text to describe the purpose of the Delete Request (up to 40 characters).
Server Name
If the optional Optim Server component is installed, you can delegate resource-intensive Delete
Request processing (for example, when the source file contains a large number of tables or rows)
to a machine hosting Optim Server.
Click the down arrow to select a machine hosting Optim Server, or select (Local) to process the
request on the local workstation.

Note: If the Optim Server machine option is not enabled at your site, Server Name is
unavailable.
Tabs

98 IBM Optim: Archive User Manual


The Delete Request Editor displays tabs that allow you to specify parameters and select options
for running a Delete Request. Each tab in the editor serves a unique purpose:
General
Specify parameters for the Delete Process, including the Source File Type, Source File
name, Control File name, and optional Process Options. Each time you open the editor,
the General tab is shown first.
Notify Specify options for automatic email notification of the success or failure of the process.

Tools Menu Commands

In addition to the standard commands on the File and Edit menus, you can select the following
commands from the Tools menu:
Edit Strategy
Open the Table Access Strategy dialog to select these processing options for each table:
v override the default method (scan or key lookup) of accessing the table
v specify the maximum number of lookups for the table
v select whether or not the table's row contents are compared.
Edit ACL
Open the Access Control List Editor to secure the Delete Request with an Access Control List.
Available when Object Security is enabled.
Delete ACL
Delete the Access Control List securing the Delete Request. Available for secured Delete Requests
only.

Table Access Strategy


The Table Access Strategy dialog allows you to modify the access method processing options for each
table in the Delete Request.

Access Method
Allows you to override the default method (scan or key lookup) of accessing each table in the
Delete Request. A scan reads all rows in a table at one time; whereas, a key lookup locates rows
using a WHERE clause to search for primary or foreign key values.

Note: You should only override the default method if the statistical information in the process
report indicates the default method is inefficient.

Chapter 4. Delete 99
Specify:
Default
By default, Archive determines whether to use a scan or key lookup.

Note: In general, a key lookup is used when a DBMS index is available, and a scan is
used when an index is not available.
Force Scan
Force Archive to use a scan.
Force Key Lookup
Force Archive to use a key lookup.

Note: Before selecting, you should verify that a DBMS index exists. Right-click a table
name in the grid and select Analyze Primary Key Index for this table to open the
Primary Key Index Analysis dialog. For more information, see “Primary Key Index
Analysis” on page 103.
To set all values in the parent or child column at once, you can rightclick the Table Access grid
column and click either Set All Default, Set All Force Key Lookup, or Set All Force Scan from
the shortcut menu.
Key Lookup Limit
Specify the maximum number of key lookups performed at one time for a table. Valid values are
1 through 100. By default, Archive looks at one key at a time.
Note that increasing the Key Lookup Limit can significantly improve performance. For example,
if you specify 5 for Key Lookup Limit and the key spans a single column, 5 key values are
searched in a single request to the DBMS.

Note: The following conditions must be true to edit the Key Lookup Limit column for a table:
v An index on the primary key is defined for the table.
v Compare Row Contents is not selected for the Delete Request.
v Row-level Archive Actions are not defined for the Delete Process (for example, Before Delete
of Row).
v The DBMS for the table is Sybase ASE, Informix, or SQL Server (if SQL Server is not using
Array Deletes).
v The table does not have any child tables.
You can right-click the Key Lookup Limit grid column and select the Set All command from the
shortcut menu to display the Key Lookup Limit for all tables dialog.

Use the Key Lookup Limit for all tables dialog to set the values for all tables in the Delete
Request at once.

100 IBM Optim: Archive User Manual


Compare Row Contents
Specify whether to compare the row contents before deleting. For a table in the Delete Request,
click the down arrow to select one of these values:
v Default - If the table has a non-unique Primary Key, the default is to compare row contents,
regardless of the setting for Compare Row Contents in the Delete Request. To override the
default, use Compare Never. For a table with a unique Primary Key, the default is to use the
setting for Compare Row Contents in the Delete Request.
v Compare Always - If the table has a non-unique Primary Key, specifying Compare Always has
no effect since these rows are always compared, regardless of the setting for Compare Row
Contents in the Delete Request. For a table with a unique Primary Key, use Compare Always to
override or augment the setting for Compare Row Contents in the Delete Request.
v Compare Never - Use Compare Never if you do not want row contents to be compared. This
overrides the setting for Compare Row Contents in the Delete Request. This might improve
performance significantly. However, you risk losing any updates to the data in the database
since the Archive or Extract was performed. Optim displays a warning message which you
must acknowledge before you can proceed with the Delete.

Refer to the table below for information on the delete options and their potential results.
Table 1. Database Types, Processing Options and Expected Results
Primary Delete
Key processing
Index Compare Archive when
(non- Never Actions Key Access
unique option or Delete Lookup Method
or no set for File Limit is Expected Risks/Warnings/
Database index) table? attached? setting default result Comments
Oracle or non- Yes No N/A Array All rows Additional rows with same Primary
DB2 unique delete deleted Key may be deleted.
index used
Oracle or non- Yes Yes N/A Cursor All rows Wrong rows with same Primary Key
DB2 unique controlled deleted may be deleted.
index individual
Primary
Key
delete
Database non- Yes No >1 Multiple All rows Additional rows with same Primary
is NOT unique key deleted Key may be deleted.
Oracle or index delete
DB2

Chapter 4. Delete 101


Table 1. Database Types, Processing Options and Expected Results (continued)
Primary Delete
Key processing
Index Compare Archive when
(non- Never Actions Key Access
unique option or Delete Lookup Method
or no set for File Limit is Expected Risks/Warnings/
Database index) table? attached? setting default result Comments
Database non- Yes No =1 Individual Only first Additional rows with same Primary
is NOT unique Primary row in Key may be deleted.
Oracle or index Key the
DB2 delete – duplicate
NOT Primary
cursor Key table
controlled is
marked
as
deleted;
other
rows
with the
same
Primary
Key will
be
marked
as "Not
Found".
Database non- Yes Yes N/A Cursor All rows Wrong rows with the same Primary
is NOT unique controlled deleted Key may be deleted.
Oracle or index individual
DB2 Primary
Key
delete
All no index Yes Yes N/A Cursor All rows Wrong rows with the same Primary
databases controlled deleted Key may be deleted.
delete
using
table
scans
All no index Yes No N/A Individual Only first Additional rows with the same
databases Primary row in Primary Key may be deleted.
Key the
delete–NOTDuplicate
cursor Primary
controlled Key set is
marked
as
deleted–other
rows
with the
same
Primary
Key will
be
marked
as "Not
Found"

102 IBM Optim: Archive User Manual


Primary Key Index Analysis

Right-click a table name in the Table Access Strategy dialog and select Analyze Primary Key Index for
this table or Analyze Primary Key Index for all tables to open the Primary Key Index Analysis dialog.

This dialog provides information to help you determine which tables have an index on the primary key.
Providing this information allows you to determine which access method is most effective for each table
in the Delete Request, as Key Lookup requires an index on the primary key.

Additionally, you can create an index for tables in the Delete Request, if none exist.
Table The name of the table in the Source File referenced by the Delete Request.
Status The status of the index for the listed table(s). Possible status values are:
DBPK An index on the database primary key is defined for the table and is used to access the
table.
Unique
A unique index on an Optim primary key is defined for the table. The primary key
columns may be indexed in any order.
Full An index on an Optim primary key is defined for the table. The index includes all
primary key columns at the beginning of the index, in any order, but can include
additional columns.
Partial An index on an Optim primary key is defined for the table. The index includes at least
one primary key column at the beginning of the index, but can include additional
columns.
None No index exists with the necessary columns.
Indeterminate
Archive attempted to create DBMS indexes. Click Refresh to analyze the new data.
No PK
No primary key is defined for the table.

Chapter 4. Delete 103


Table Not Found
The DB Alias referencing the database tables does not exist in the current Optim
Directory.

Shortcut Menu

Using the shortcut menu, you can create needed DBMS indexes. Right-click the grid on the Primary Key
Index Analysis dialog to display a shortcut menu.

If the status of an index is shown as Partial, or None, select from the following shortcut menu options to
create necessary indexes:
Create Index
Select to display the Review SQL dialog. The display generates SQL statements for creating the
DBMS index.
Create All Indexes
From the submenu, select the DB Alias for the table to be indexed, displaying the Review SQL
dialog. The display generates SQL statements for creating the indexes.

Review Index SQL

New indexes are named using the following syntax.

I_tablenam nnnnnnnn
I_ Prefix for index name.
tablenam
First eight letters of the table name.

104 IBM Optim: Archive User Manual


nnnnnnnn
Eight-digit, sequential number.

Modify the name of the index, or other parts of the statements as necessary, then click Proceed to create
the indexes.

The Browse Output dialog displays the results, after the SQL statements are executed.

General Tab, Delete Request Editor


Use the General tab to specify the Source File and Control File used by the Delete Request, and to
specify the processing options.

Source File Type

Select Extract or Archive, to indicate the type of Source File used.

Chapter 4. Delete 105


Source File

Enter the name of the Extract or Archive File that contains the data to delete. Extract Files have an .xf
extension by default. Archive Files have an .af extension by default.

Control File

Enter the name of a Control File. This file is used during the process to track the success or failure of
each row in the Source File. Control Files have a .cf extension by default.

If you specify a Control File name that already exists, a confirmation dialog prompts you to confirm that
you want to overwrite the file when you run the Delete Request. Use a Personal Option to disable this
feature.

Note: You can browse the contents of an Extract, Archive, or Control File by clicking Utilities → Browse
from the menu or by rightclicking and clicking Browse from the shortcut menu. For details, refer to the
Common Elements Manual.

If you do not specify a path for either of these file names, the process uses the drive and directory
defined in Personal Options as the default Data Directory.

Process Options

Specify the following options to manage the Delete Process:


Commit Frequency
Enter the number of rows to process before committing the changes to the database, up to a
maximum of 999999. Clear this box to use the number specified in Product Options. (Refer to the
Installation and Configuration Guide .) Frequent commits keep locking to a minimum, but might
slow the process.
If the process ends abnormally, click Utilities → Restart/Retry from the menu to resume
processing from the last commit point. Refer to the Common Elements Manual.
Lock Tables
Select this check box to lock each database table until all rows in the Source File for that table are
processed. Lock tables to ensure that other database activity does not interfere with the process
and to prevent other users from accessing tables involved in the process.

Note: Since this behavior may be undesirable for some organizations, permission to lock tables
can be denied. Clear the Allow Users to Lock Tables check box on the Database tab in Product
Options.
Review Archive Delete List
Select this check box to display the Delete After Archive Specifications dialog during processing.
Use this dialog to review delete options for tables in an Archive File and select tables from which
rows are deleted. (Refer to “Delete Data” on page 86.)
Generate Statistical Report
This check box is selected by default to include statistical information in the Delete Process
Report. (For details, see “Statistical Information” on page 111.)

Note: Statistical information may indicate whether you can improve performance by overriding
the default method (scan or key lookup) of accessing a table. (For details, see the Common
Elements Manual. )
Discard Row Limit

106 IBM Optim: Archive User Manual


Enter the number of rows that can be discarded, up to a maximum of 99999999. The process
stops after the specified number is reached and all rows in the array are processed.

Notes:
v Discard Row Limit is an approximate value due to array processing for the Delete Process. For
example, assume the discard limit is set to 50 and the array supports 200 rows for a given
table. If the first 50 rows fail, the DBMS continues to process the other 150 rows in the array,
before evaluating the discard limit. (The number of rows that can be deleted via one call to the
DBMS depends on the size of the row.)
v To allow an unlimited number of rows to be discarded, specify zero (0) or leave blank.
Compare Row Contents
Select this check box to compare rows of data in the Source File with rows in the database prior
to deletion. Rows are deleted from the database that exactly match rows in the Source File, and
rows that do not exactly match are discarded and noted in the Control File. If you clear this
check box for a table with a unique Primary Key, the row comparison is not performed, and rows
can be deleted from the database that do not exactly match rows in the Source File.
For a table with a non-unique Primary Key, clearing this check box will have no effect. This is the
default. Its purpose is to eliminate the risk of losing updates to the data in the database since the
Archive or Extract was performed. You can override this default using Tools → Edit Strategy to
display the Table Access Strategy panel. (For details see “Using the Delete Request Editor” on
page 98..)
Include LOB columns in row comparison
This option is available only when Compare Row Contents is selected. Select this check
box to include LOB columns in the row comparison. Clear this check box to exclude LOB
columns from the row comparison. (This check box is selected by default.)

Clearing these check boxes might improve performance significantly. However, you risk losing
any updates to the data in the database since the Archive or Extract was performed. Also, you
will not receive any warning conditions (for example, a “not found” condition if a row in the
Source File does not exist in the DBMS).
Verify Table Structure in Database
Select this check box to verify that all columns in the source file match the columns in the
database for each table, before deleting a row. (If columns do not match, processing is canceled,
and an error message is written to the Delete Process Report.) When the Source File is an Archive
File, this check box is unavailable, and selected by default. Columns match when:
v The number of columns is the same for each table.
v The names of the columns are the same.
v The column attributes are compatible.
Database Connections
Increase the number of concurrent database connections for the Delete Process. Increasing
database connections improves performance when processing large quantities of data by allowing
multiple threads to delete rows concurrently.
To increase the maximum number of connections, select an even number from 2 to the site
maximum as specified in Personal Options.

Notes:
v Option is available only if the value of Maximum Database Connections on the Actions tab of
Personal Options is 2 or greater. (Refer to the Common Elements Manual. )
v For performance reasons, you can only select an even number of database connections.

Chapter 4. Delete 107


v Only tables with unique indexes are processed in parallel.
v If Lock Tables is selected, tables are not processed in parallel.
v In a Delete Process, only requests with 1000 or more rows are processed in parallel.
v A table is not processed in parallel from an Oracle or Sybase ASE database, when the Access
Method is User Forced Scan.
v Some tables may not be processed in parallel due to database RI constraints.

Notify Tab, Delete Request Editor


Use the Notify tab to specify options and addresses for automatic email notification of the success or
failure of the process. The process report generated when the process completes is automatically sent as
an attachment.

Process a Delete Request


You can process a Delete Request at any time. However, if you create a new Delete Request and want to
use it again, you must save the request.

Note: For Oracle users: when the Oracle array delete feature is used during a Delete Process, rows not
found are listed as deleted in the Delete Process Report. To turn off the array delete feature, clear Use
Oracle Array Delete on the Database tab of the Product Options dialog.

Schedule a Delete Request


Use this task to schedule a Delete Request. Use a Delete Request to delete a defined set of related rows
from a database. A Delete Request can be scheduled either to run once or to run repeatedly at intervals.

To schedule a Delete Request to run once or repeatedly at a specified future time, save the Delete
Request, and click File → Schedule.
v Processing is initiated at the scheduled time.
v If warning conditions exist, processing continues without prompting, depending on the Stop on Error
parameter you specified on the Steps tab of the Scheduling Job dialog.
v During processing, if an error occurs, processing stops.

For details, refer to the Common Elements Manual.

Run a Delete Request


Use this task to run a Delete Request. A Delete Request removes subsets of related data from a database.

To process a Delete Request immediately, click File → Run. It is not necessary to save the Delete Request
before it is run.
v Before processing begins, the request is verified. If warning conditions exist, you can review the details
in the Warnings dialog, and choose to continue or cancel processing.
v During processing, if an error occurs, processing stops.

A progress dialog and status messages provide information while the request is processing. When
processing completes, or stops because of an error, you can review the details on the Delete Process
Report. You can also browse the Control File to review process details.

108 IBM Optim: Archive User Manual


Delete Request Progress Dialog
During the Delete Process, the Delete Request Progress dialog displays status information.

Totals
Rows to be deleted
Total number of rows from the Source File to be processed.
Number of Rows Completed
Total number of rows that have been processed.

The totals in the Delete Request Progress dialog are revised after a number of rows are deleted for each
table, after a number of seconds pass, and when the delete for one table completes and the process begins
for the next table.

Note: The frequency with which the Progress dialog is updated (in other words, the number of rows and
seconds) is specified on the Actions tab in Personal Options. (Refer to the Common Elements Manual. )

Current Table
Deleted Rows
Total number of rows deleted.
Rows not found
Total number of rows that could not be found.
Failed Rows
Total number of rows that could not be processed (failed) and were discarded.

Cancel Process

To stop the process, click Cancel Process. A confirmation dialog is displayed:


v To cancel the Delete Process, click Yes to return to the Delete Request Editor. You can review the Delete
Process Report, respecify parameters, and restart the Delete Process.
v To continue processing, click No to close the confirmation dialog.

Chapter 4. Delete 109


Status Bar

Describes the action being performed and indicates the name of the table being processed, as applicable.

Process Time

Lists the elapsed process time for the Delete Process.

Delete Process Report


The Delete Process generates a Delete Process Report that provides general information and statistics
about the Delete Process.

The following is a sample:

The Delete Process Report displays the following details:


v Name of the Delete Request (or Untitled if not saved).
v Name of the Server or Local, for client workstation.
v Directory path and name of the Source File used as input.

110 IBM Optim: Archive User Manual


v Directory path and name of the Control File specified in the request.
v User IDs of the user requesting the Delete Process.
v Date and time the Delete Process started.
v Date and time the Delete Process completed.
v Elapsed time for the Delete Process to complete.
v Indicator that the Control File was retained or deleted.

Errors

If any errors or warnings occur during processing, a list of the errors or warnings is provided. Review
the list of errors that caused processing to stop. For example, an internal error condition exists when the
process exceeds the discard row limit or if you are not authorized to access a particular database table.
You can make necessary corrections and restart or retry the process.

Process Summary

Statistics are provided for the deleted data:


v Total number of Tables Processed.
v Total number of Rows Deleted.
v Total number of Rows Not Found.
v Total number of Rows with Errors.

Row Details

Information is provided for each table:


v Number of rows deleted.
v Number of rows not found.
v Number of rows failed.
v List of tables used in the Delete Process. The tables are listed in the same order as in the Source File.

Statistical Information
If you selected the Generate Statistical Report check box on the Delete Request Editor, detailed
performance information for each table to be deleted is displayed at the end of the report.

Each table consists of database and table information as well as delete strategy and performance data.

For more information about Delete Statistical Information, see “Statistical Reports” on page 311.

Save the Report


To save the report to a file, click File → Save As to open the Windows Save dialog.

Print the Report


To print the report, click File → Print to open the Windows Print dialog.

Redisplay the Report


If you close the report and need to refer to it again, click File → Redisplay Results → Current to redisplay
the report from the last Delete Process run, or click File → Redisplay Results → All to display a list of all
retained Delete Process Reports.

For details about retaining process reports, see the Common Elements Manual.

Chapter 4. Delete 111


112 IBM Optim: Archive User Manual
Chapter 5. Insert
Use an Insert Process to insert data from an Archive File or Extract File into a destination database.

If the file contains data from tables that do not exist at the destination, the Insert Process uses object
definitions in the file to create the tables. Specifications for the Insert Process are embodied in an Insert
Request, which may be named and saved in the Optim Directory, so that it is available for a variety of
users and uses. An Insert Request may also be embedded in a Restore Request, in which case it is not
named and is not accessible except by editing or using the Restore Request. (See Chapter 8, “Restore,” on
page 209.) Based on your specifications, you can:
v Insert new rows only. If the primary key value for a source table row does not match that of a row in
the destination table, the process inserts the row. If the primary key value for a source row matches
that of a row in the destination table, the source row is discarded.
v Insert new rows and update existing rows. If the primary key value for a source table row does not
match that of a row in the destination table, the process inserts the row. If the primary key value for a
source row matches that of a row in the destination table, the process updates the destination row.
v Choose the type of processing for each table.

Mapping and Transformation

You must use a Table Map to identify the destination tables for data in the Archive or Extract File. You
may also use Column Maps to control or transform the data inserted in destination columns.

Load versus Insert

Archive can move data into a database by using an Insert Process or a Load Process. Consider the
following when deciding the best method:
v The volume of data and the speed of load processing might offset the advantages of the Insert Process.
v Referential integrity (RI) cycles may exceed the capability of the Insert Process to insert all the data
successfully.
v A load utility prevents user access during processing. The database is available to other users during
Insert processing.
v The load utility either inserts new data or replaces existing data. The Insert Process provides
Update/Insert Processing in one step.

Run Online or Automate

You can process an Insert Request immediately (by clicking File → Run). You can also run an Insert
Request from the command line, whether manually, in batch, or from an external application. When
running a process from the command line, you can supply overrides for various Insert Request
parameters and settings to tailor the process to circumstances as they exist at runtime. (See Chapter 12,
“Command Line Interface — Processing Utilities,” on page 327 for more information.) Named Insert
Requests can also be scheduled for automated processing by clicking File → Schedule.

Naming Conventions

The fully qualified name of an Insert Request is in the form: identifier.name.


identifier
Identifier that serves as the prefix for the Insert Request name (1 to 8 characters).
name Name assigned to the Insert Request (1 to 12 characters).

© Copyright IBM Corp. 1994, 2010 113


When you create Insert Requests, it is helpful to use a logical set of naming conventions to identify the
use for each and to organize them for easy access.

Section Contents

This section explains how to create, maintain, and process Insert Requests, including how to:
v Identify the Source File containing the data to insert and the Control File used to record information
about the process.
v Select or create a Table Map and Column Maps to map the source data to the destination.
v Provide default parameters to adjust dates or convert currency in specified columns.
v Provide notification options.
v Run, save, and schedule an Insert Request.
v Review, save, and print an Insert Process Report.

Open the Insert Request Editor


Use the Insert Request Editor to define and maintain requests to insert or update data.

These objects can be stored in the Optim Directory to be re-used or may be referenced by or incorporated
into a Restore Request. See Chapter 8, “Restore,” on page 209 for information needed to create or open an
Insert Request from the Restore Request Editor. On a standalone basis, there are different ways to open
the editor depending on whether you want to create a new request or select a request to edit.

Create an Insert Request


Use this task to create an insert request. An Insert Process to insert data from an Archive File or Extract
File into a destination database.

To open the Insert Request Editor from the Main window, you can:
v Click Actions → Insert or click File → New → Insert to display the Insert Request Editor populated as
when last closed.
v Click File → Open to display the Open dialog and select a named Insert Request from the Optim
Directory.

See the Common Elements Manual for information about the Open dialog.

From the Insert Request Editor, you can:


v Create a new Insert Request by clicking File → New in the Insert Request Editor.
v Model a new Insert Request on an existing one by opening the desired Insert Request and clicking File
→ Save As.
v Save a copy of the active Insert Request by clicking File → Save Copy As.

114 IBM Optim: Archive User Manual


Using the Insert Request Editor
Use the Insert Request Editor to define or edit an Insert Request to be used for Optim processing.

Description
Optional text to identify the Insert Request (up to 40 characters).
Server Name
If the Optim Server is licensed and installed, you can direct resource-intensive Insert Processing
(for example, when the source file contains a large number of tables or rows) to a machine
hosting the Server.
Click the down arrow to select a machine hosting Optim Server, or select Local to process the
request on the local workstation.

Note: If the Optim Server option is not enabled at your site, Server Name is unavailable.
Tabs The Insert Request Editor tabs group parameters and options that you may need to define and
maintain Insert Requests. Each tab in the editor serves a unique purpose.

Chapter 5. Insert 115


General
Specifications for the process, including the names of the Source File, Control File, and
Table Map. Each time you open the editor, the General tab is shown first.
Age Function
Default parameters for optional aging of data in columns for which an Age function is
indicated in a Column Map.
Global Aging
Default parameters for optional aging of data in columns that have a native date data
type.
Currency
Default Currency Table and currency conversion parameters for columns with a native
currency data type.
Report Options
Parameters for displaying errors and aging specifications on the process report.
Notify Options for automatic email notification of the success or failure of the process.

Menu Commands

In addition to the standard File, Edit, and Tools menu commands, you can select the following
commands from other menus in the Insert Request Editor:
Tools Menu
Convert to Local
Embed the Insert Request in the Restore Request. (Available only when editing a named
Insert Request as an adjunct to editing a Restore Request.)
Edit Table Map
Open the Table Map Editor, and create, edit, or browse a Table Map to be used with the
active Insert Request. For complete details on Table Maps, refer to the Common Elements
Manual.
Edit Table Specifications
Open the Insert Request Table Specifications dialog and select tables to include in Mixed
(selective) processing. For more information, refer to “Insert Request Table Specification
Dialog” on page 120.
Edit Directory Map
Open the Directory Map dialog and map file attachments to destination directories. For
more information, refer to “Directory Map Dialog” on page 122.
Options Menu
Show Aging Show Currency
Select a command to hide or display the corresponding tabs.

116 IBM Optim: Archive User Manual


General Tab, Insert Request Editor
To insert data, you must identify the source and provide other parameters to control processing.

Source File

The name of an Archive or Extract File used as the basis for the Insert Request. This file provides the
data model for a Table Map created from within the Insert Request and, unless overridden, the data to be
inserted.

Control File

The name of a Control File, used to track the success or failure of processing each row in the Source File.
The .cf extension is added by default.

If you enter the name of an existing Control File, a dialog prompts to confirm that you want to overwrite
the file when you run the Insert Request. To disable the confirmation prompt, use Personal Options.

Chapter 5. Insert 117


Note: You can browse the contents of a Source or Control File by clicking Utilities → Browse or by
rightclicking and selecting Browse from the shortcut menu. For details on the Browse Utility, refer to the
Common Elements Manual.

If you do not provide a path with file names, the default Data Directory defined in Personal Options is
used.

Table Map Options

A Table Map used to match data in the Source File to destination tables or to exclude data from selected
tables from processing. An Insert Request must reference a valid Table Map in order to be saved or
processed. Click Tools → Edit Table Map to display the Table Map referenced for Insert processing. For
details on how to create, edit, or merge Table Maps, refer to the Common Elements Manual.

A Table Map may reference a Column Map for any pair of tables to:
v Map source and destination columns that are compatible, but have dissimilar names.
v Transform source column values before inserting them into destination columns.
v Bypass processing for specific columns.

Local Embed a Table Map in the Insert Request. Local Table Maps are saved as part of the Insert Request and
can only be used with it.
Named Create a new Table Map or select an existing Table Map to use with the Insert Request. You must
provide a name for the Table Map.
Note: If the database structure has changed since the Table Map was last used, a warning is displayed.
Table The Table Map used for Insert processing.
Map
identifier Identifier (1 to 8 characters) for the Table Map.
Name
name Name of the Table Map (1 to 12 characters).
Always Display the Table Map each time you save or run the Insert Request. Clear this check box to display the
View Table Map only when necessary (for example, when the Table Map data structure does not match that of
Table the Source File data).
Map

Delete Options

Options for deleting data from destination tables before Insert processing. Delete is useful for refreshing
data during testing. If a row cannot be deleted for any reason, any rows deleted since the last commit are
restored, and insert processing stops. Note that the Insert Delete Options do not govern a relational
delete; to perform a relational delete, you must click Actions → Delete in the main window.
All Tables
Delete all data from all tables before Inserting source data. If you choose this option, you must
also select a Delete Commit option.

Note: Valid with the Insert Process Option only.


Mixed Before Insert processing, delete all data from tables selected on the Insert Request Table
Specification dialog. (See “Insert Request Table Specification Dialog” on page 120 for more
information.) If you choose this option, you must also select a Delete Commit option.

Note: Valid with the Insert or Mixed Process Option only.


No Tables
Retain all rows in all tables.

118 IBM Optim: Archive User Manual


Delete Commit
Options for committing database deletions when All Tables or Mixed is selected.
After Each Table
Commits changes to the destination database after deleting all rows from each selected
table.
On Completion
Commits changes to the destination database after deleting all rows from all tables or all
selected tables.

Process Options

Options for the type of processing to be used. Additional parameters allow you to lock tables, set a
commit frequency and limit the number of discarded rows.
Insert Insert rows into the tables. If the primary key value for a source table row does not match that of
a row in the destination table, the process inserts the row. If the primary key value for a source
row matches that of a row in the destination table, the source row is not processed and is marked
as discarded in the Control File.
Update Only
Update rows in the tables. If the primary key value for a source table row matches that of a row
in the destination table, the process updates the row If the primary key value for a source row
does not match that of a row in the destination table, the source row is not processed and is
marked as failed in the Control File.

Note: Update Only is invalid if the Delete Option is All Tables or Mixed.
Update/Insert
Insert and update rows. If the primary key value for a source table row does not match that of a
row in the destination table, the process inserts the row. If the primary key value for a source row
matches that of a row in the destination table, the process updates the destination row.

Note: Update/Insert is invalid if the Delete Option is All Tables or Mixed.


Mixed Process each table according to the corresponding selection on the Insert Request Table
Specification dialog. (See “Insert Request Table Specification Dialog” on page 120 for more
information.)

Note: Mixed is invalid if the Delete Option is All Tables.


Lock Tables
Lock each table while source rows are processed. Use Lock Tables to ensure that other database
activity does not interfere with the process, taking into consideration, that locking prevents other
users from accessing a table during processing. If a Product Options setting prevents table locks,
this option is disabled.
Process File Attachments
Process file attachments in the Source File. Each file attachment is restored to a location provided
by the Directory Map. (For more information, refer to “Directory Map Dialog” on page 122.)
Commit Frequency
The number of rows processed before changes are committed to the database. Clear this box to
use the Maximum Commit Frequency established in Product Options or enter a value up to
999999. This option is disabled if Lock Tables is selected.
When choosing a commit frequency, consider the following:
v Frequent commits reduce table locking, but may slow the process.

Chapter 5. Insert 119


v If the process ends abnormally, you can click Utilities → Restart/Retry from the menu to
resume processing from the last commit point. Refer to the Common Elements Manual.
Discard Row Limit
The number of rows (zero to 99999999) that can be discarded. To allow an unlimited number of
rows to be discarded, specify zero (0) or leave blank.
The process stops after the limit is reached and all rows in the array are processed, allowing you
to troubleshoot or modify the Insert Request. You can then click Utilities → Restart/Retry from the
menu to resume processing at the point at which the process stopped.

Disable Triggers

Options for processing database triggers during the Insert Process. You can disable triggers for Oracle,
Informix, and SQL Server (Version 7 or later), and Sybase ASE (Version 12 or later).
Always
Disable all database triggers for the Insert Process, re-enabling the triggers after the process
completes.
Never Execute all database triggers during the Insert Process.
Prompt
Display the Disabling Trigger/Constraint Confirmation dialog, listing tables for each DB Alias
with the corresponding triggers and constraints. You can selectively disable database triggers
during the Insert Process and selectively re-enable triggers when the process is complete. (For
more information, refer to “Disable Triggers and Constraints” on page 123.)

Disable Constraints

Options for disabling relational integrity constraints. You can disable relational integrity constraints for
Oracle, Informix, and SQL Server (Version 7 or later).
Always
Disable constraints during the Insert Process, re-enabling the constraints after the process
completes.
Never Retain referential integrity constraints. When this option is selected, a warning message is
displayed during processing.
Prompt
Display the Disabling Trigger/Constraint Confirmation dialog, listing tables for each DB Alias
with the corresponding triggers and constraints. You can selectively disable database constraints
during the Insert Process and selectively re-enable constraints when the process is complete. (For
more information, refer to “Disable Triggers and Constraints” on page 123.)

Always Call Create

Select this check box to start the Create Utility before the Insert Process begins, to allow you to create or
drop objects in the destination database. Clear this check box to start the Create Utility only when
necessary to create desired objects in the destination database.

Insert Request Table Specification Dialog


Use the Insert Request Table Specification dialog to specify whether a destination table is to be processed
in a certain way during an Insert Request. The types of processing available depend upon whether you
select the Mixed Delete Option or the Mixed Processing Option.

120 IBM Optim: Archive User Manual


Mixed Delete Option

When you select the Mixed Delete Option, use the Insert Request Table Specification dialog to select
tables from which data is deleted before Insert processing occurs. You can click Tools → Edit Table
Specification or simply save, run, or schedule the Insert Request to display the Insert Request Table
Specification dialog automatically.

The Insert Request Table Specification dialog contains a Delete column, which you can use to indicate the
tables from which data is deleted before Insert processing occurs.
v If you do not select any tables, the Delete Option changes to No Tables.
v If you select all tables, the Delete Option changes to All Tables.

Mixed Processing Option

When you select the Mixed Processing Option, use the Insert Request Table Specification dialog to select
the type of processing for each table before Insert processing occurs. You can click Tools → Edit Table
Specification or simply save, run, or schedule the Insert Request to display the Insert Request Table
Specification dialog automatically.

Chapter 5. Insert 121


For each table, you can click the Update grid cell to select a process option from the drop-down list. The
process options include Insert, Update/Insert, and Update Only. You can also right-click and use shortcut
menu commands to select an option for all tables. If all tables are set to a single option, the Process
Option changes to match.

Directory Map Dialog


When you process file attachments, use the Directory Map dialog to direct them to a destination.

You can click Tools → Edit Directory Map or simply save, run, or schedule the Insert Request to display
the Directory Map dialog automatically.

122 IBM Optim: Archive User Manual


By default, file attachments are returned to the directory from which they were extracted. Source
identifies the original directory from which file attachments were extracted. Destination identifies the
directory where files from the corresponding source directory are placed.

You can edit both directories in the Directory Map by entering a path or using the browse button. All
source entries must be unique. If the specified source directory does not match the original path, or if the
source is blank, the Default Path is used for the insert. If the Default Path is not found, the Insert Process
will attempt to insert the file into the original path. If no matching paths are found, the Insert Process
will stop before inserting any data. Several shortcut menu commands are available. Select Remove to
remove one row of source and destination entries, or select Remove All to remove all entries. Select
Clear Column to remove all entries for the source or destination. Use Add Entries from File to add the
original paths found in the Archive or Extract File.

Disable Triggers and Constraints


The Disabling Trigger/Constraint Confirmation dialog allows you to selectively enable and disable any
triggers or constraints during and after processing.

The Disabling Trigger/Constraint Confirmation dialog is displayed at runtime if you select the Prompt
option for Disable Triggers, Disable Constraints, or both, on the General tab for the Insert Request Editor.

Chapter 5. Insert 123


Note: When running the Insert Request from the Command Line, the Monitor keyword governs the
display of the Disabling Trigger/Constraint Confirmation dialog. If the display is suppressed (using M-),
all triggers and constraints are disabled during processing and enabled after processing.

The Disabling Trigger/Constraint Confirmation dialog is divided, displaying one or more tabs that list
tables to be processed in the upper half and tabs in the lower half that list any database triggers and
referential integrity constraints for each table.

List of Tables

A tab for each DB Alias lists the tables in the database referenced by the DB Alias. Click a Focus Arrow
grid cell to reposition the arrow, or use the up/down arrows on your keyboard. The tabs on the lower
half of the dialog list triggers and constraints for the table indicated by the focus Arrow.

Trigger List and Constraint List Tabs

On both the Trigger List or Constraint List tab, you can click a Status During Process or Status After
Process grid cell to select Enabled or Disabled status for each table or you can right click a Status During
Process or Status After Process grid column to select Enabled or Disabled status for all tables.

For Informix tables, you can select a status of Enabled, Disabled, With Vio, or No Vio. If you select
Enabled, the Informix default for violation tables applies. Alternatively, you can select With Vio to enable
the constraint and use a violation table or No Vio to enable the constraint and not use a violation table.

Age Function Tab, Insert Request Editor


Use the Age Function tab on the Insert Request Editor to adjust dates during an Insert Request by using
the Age function.

You must select Show Aging to display the Age Function tab, which you can use to provide parameters
for a Column Map used to age data. These values apply when you specify the Age function as AGE(DEF)
or AGE(RU=DEF) and are also used, if needed, to complete date adjustment specifications for columns
defined with the Age function.

124 IBM Optim: Archive User Manual


Date Adjustment Values

Select one of the following options:


None An aging increment is not used.
Years, Months, Weeks, Days
Dates are adjusted incrementally by the specified number of years, months, weeks, and days.
Years Number of years (-2500 to 1581) used to adjust the date.
Months
Number of months (-30000 to 30000) used to adjust the date.
Weeks Number of weeks (-30000 to 30000) used to adjust the date.
Days Number of days (-99999 to 99999) used to adjust the date.
Specific Year
A four-digit year (1582 to 3999).

Chapter 5. Insert 125


Specific Date
A date in the format determined by the Regional Settings on the Control Panel of your computer.
Edit the date displayed or select from a perpetual calendar by clicking the down arrow. The
system (current) date is the default.
Base/Target
A calculated adjustment for dates equal to the number of days between the Base date and the
Target date. Edit the date displayed or select from a perpetual calendar by clicking the down
arrow.
Base An explicit date. The system (current) date is the default.
Target An explicit date before or after the Base date. If the Target date occurs before the Base
date, the adjustment is negative.
Multiple/Rule
A rule-based adjustment. For example, if 4 is the multiple for NEXTPAYDAY, source dates are
adjusted to the fourth NEXTPAYDAY.
Multiple
Number of times (1 to 30000) to apply the Rule.
Rule Name of the rule.

Date Adjustment Options


Calendar
The default calendar. To select from a list of available calendars, click the down arrow.
Rule The default rule. To select from a list of available rules, click the down arrow.

Note: Define calendars and rules by clicking Utilities → Calendar. For details, refer to the
Common Elements Manual .
Century Pivot
The value used to determine the appropriate century for two-digit years. If you do not provide a
value, 65 is the default.
For example, if 55 is the Century Pivot:
v All two-digit years equal to or greater than 55 are assumed to be in the 20th century (19xx).
v All two-digit years less than 55 are assumed to be in the 21st century. (20xx)

Exception Options

Use exception options to manage invalid or skipped date values.


Process rows with invalid dates
Select this check box to process rows with invalid dates in date columns. Invalid dates are moved
directly from the source to the destination if the column attributes are identical. Clear the check
box to discard rows with invalid dates.
Process Rows with skipped dates
Select this check box to process rows with skipped dates in date columns. Invalid dates are
moved directly from the source to the destination if the column attributes are identical. Clear the
check box to discard rows with skipped dates.

At times, special values used to indicate special handling or unique conditions are called skipped dates.
A skipped date value is parsed according to the specified date format or exit routine.

In addition to spaces, hexadecimal 00 (low values), or hexadecimal FF (high values), Optim recognizes
the following as skipped dates:

126 IBM Optim: Archive User Manual


Date Format Skipped Date Value
Y/M/D 1999/99/99
9999/99/99
9999/12/31
1900/0/0
2000/0/0
0/0/0
1/1/1
Y/J 1999/999
9999/999
1900/0
2000/0/0
0/0
Y/M 1999/999
9999/999
1900/0
2000/0
0/0
Y 9999
0
M/D 99/99
0/0
M 99
0/0
D 9/9
0/0

This list is intended to be as comprehensive as possible. If you require additional skipped dates, contact
Optim Support.

Global Aging Tab, Insert Request Editor


Use the Global Aging tab to specify parameters for aging data in columns defined with a native date
data type. Global Aging parameters apply to all date columns not specifically defined by an Age function
in a Column Map.

Note: The parameters shown on the Global Aging tab are the same as those shown on the Age Function
tab. For information about each parameter, see “Age Function Tab, Insert Request Editor” on page 124.

Currency Tab, Insert Request Editor


Use the Currency tab to indicate the default Currency Table to use when the Currency function is defined
in a Column Map. Specify global parameters for currency conversions in columns that have a native
currency data type.

Chapter 5. Insert 127


Default Currency

The Currency Table to use when the Currency function is specified in a Column Map.

Global Currency Options


Global Currency Definition
The default Currency Table to use for currency conversions in columns that have a native
currency data type.
From Type To Type
Specific currency types for source and destination when converting values in columns that have a
native currency data type.
Triangulate
Select this check box to convert the specified source currency to the EURO dollar, then convert
the euro dollar value to the specified destination currency.

128 IBM Optim: Archive User Manual


Report Options Tab, Insert Request Editor
Use the Report Options tab to select information to be included in the Insert Process Report.

Reporting Options
Report errors
Select this check box to list errors encountered during the Insert Process in the Insert Process
Report.
Report Invalid Dates
Select this check box to list rows with invalid dates in the Insert Process Report when you select
the corresponding Exception Option on the Age Function or Global Aging tab.
Report Skipped Dates
Select this check box to list rows with skipped dates in the Insert Process Report when you select
the corresponding Exception Option on the Age Function or Global Aging tab.
Maximum number per table
The maximum number of errors, invalid dates and skipped dates per table to include in the
Insert Process Report.

Chapter 5. Insert 129


Maximum number per run
The maximum number of errors, invalid dates and skipped dates per run to include in the Insert
Process Report.

Aging Option
Report Aging Summary
Select this check box to summarize any specified aging parameters in the Insert Process Report
for the Insert Process. A report that includes the Aging Summary can be printed in landscape
mode only.

Notify Tab, Insert Request Editor


Use the Notify tab to specify options and addresses for automatic E-mail notification of the success or
failure of the process. The process report generated when the process completes is automatically sent as
an attachment.

Process an Insert Request


You can process an Insert Request from within a Restore Request or by itself.

You can process an Insert Request at any time. However, if you create a new Insert Request and want to
use it again, you must save the request.

See Chapter 8, “Restore,” on page 209 for information on how to process an Insert Request from within a
Restore Request.

Schedule an Insert Request


To schedule an Insert Process to run at one or more future times, save the Insert Request, and click File →
Schedule
v Processing is initiated at the scheduled time; you do not review the process as it is performed.
v If warning conditions exist, processing continues without prompting, according to the Stop on Error
parameter specified on the Steps tab of the Scheduling Job dialog.
v If an error occurs, processing stops.

For details on scheduling, refer to the Common Elements Manual.

Run an Insert Request


It is not necessary to save the Insert Request before it is run. To process an Insert Request immediately,
click File → Run.
v Before processing begins, the request is verified. If warning conditions exist, you can review the
parameters in the Warnings dialog, and continue or cancel processing.
v During processing, if an error occurs, processing stops.

A progress dialog and status messages provide information while the request is processing. When
processing completes, or stops because of an error, you can review the details in the Process Report.

130 IBM Optim: Archive User Manual


Insert Request Progress Dialog
During the Insert Process, the Insert Request Progress dialog displays status information.

Totals
Rows to be processed
Total number of rows in the Source File to be processed.
Rows Inserted
Total number of rows that were inserted.
Rows Updated
Total number of rows that were updated.
Rows with Errors
Total number of rows from all the tables that have errors.

The totals in the Insert Request Progress dialog are revised after a number of rows are inserted for each
table, after a number of seconds pass, and when the insert for one table completes and the process begins
for the next table.

Note: The frequency with which the Progress dialog is updated (i.e., the number of rows and seconds) is
specified on the Actions tab in Personal Options. (Refer to the Common Elements Manual ).

Current Table
Rows Inserted
Total number of rows inserted in the table.
Rows Updated
Total number of rows updated in the table.
Failed Rows
Total number of rows that could not be inserted and were discarded.

Cancel Process

To stop the process, click Cancel Process. A confirmation dialog is displayed:

Chapter 5. Insert 131


v To cancel the Insert Process, click Yes to return to the Archive Request Editor. You can review the
Process Report, respecify parameters, and restart the Insert Process.
v To continue processing, click No to close the confirmation dialog.

Status Bar

Describes the action being performed and indicates the name of the table being processed, as applicable.

Process Time

Lists the elapsed process time for the Insert Process.

Cascading Delete/Update Confirmation


Archive performs a cascading delete/update check while processing an Insert Request.

After the cascading delete/update check is complete, Archive displays the Cascading Delete/Update
Confirmation dialog if the following conditions are true:
v The Warn on Cascade Delete/Update option in either Product or Personal Options must be set to
Runtime or Always. (Refer to the Installation and Configuration Guide and the Common Elements Manual
)
v All Tables or Mixed must be selected for Delete Options on the General tab of the Insert Request
Editor.
v The cascade delete or update must affect at least one table that is not explicitly included in the Insert
Process.

Click OK to continue processing the Insert Request, or click Cancel to stop processing and return to the
Insert Request Editor.

For details on the Cascading Delete/Update Confirmation dialog, refer to the Common Elements Manual.

Insert Process Report


The Insert Process generates an Insert Process Report that provides general information and statistics
about the Insert Process.

The following is a sample:

132 IBM Optim: Archive User Manual


The Insert Process Report displays the following information:
v Name of the Insert Request (or Untitled if you did not save the request).
v Name of the Server or Local, for client workstation.
v Name of the Source file used as input to the process.
v Name of the Control File specified in the Insert Request.
v Name of the Table Map or LOCAL, as specified in the Insert Request.
v Indicator (Skipped or Processed) for processing file attachments.
v User IDs of the user requesting the Insert Process.
v Date and time the Insert Process started.
v Date and time the Insert Process completed.
v Elapsed time for the Insert Process to complete.

Chapter 5. Insert 133


Errors

If any errors or warnings occur during processing, a list of the errors or warnings is provided. Review
the list of errors that caused processing to stop. For example, an internal error condition exists when the
process exceeds the discard row limit or if you are not authorized to access a particular database table.

Process Summary

Statistics are provided for the inserted data:


v Total number of Tables Processed.
v Total number of Rows Inserted.
v Total number of Rows Updated.
v Total number of Rows with Errors.

Row Details

Information is provided for each table:


v Number of rows inserted.
v Number of rows updated.
v Number of failed rows.
v List of tables used in the Insert Process. The tables are listed in the same order as in the source file.

Save the Report


To save the report to a file, click File → Save As to open the Windows Save dialog.

Print the Report


To print the report, click File → Print to open the Windows Print dialog.

Redisplay the Report


If you close the report and want to refer to it again, click File → Redisplay Results → Current to redisplay
the report from the last Insert Process run, or click File → Redisplay Results → All to display a list of all
retained Insert Process Reports.

For details about retaining process reports, see the Common Elements Manual.

134 IBM Optim: Archive User Manual


Chapter 6. Load
Use the Load Process to transform the contents of an Archive or Extract File into a format that is
appropriate for a particular DBMS loader and then, if desired, start the corresponding database load
utility.

The Load Process generates a data file in the correct format for each table in the Archive or Extract File
and an SQL file or a BAT file (Batch Execution), depending on the DBMS, that contains the syntax
necessary to start the database loader.

Specifications for the Load Process are embodied in a Load Request, which may be named and saved in
the Optim Directory, so that it is available for a variety of users and uses. A Load Request may also be
embedded in a Restore Request, in which case it is not named and is not accessible except by editing or
using the Restore Request. The Load Request provides parameters used to prepare data for a DBMS
loader and the instructions required to process the load. Specify a Table Map in the Load Request to map
the destination for the data to load. Use optional Column Maps to transform data before loading. For
more details, refer to the Common Elements Manual .

Load versus Insert

Archive can move data into a database using a Load Process or an Insert Process. For details on using a
particular DBMS loader, please refer to the documentation provided with your database management
system and consider the following when deciding the best method:
v The volume of data and the speed of load processing may offset the advantages of the Insert Process.
v Referential integrity (RI) cycles may exceed the capability of the Insert Process to insert all the data
successfully.
v A load utility prevents user access during processing. The database is available to other users during
Insert processing.
v The load utility either inserts new data or replaces existing data. The Insert Process provides
Update/Insert Processing in one step.

Process File Names

The Load Process generates several types of files to support the database utility load process:
v Data files — Archive generates a file for each table in the Source File, with the data prepared in a
format appropriate for the DBMS. Data files are given the name of the Source File with sequentially
numbered file name extensions. For example, for an Extract File named demo.xf that contains data from
three tables, the Load Process will generate three data files named: demo.001, demo.002, and demo.003.
v Format files — Additionally, a format file is generated for each data file. A format file matches the
name of the corresponding data file with a distinguishing extension. If there are fewer than 500 tables
to load, 500 is added to the data file name extension. (For example, for data files named demo.001,
demo.002, and demo.003, the corresponding format files are named demo.501, demo.502 and demo.503.) A
more complex algorithm is used when more than five hundred tables are processed.
v SQL files — For DB2, an SQL file with one statement for each destination table is generated. This file
provides the syntax needed to execute the loader manually. The SQL file name is the Source File name,
with the extension .sql.
v BAT files — For Oracle, Sybase ASE, SQL Server, and Informix, a BAT file provides the syntax needed
to manually execute the loader for each table. A BAT file is generated for each DB Alias specified in the
Table Map. Each BAT file resides in the directory with the corresponding converted Load file. If you
chose to execute the loader manually, the BAT file must be edited (in Notepad, for example) to replace
a string of eight question marks with specific password information (except Informix).

© Copyright IBM Corp. 1994, 2010 135


v Message files — Message files contain information that the database load utility generates during the
Load Process. Typically, there is one message file per Load Process. The message file name matches the
Source File name, with the extension .msg. For example, for an Extract File named demo.xf, the message
file is named demo.msg.
v Fallback Files — For Teradata, an optional data file that can be created when the Teradata Named Pipe
is used. Data is written to the fallback file to support a restart of the load, if needed. The fallback file
has an extension of .fbf and is automatically deleted when the load completes successfully.

Note: If your file server does not allow for file names greater than 8 characters, the Load Process will fail
to process a Source File with a long name. Avoid using long file names for Archive or Extract Files or
copy and rename a file before you use it for a Load Process.

Run Online or Automate

You can process a Load Request immediately (by clicking File → Run). You can also run a Load Request
from the command line, whether manually, in batch, or from an external application. When running a
process from the command line, you can supply overrides for various Load Request parameters and
settings to tailor the process to circumstances as they exist at runtime. (See Chapter 12, “Command Line
Interface — Processing Utilities,” on page 327 for more information.) Named Load Requests can also be
scheduled for automated processing by clicking File → Schedule.

Note: You must have authority from the SYSADM or DBA to run or schedule the Load Process.

You can also direct the Load Process to generate the necessary files immediately, but defer running the
database load utility. If you choose not to start the database load utility as part of the Load Request, the
loader must be started manually.

A Load Request can also be run as part of a Restore Request. See Chapter 8, “Restore,” on page 209.

Naming Conventions

The fully qualified name of a Load Request is in the form identifier.name.


identifier
Identifier that serves as the prefix for the request name (1 to 8 characters).
name Name assigned to the request (1 to 12 characters).

When you create Load Requests, it is helpful to use a logical set of naming conventions to identify the
use for each and to organize them for easy access.

Section Contents

This section explains how to create and maintain a Load Request, including how to:
v Specify the Source File containing the data you want to load.
v Specify the Control File to record information about the process.
v Choose to run DBMS loaders in parallel or in sequence.
v Select or create a Table Map (and optional Column Maps) to provide more control over the data you
want to load.
v Specify default options for date aging to adjust dates in specified columns.
v Specify notification options.
v Estimate the amount of storage needed to process the Load Request.
v Run, save, and schedule a Load Request.
v Review, save, and print the Load Process Report.

136 IBM Optim: Archive User Manual


Open the Load Request Editor
Use the Load Request Editor to create and maintain requests to prepare data for a DBMS loader.

These objects are stored in the Optim Directory to be re-used or may be referenced by or incorporated
into a Restore Request. See Chapter 8, “Restore,” on page 209 for information needed to create or open an
Insert Request from the Restore Request Editor. On a standalone basis, there are different ways to open
the editor depending on whether you want to create a new request or select a request to edit.

Create a Load Request


Use this task to create a Load Request. A Load Request specifies how the Load Process reformats the
contents of an Archive or Extract File into a format that is appropriate for a particular DBMS loader.

To open the Load Request Editor from the main window, you can:
v Click Actions → Load in the main window or click File → New → Load in the main window to display
the Load Request Editor Options dialog. Provide Source and Control File names, complete Table Map
information and click OK to display the Load Request Editor.
v Click File → Open in the main window to display the Open dialog and select a named Load Request
from the Optim Directory.

See the Common Elements Manual for information.

From the Load Request Editor, you can:


v Create a new Load Request by clicking File → New in the Load Request Editor to display the Load
Request Editor Options dialog. Provide Source and Control File names, complete Table Map
information and click OK to display the Load Request Editor.
v Model a new Load Request on an existing one by opening the desired Load Request and clicking File
→ Save As.
v Save a copy of the active Load Request by clicking File → Save Copy As.

Resource Estimation
Optim is able to calculate the storage needed to process a Load Request. This information can be valuable
in determining when to run the load, or what options to use. The Resource Estimator creates a report
with storage estimates for each object in a Load Request. The Resource Estimator must be run on the
same machine where the input file for the Load Request is located.

To estimate resources for a Load Request, open the Load Request Editor and click Tools to display these
options:

Chapter 6. Load 137


When you click Estimate Resources Optim calculates the amount of storage necessary for this Load
process and creates a Resource Estimation Report:

138 IBM Optim: Archive User Manual


The first section of the Resource Estimation Report shows the type of request, source file, elapsed time,
and other details as in the Load Process Report. For complete information, see “Load Process Report” on
page 186. The Resource Estimation Analysis section includes the following:

Chapter 6. Load 139


Status Status of storage estimated for this object in the Load request:
Passed
There is sufficient storage available to load this object.
Failed There is not sufficient storage available to load this object. If this is the first object in the
load request, there is currently insufficient storage. If this is not the first object in the load
request, there is insufficient storage to load this object after loading the objects that
precede this object in the load request.
Estimated Storage (K)
Amount of storage needed to load this object.
Resource Name
Fully-qualified name of the object to be loaded.

Load Request Editor Options Dialog


When you create a new Load Request, the Load Request Editor Options dialog and the Load Request
Editor open at the same time.

140 IBM Optim: Archive User Manual


Server Name

If the Optim Server is licensed and installed, you can direct resource-intensive Load Processing (for
example, when the source file contains a large number of tables or rows) to a machine hosting the Server.

Click the down arrow to select a machine hosting Optim Server, or select Local to process the request on
the local workstation.

Note: If the Optim Server option is not enabled at your site, Server Name is unavailable.

Chapter 6. Load 141


Source File

The name of an Archive or Extract File used as the basis for the Load Request. This file provides the data
model for a Table Map created from within the Load Request and, unless overridden, the data to be
loaded.

Control File

The name of a Control File, used to track the success or failure of processing each row in the Source File.
The .cf extension is added by default. If you do not provide a path with file names, the default Data
Directory defined in Personal Options is used.

If you enter the name of an existing Control File, a dialog prompts to confirm that you want to overwrite
the file when you run the Load Request. To disable the confirmation prompt, use Personal Options.

Note: You can browse the contents of a Source or Control File by clicking Utilities → Browse or by
rightclicking and selecting Browse from the shortcut menu. For details on the Browse Utility, refer to the
Common Elements Manual .

Table Map Options

A Table Map used to match data in the Source File to destination tables or to exclude data from selected
tables from processing. A Load Request must reference a valid Table Map in order to be saved or
processed. Click Tools → Edit Table Map from the menu to display the Table Map referenced for Load
processing. For details on how to create, edit, or merge Table Maps, refer to the Common Elements Manual
.

A Table Map may reference a Column Map for any pair of tables to:
v Map source and destination columns that are compatible, but have dissimilar names.
v Transform source column values before inserting them into destination columns.
v Bypass processing for specific columns.

Local Embed a Table Map in the Load Request. Local Table Maps are saved as part of the Load Request and
can only be used with it.
Named Create or select a Table Map to use with the Load Request. You must provide a name for the Table
Map. (If the database structure has changed since the Table Map was last used, a warning is displayed.)
Table The Table Map used for Load processing.
Map
identifier Identifier (1 to 8 characters) for the Table Map.
Name
name Name of the Table Map (1 to 12 characters).
Always Display the Table Map each time you save or run the Load Request. Clear this check box to display the
View Table Map only when necessary (for example, when the Table Map data structure does not match that
Table Map of the Source File data).

142 IBM Optim: Archive User Manual


Using the Load Request Editor
Use the Load Request Editor to define or edit a Load Request to be used for Optim processing.

Description
Optional text to identify the Load Request (up to 40 characters).
Tabs The Load Request Editor tabs group parameters and options that you may need to define and
maintain Load Requests. Each tab in the editor serves a unique purpose.
General
Specifications for running DBMS loaders. Each time you open the editor, the General tab
is shown first.
<DB Alias>
The Load Request Editor includes a tab for each DB Alias required for tables in the Table
Map.
Age Function
Default parameters for optional aging of data in columns for which an Age function is
indicated in a Column Map.

Chapter 6. Load 143


Global Aging
Default parameters for optional aging of data in columns that have a native date data
type.
Currency
Default Currency Table and currency conversion parameters for columns with a native
currency data type.
Report Options
Parameters for displaying errors and aging specifications on the process report.
Notify Options for automatic email notification of the success or failure of the process.

Menu Commands

In addition to the standard File, Edit, and Tools menu commands, you can select the following
commands from menus on the Load Request Editor:

Tools Convert to Local Embed the Load Request in the Restore Request. (Available only
Menu when editing a named Load Request as an adjunct to editing a
Restore Request.)
Edit Table Map Open the Table Map Editor, and create, edit, or browse a Table Map
to be used with the active Load Request. For complete details on
Table Maps, refer to the Common Elements Manual.
Respecify Options Open the Load Request Editor Options dialog to modify the names of
the Source File, Control File, or Table Map options.
Edit Exception Table Map Open the Exception Table Mapping dialog to explicitly designate
Exception or Violation tables.
Edit Partition Map Open the Table Partition Mapping dialog to map a Destination Table
to a Sybase Partition.
Estimate Resources Create a Resource Estimation Report for this Load Request. For
details see “Resource Estimation” on page 137
Edit ACL Open the Access Control List Editor to secure the Load Request with
an Access Control List. Available when Object Security is enabled.
Delete ACL Delete the Access Control List securing the Load Request. Available
for secured Load Requests only.
Options Show Aging Show Currency Select a command to hide or display the corresponding tabs.
Menu

General Tab, Load Request Editor


In order to Load data, you must identify the source and provide other parameters to control processing.
Before you can load data, you must specify how to run the DBMS load utilities.

144 IBM Optim: Archive User Manual


Server Name

The Server (if any) on which processing takes place. To process on a different machine, click Tools →
Respecify Options.

Source File

The name of the Source File to process. To change the Source File, click Tools → Respecify Options.

Control File

The name of the Control File. To change the Control File, click Tools → Respecify Options

Table Map Name

The Table Map used for Load processing. To change the Table Map, click Tools → Respecify Options.

Chapter 6. Load 145


Run DBMS Loaders

When processing across multiple DBMSs, indicate whether to run the DBMS loaders in parallel or in
sequence.
In Parallel
Archive runs loaders in parallel.
In Sequence
Archive runs loaders in sequence.

Note: This group box is disabled when the Table Map specified in the Load Request includes tables from
only one database, that is, when only one <DB Alias> tab is displayed.

Stop on Loader error

Select this check box to stop a loader if an error occurs. When processing across DBMSs, and an error
occurs in a loader:
v If In Parallel is selected, processing stops for the loader in error, but continues in all others.
v If In Sequence is selected, current and successive loader processing stops.

Stop on first conversion error

If a conversion error occurs, the DBMS loader process is not initiated. Select this check box to stop all
Load processing when a conversion error occurs or clear the check box to continue processing when a
conversion error occurs. Rows in error and an error message are recorded in the Results Report.
Conversion processing continues to the end to record all possible errors.

Refer to “Report Options Tab, Load Request Editor” on page 182 to be sure that the Report errors option
is selected and that the Maximum number per table value is set high enough to account for all possible
errors.

Always Call Create

Select this check box to always start the Create Utility to create or drop objects in the destination
database before loading. Clear this check box to start the Create Utility only when needed to create
desired objects in the destination database. Refer to the Common Elements Manual for complete
information.

File Attachments

If the source file contains file attachment pseudocolumns, indicate how the Load Process should proceed.
Fail Fail the process.
Process as Columns
Process pseudocolumns as normal table columns. If matching columns do not exist in the table,
the pseudocolumns are ignored.

DB Alias Tab – DB2, Load Request Editor


Use the DB Alias tab in the Load Request Editor to define the parameters needed to perform the Load
Process for the DB2 loader.

DB2 Remote Client Loading

When Optim loads data to DB2, the data files are created and written to a network location accessible to
both Optim and the DB2 server. The loader reads the files from the network location and loads them to

146 IBM Optim: Archive User Manual


DB2. If a common network location is not available, you can use DB2 remote client loading. Remote
client loading writes the data files to location outside the network – for example, a local Optim Server
hard drive. Optim calls the DB2 client which reads the data file and sends it to the DB2 server for
loading. Remote client loading cannot be used to load LOB data. Since it may cause contention, use
remote client loading only if there is no network location available.

Note: DB2 has an IXF record length (row) limitation of 32K.

The DB2 Alias tab of the Load Request Editor has the following elements:

Mode
Insert Insert source rows into the destination tables. If primary key values match, a source row is
inserted into the appropriate Exception table, if any is specified, or the table status becomes
Check Pending. Refer to the IBM DB2 documentation for additional information about Check
Pending status.
Replace
Clear and replace all rows in the destination tables with rows from the Source File. Selecting
Replace enables the Replace Options button, which opens this dialog:

Chapter 6. Load 147


Statistics
Do not collect Statistics
Select this button if you do not want to collect statistics for this load process. Optim
generates STATISTICS NO in the SQL script. If you select this button, the other statistics
options are unavailable.
Collect default Statistics
Select this button to have Optim generate STATISTICS USE PROFILE in the SQL script.
The profile defined for this table determines the statistics collected during the load. For
details refer to the documentation for the loader.
Collect these Statistics
Select this button to choose the statistics to be collected. Optim generates STATISTICS
YES in the SQL script. You can choose:
Tables Select this check box to collect table statistics.
With Distribution
Select this check box to collect table distribution statistics.
Indexes
Select this check box to collect index statistics.
Detailed
Select this check box to collect detailed index statistics.
Mark as NonRecoverable
Select this check box to prevent tables from being left in an unusable state if the Load process
fails. Optim generates the NONRECOVERABLE keyword in the SQL. NONRECOVERABLE
specifies that a load transaction is to be marked as non-recoverable, and that it will not be
possible to recover it by a subsequent rollforward operation. Refer to your loader documentation
for details.

148 IBM Optim: Archive User Manual


Exception Table Options

You can use an exception table to record each row that violates unique index or primary key rules. Each
exception table includes a copy of the row with a timestamp column and a description column containing
the DB2 description of the violation.

Select one or both of the following options to create an exception table for each destination table as part
of database load utility processing.
Load Select this check box to create exception tables to store rows that violate unique index or primary
key rules.
Constraints
Select this check box to create exception tables to store rows that violate referential integrity or
table check constraints.

Archive ensures that the names of exception tables do not match names of destination tables specified in
the Load Request. You can modify the exception table names. However, use care to ensure that the names
do not match names of existing database tables. If the Exception Table name is left blank, duplicate rows
are discarded. The Load Process drops existing exception tables before starting the database load utility to
ensure that newly created exception tables contain only the information for the current database load.

Note: A confirmation dialog opens before exception tables are dropped. Change the Creator ID to create
different exception tables.

Click Tools → Edit Exception Table Map from the menu to display the Exception Table Mapping dialog.

After the loader begins processing, if any data or referential integrity constraints are violated, the
discarded rows are placed in the exception table and the database table is placed in Check Pending
status. In addition, Archive issues the DB2 SET CONSTRAINTS statement for each table.

Note: You must use the DBMS utilities to resolve any problems for database tables that have pending
status. For complete details, refer to your DBMS documentation.

Chapter 6. Load 149


File Type
ASCII For DB2 Linux, UNIX or Windows, use to import data into other DBRM instances or EEE sites.
ASCII Delimited
For DB2 Linux, UNIX or Windows, use to import data into other DBRM instances or EEE sites. If
you select this file type, select a valid delimiter.
iSeries® IXF
For iSeries, use to import data into an iSeries instance.
IXF For DB2 Linux, UNIX or Windows, use as the preferred import file type for expedient processing.
Teradata ASCII
For a Teradata loader, use to import data into a Teradata instance. See “DB Alias Tab - Teradata,
Load Request Editor” on page 154.
Teradata Delimited
For a Teradata loader, use to import data into a Teradata instance. See “DB Alias Tab - Teradata,
Load Request Editor” on page 154.

Delimiter
Delimiter
You can exclude the delimiter from being scanned in character data columns by Optim while
generating the loader file. This can improve load performance. To exclude delimiters from
scanning, select any of the following values from the Delimiter drop-down list:
X'01' (No Pre-scan)
X'02' (No Pre-scan)
X'03' (No Pre-scan)
X'04' (No Pre-scan)
X'05' (No Pre-scan)

Additional delimiters are supported which are scanned in character data columns by Optim while
generating the loader file. Select any of the following values from the Delimiter drop-down list.
Optim scans these values while generating the loader file:
X'FA'
X'FB'
X'FC'
X'FD'
X'FE'
X'FF'

Save Interval

Specify whether you want the loader to commit changes to the database after processing a specified
number of rows or after each table is processed.
v To commit changes based on a number of rows, enter the number of rows up to a maximum of
999999999.
v To commit changes after all data is loaded into a table, specify zero (0) or leave blank. This method
ensures that all data or no data is loaded.

Warning Limit

Specify the number of rows, up to a maximum of 999999999, that the loader can discard during the Load
Process. The process stops when the specified number of rows is discarded.
v To end the process if a single row is discarded, specify 1 as the maximum.
v To set no limit to the number of rows that can be discarded, specify zero (0) or leave blank.

150 IBM Optim: Archive User Manual


Copy Options

Click Copy Options to select options to instruct the loader to make an image copy of the input data
during the Load Process.

Note: To make an image copy, ensure that the LOGRETAIN and USEREXIT options are set to ON in the
loader. You should request an image copy if either LOGRETAIN or USEREXIT is specified in the loader.
The image copy is used to provide forward recovery.

Do not Select this option to choose not to make an image copy.


copy v If you do not make an image copy, the tablespace where the table resides is placed in a backup
pending state. A tablespace backup or a full database backup is required to clear the pending status.
v If LOGRETAIN and USEREXIT are set to OFF in the loader, the database does not provide forward
recovery, and the copy image option is ignored.
v If you restore the database to resolve pending states, you must use the Configuration tool to apply
maintenance for Optim Directory access and DB Alias access. Refer to the Installation and
Configuration Guide for complete information.
Copy Select this option to create an image copy. The load utility generates the file names for each table based
image to on the date and time of the load.
directory Note: You can specify a directory path to store the image copy. If the directory does not exist, you can
create one by responding to the prompts.
Path Directory path to store the image copy. Click the browse button to select from your system
Name directories.
Copy Select this option to create an image copy using ADSM. (For complete information on using ADSM,
image refer to the IBM DB2 documentation.)
using
ADSM
I/O Specify the number of I/O sessions to be used with ADSM.
Sessions

The values you specify in the Copy Options dialog are profiled. Therefore, if you always use the same
specifications, it is not necessary to set copy options for each Load Request. Click OK to retain your
specifications. Click Cancel to close the dialog, ignore changes, and return to the DB Alias tab of the
Load Request Editor.

Chapter 6. Load 151


Options
Perform Load
Select this check box to run the loader immediately after file conversion processing is complete.

Note: You can run the loader immediately only if you select IXF file type.
If you clear this check box, or select ASCII file types, the Load Process prepares the data in the
appropriate format and creates the SQL to run the loader, but does not initiate the loader. To run
the loader, you can copy the syntax from the SQL file. Refer to your DB2 documentation.
Use Named Pipe
This option is only available when the file type is Teradata ASCII or Teradata ACSII
Delimited. See “DB Alias Tab - Teradata, Load Request Editor” on page 154.
Delete files if Successful
Select this check box to delete the data files after the loader completes successfully. If you select
this check box, the Fast Load Confirmation feature is unavailable.

Note: Fast Load Confirmation reduces processing time when you run a Load Request that has
run before. See “Run a Load Request” on page 183 for information.
Delete files if Failure
Select to delete the data files if the loader does not complete successfully. If you select this check
box, the Fast Load Confirmation feature is unavailable.
Load When Source Is Empty
Select this check box to perform the load if a table to be loaded contains no rows. If you do not
select this check box, any tables in the Archive File containing no rows will be skipped in the
load phase. Using load with an empty source table deletes rows from the target table, resulting in
a clean test environment.
Load from remote client
Select this check box to load using the DB2 LUW remote client option. The data files are written
to a location outside the DBMS server location, read from the DB2 LUW loader client, and sent to
the DBMS server. If you select this check box, you must supply a path to the location of the data
files. Optim generates a LOAD command with the CLIENT keyword in the SQL.

Directory Paths

Specify directory paths to the location for loader files. The files must be stored on a drive that can be
accessed by DB2 and the client as well as by workstation and network server.

Note: If DB2 is running on a remote server and is started before Windows connects to the network
drives, you might receive a DB2 error message in the Load Process Report that indicates the path for the
file or device is not valid. The solution is to restart DB2.
Work path for data files:
Specify workstation directory path to the location for temporary loader files. The files must be
stored on a drive that can be accessed by DB2 and the client as well as by workstation and
network server.
Server path for data files:
Specify network server directory paths to the location for temporary loader files. The files must
be stored on a drive that can be accessed by DB2 and the client as well as by workstation and
network server.
Server path for temporary files:
Path for temporary loader files. Optim generates TEMPFILES PATH clause in the SQL. This is
unavailable if Load from remote client is selected.

152 IBM Optim: Archive User Manual


DB Alias Tab - iSeries, Load Request Editor
Optim supports loading data into an iSeries DBMS, using the DB2 CLIENT IMPORT command. Use the
DB Alias tab to define the parameters needed. A DB2 LUW DB Alias must exist before you create the
Load Request.

The DB Alias tab of the Load Request Editor has the options described below when loading to an iSeries
DBMS.

Mode
Insert Inserts rows from the Source File into empty destination tables. If destination tables contain data,
the loader returns an error. This error occurs only if a primary key column is defined and this
process attempts to insert the same value into a table row.
Replace
Clears and replaces all of the existing rows in the destination tables with the rows from the
Source File.

Options
Perform Load
Select this check box to run the DB2 CLIENT IMPORT command automatically after file
conversion processing is complete. If you clear this check box, the Load Process prepares the data
in the appropriate format and creates the BAT file, but does not initiate the command. To run the
command, edit the BAT file to include the proper password information and then run the BAT
file.
Delete files if Successful
Select this check box to delete the data files after the DB2 CLIENT IMPORT command completes
successfully. If you select this check box, Fast Load Confirmation is unavailable.

Note: Fast Load Confirmation reduces processing time when you run a Load Request that has
run before. See “Process a Load Request” on page 183 for detailed information.
Delete files if Failure
Select this check box to delete the data files if the process does not complete successfully. If you
select this check box, Fast Load Confirmation is unavailable.
Load When Source Is Empty
Select this check box to perform the load if a table to be loaded contains no rows. If you do not
select this check box, any tables in the Archive File containing no rows will be skipped in the
load phase. Using load with an empty source table deletes rows from the target table, resulting in
a clean test environment.

File Type
ASCII For DB2 Linux, UNIX or Windows, use to import data into other DBRM instances or EEE sites.
ASCII Delimited
For DB2 Linux, UNIX or Windows, use to import data into other DBRM instances or EEE sites. If
you select this file type, select a valid delimiter.
iSeries IXF
For iSeries, use to import data into an iSeries instance.
IXF For DB2 Linux, UNIX or Windows, use as the preferred import file type for expedient processing.
Teradata ASCII
For a Teradata loader, use to import data into a Teradata instance. This file type is valid for
Teradata Fast Load and Multi Load.

Chapter 6. Load 153


Teradata Delimited
For a Teradata loader, use to import data into a Teradata instance. If you select this file type,
select a valid delimiter. This file type is valid for Teradata Fast Load and Multi Load.
Delimiter
To avoid error, the delimiter selected must not appear within the data.

Work path for interim files

Specify a default directory path for storing the temporary loader files.

DB Alias Tab - Teradata, Load Request Editor


Optim supports the Teradata Loader for both FastLoad and MultiLoad. A DB2 LUW DB Alias must exist
before you create the Load Request. Use the DB Alias tab to define the parameters needed.

Load using Teradata Named Pipe

Load performance may be significantly improved by using the Teradata Named Pipe Access Module.
When this option is used, the load process runs in a single phase rather than a 2-stage process, resulting
in reduced elapsed time for load processing. As the row data is immediately loaded after conversion to a
loader format, the space requirements are also significantly reduced, when compared to the 2-stage load
process.

Optim writes the data to the named pipe, the Teradata Named Pipes Access Module reads and then
copies the data, and the data is loaded. You have the option of writing the data to be loaded to a fallback
file, in case you need to restart the load using native Teradata utilities outside of Optim. The fallback file
has an extension of .fbf and is created in the %TEMP% or %WINDIR%\temp directory. Optim writes
data to the fallback file according to the save interval that you set. After the load process completes, the
fallback file is automatically deleted.

Use the Load tab in Personal Options to specify the Teradata Server, User ID, password, and path to the
Loader. See Personal Options in the Common Elements Manual.

154 IBM Optim: Archive User Manual


This panel has the following fields:

Mode
Insert Inserts rows from the Source File into empty destination tables. If destination tables contain data,
the loader returns an error.
Replace
Clears and replaces all of the existing rows in the destination tables with the rows from the
Source File.
Replace Options
Displays a dialog box with options for collecting statistics and for generating
NONRECOVERABLE keyword. NONRECOVERABLE specifies that a load transaction is
to be marked as non-recoverable, and that it will not be possible to recover it by a
subsequent rollforward operation. Refer to your loader documentation for details.

Chapter 6. Load 155


Use the Replace Options dialog to select:

Statistics
Do not collect Statistics
Select this check box if you do not want to collect statistics for this load process. Optim will
generate a STATISTICS NO clause in the SQL for this load process. For additional information,
refer to your Teradata documentation.
Collect default Statistics
Select this check box to add the STATISTICS USE PROFILE keyword to the SQL created for this
load process. Refer to your loader documentation for details.
Collect these Statistics
Select this check box to collect statistics for tables or indexes:
Tables Select this check box to collect table statistics.
With Distribution
Collect table statistics with distribution.
Indexes
Select this check box to collect index statistics.
Detailed
Collect detailed index statistics.

Options
Mark as NonRecoverable
Select this check box to generate the NONRECOVERABLE keyword in the SQL created for this
load process. NONRECOVERABLE specifies that a load transaction is to be marked as
non-recoverable, and that it will not be possible to recover it by a subsequent rollforward
operation. Refer to your loader documentation for details.

156 IBM Optim: Archive User Manual


File Type
ASCII For DB2 Linux, UNIX or Windows, use to import data into other DBRM instances or EEE sites.
ASCII Delimited
For DB2 Linux, UNIX or Windows, use to import data into other DBRM instances or EEE sites. If
you select this file type, select a valid delimiter.
iSeries IXF
For iSeries, use to import data into an iSeries instance.
IXF For DB2 Linux, UNIX or Windows, use as the preferred import file type for expedient processing.
Teradata ASCII
For a Teradata loader, use to import data into a Teradata instance. This file type is valid for
Teradata FastLoad and MultiLoad.
Teradata Delimited
For a Teradata loader, use to import data into a Teradata instance. If you select this file type,
select a valid delimiter. This file type is valid for Teradata FastLoad and MultiLoad.
Delimiter
You can exclude the delimiter from being scanned in character data columns by Optim while
generating the loader file. This can improve load performance. To exclude delimiters from
scanning, select any of the following values from the Delimiter drop-down list:
X'01' (No Pre-scan)
X'02' (No Pre-scan)
X'03' (No Pre-scan)
X'04' (No Pre-scan)
X'05' (No Pre-scan)

Additional delimiters are supported which are scanned in character data columns by Optim while
generating the loader file. Select any of the following values from the Delimiter drop-down list.
Optim scans these values while generating the loader file:
X'FA'
X'FB'
X'FC'
X'FD'
X'FE'
X'FF'

Options
Perform Load
Select this check box to run the loader automatically after file conversion processing is complete.
If you clear this check box, the Load Process prepares the data in the appropriate format and
creates the BAT file to run the loader, but does not initiate the loader. To run the loader, edit the
BAT file to include the proper password information and then run the BAT file.
Use Named Pipe
Select this check box to use the Teradata Named Pipe Access Module to load the data.
The data to be loaded is written to the named pipe and then submitted to the loader. This
option is only available when the DB2 LUW DB Alias references a Teradata database and
file type is Teradata ASCII or Teradata ASCII Delimited.
Delete files if Successful
Select this check box to delete the data files after the loader completes successfully.
v If you select this check box, Fast Load Confirmation is unavailable.
v If you select Use Named Pipe, Delete files if Successful is unavailable.

Note: Fast Load Confirmation reduces processing time when you run a Load Request that has
run before. See “Process a Load Request” on page 183 for detailed information.

Chapter 6. Load 157


Delete files if Failure
Select this check box to delete the data files if the loader does not complete successfully.
v If you select this check box, Fast Load Confirmation is unavailable.
v If you select use Named Pipe, Delete files if Failure is unavailable.
Load When Source Is Empty
Select this check box to perform the load if a table to be loaded contains no rows. If you do not
select this check box, any table in the Archive File containing no rows will be skipped in the load
phase. Using load with an empty source table deletes rows from the target table, resulting in a
clean test environment.
Load from remote client
This option is unavailable when loading to Teradata.

Save Interval:

Specify the interval for committing changes to the database or writing data to the fallback file:
v If you select the check box for Use Named Pipe, the value you choose for Save Interval controls the
timing of writing data to the fallback file. Allowable values are: after a specified number of rows or
after each table.
v If you do not select the check box for Use Named Pipe, the value you choose for Save Interval controls
the timing of committing changes to the database. Allowable values are: after a specified number of
rows or after each table.

Warning Limit:

Specify the number of rows, up to a maximum of 999999999, that the loader can discard during the Load
Process. The process stops when the specified number of rows is discarded.
v To end the process if a single row is discarded, specify 1 as the maximum.
v To set no limit to the number of rows that can be discarded, specify zero (0) or leave blank.

Work path for interim files

Specify a default directory path for storing the temporary loader files.

Additional Loader Parameters

You can augment the loader arguments created automatically by Archive with additional loader
parameters, if necessary. The additional parameters you create are appended to the list created by
Archive, but are not validated by Archive prior to starting the loader. Refer to Teradata documentation
for valid operands. If additional loader parameters are forced from within Product Options, you cannot
modify them. Refer to the Installation and Configuration Guide section for Product Options.

DB Alias Tab – Oracle, Load Request Editor


Use the DB Alias tab to define the specific parameters needed to perform the Load Process for the Oracle
loader.

158 IBM Optim: Archive User Manual


Choosing direct path loading, parallel loads and the unrecoverable option can improve load performance.

Mode
Insert Inserts rows from the Source File into empty destination tables. If destination tables contain data,
the loader returns an error.
Replace
Clears and replaces all of the existing rows in the destination tables with the rows from the
Source File. (Replace might be significantly more resource-intensive than Truncate since no
logging is performed.)
Append
Inserts the rows from the Source File into the destination tables. If the primary key values match,
duplicate rows are discarded or inserted into the exception table (if specified).
Truncate
Truncate is the same as Replace but the database does not log the rows being deleted, and
Truncate requires that RI constraints are disabled.

Load Method
Conventional Path
Select this option when you want to:
v Load a small number of rows into a large table that has indexes or referential integrity
constraints.
v Apply SQL functions to specific data.
Direct Path
Select this option when you want to load and index a large volume of data quickly. The following
options are available:
Parallel Loads
Select this option to allows multiple load jobs to execute concurrently. This option is
available only if you select Direct Path and Append mode.

Chapter 6. Load 159


UnRecoverable Load
This option disables the writing of the data to the Oracle redo logs. This option is
available for Direct Path loads only.

Note: Direct path load runs faster than the conventional path, especially when you select the option for
Parallel Loads. To use the direct path, the client and the server must be running on the same platform.
For complete details on which method to use, refer to the documentation provided by Oracle.

Disable Triggers
Never Select this option if you do not want to disable database triggers while loading rows.
Always
Select this option to disable database triggers during the Load Process and then re-enable the
triggers after the process completes.
Prompt
Select this option to display the Disabling Trigger/Constraint Confirmation dialog. This dialog
displays a list of tables with all associated triggers. You can right-click to enable or disable
triggers during the Load Process for each table. You can also select whether to enable or disable
the triggers after the Load Process completes.

Disable Constraints
Never Select this option when you do not want to disable referential integrity constraints during the
load process. A warning message displays when you run the loader.

Always
Select this option to disable referential integrity constraints during the Load Process and then
re-enable the constraints after the process completes.
Prompt
Select this option to display the Disabling Trigger/Constraint Confirmation dialog. This dialog
displays a list of tables with all associated constraints. You can right-click to enable or disable
constraints during the Load Process for each table. You can also select whether to enable or
disable the constraints after the Load Process completes.

Note: Options to disable triggers and constraints apply only when you select the Perform Load option.

The Disabling Trigger/Constraint Confirmation dialog displays the list of tables in the Load Process and
tabs with the corresponding database triggers and referential integrity constraints for each table.

The first grid column contains a Focus Arrow to indicate the table for which triggers and constraints are
listed. To display triggers and constraints for a different table, click a Focus Arrow grid cell to reposition
the arrow, or use the up/down arrows on your keyboard.

160 IBM Optim: Archive User Manual


Right-click the Status During Process column to select to enable or disable the corresponding trigger or
constraint during the Load Process.
Right-click the Status After Process column to select whether to enable or disable the corresponding
trigger or constraint after the Load Process completes.

Options
Perform Load
Select this check box to run the loader automatically after file conversion processing is complete.
If you clear this check box, the Load Process prepares the data in the appropriate format and
creates the BAT file to run the loader, but does not initiate the loader. To run the loader, edit the
BAT file to include the proper password information and then run the BAT file.
Delete files if Successful
Select this check box to delete the data files after the loader completes successfully. If you select
this check box, Fast Load Confirmation is unavailable.

Note: Fast Load Confirmation reduces processing time when you run a Load Request that has
run before. See “Process a Load Request” on page 183 for detailed information.
Delete files if Failure
Select this check box to delete the data files if the loader does not complete successfully. If you
select this check box, Fast Load Confirmation is unavailable.

Chapter 6. Load 161


Create Exception Tables
Select this check box to create exception tables. An exception table contains copies of rows that
violate unique index or primary key rules. Archive ensures that the names of exception tables do
not match names of destination tables specified in the Load Request. You can modify the
exception table names, however, use care to ensure that the names do not match names of
existing database tables. If the exception table name is left blank, duplicate rows are discarded.
Click Tools → Edit Exception Table Map to display the Exception Table Mapping dialog.

Inline LOBs
Select this check box to include LOBs in a data file (inline with the table data). If this option is
not selected, each LOB is loaded from a separate file that is referenced in the Oracle loader
control file.
Create Discard File
Select this check box to instruct the loader to create a discard file to use during the Load Process.
Discard Limit
Enter the number of rows up to 999999999, that the loader can discard during the Load Process.
Processing stops when the specified number of rows is discarded.
v To end the process if a single row is discarded, specify 1 as the maximum.
v To set no limit to the number of rows that can be discarded, specify zero (0) or leave blank.
Compressed Files
Select this check box to create variable length data rows instead of fixed length data rows. This
option can potentially reduce space required for data conversion, but may slightly increase
processing time.
Delimiter
Select a column delimiter from the drop-down list. To avoid a conversion error, do not use a
column delimiter that appears in any of the data being loaded.
Commit
Specify the number of rows after which the loader commits changes to the database, up to the
limit specified in Product Options. Refer to the Installation and Configuration Guide section on
Product Options.

162 IBM Optim: Archive User Manual


Load When Source Is Empty
Select this check box to perform the Load if the source file tables are empty. For example, if you
need to clear database tables of existing data rows, use empty tables for the Load and select the
option Load When Source Is Empty. If you do not select this check box, the loader will not be
called for any empty source table.

Additional Loader Parameters

You can augment the loader arguments created automatically by Archive with additional loader
parameters, if necessary. The additional parameters you create are appended to the list created by
Archive, but are not validated by Archive prior to starting the loader. Refer to Oracle documentation for
valid operands. If additional loader parameters are being forced from within Product Options, you cannot
modify them. Refer to the Installation and Configuration Guide. .

Work path for interim files

Specify a default directory path for storing the temporary loader files.

DB Alias Tab – Sybase ASE, Load Request Editor


Use the DB Alias tab to define the specific parameters needed to perform the Load Process for the
Sybase ASE loader.

Mode
Insert Insert the rows from the Source File into the destination tables. If the primary key values match,
duplicate rows are discarded or inserted into the error file (if specified).
Replace
Clear and replace all existing rows in the destination tables with the rows from the Source File.

Options
Perform Load
Select this check box to run the loader automatically after file conversion processing is complete.
If you clear this check box, the Load Process prepares the data in the appropriate format and

Chapter 6. Load 163


creates the BAT file to run the loader, but does not initiate the loader. To run the loader, edit the
BAT file to include the proper password information and then run the BAT file.

Note: Since Sybase ASE does not accept a Replace operand for a load request, make sure the
tables are empty before you run the BAT file.
Delete files if Successful
Select this check box to delete the data files after the loader completes successfully. If you select
this check box, the Fast Load Confirmation feature is unavailable.

Note: Fast Load Confirmation reduces processing time when you run a Load Request that has
run before. See “Process a Load Request” on page 183 for detailed information.
Delete files if Failure
Select this check box to delete the data files if the loader does not complete successfully. If you
select this check box, the Fast Load Confirmation feature is unavailable.
Load When Source Is Empty
Select this check box to perform the load if a table to be loaded contains no rows. If you do not
select this check box, any tables in the Archive File containing no rows will be skipped in the
load phase. Using load with an empty source table deletes rows from the target table, resulting in
a clean test environment.

Disable Triggers

For Sybase ASE (Version 12 or later), you can disable triggers:


Always
Select this option to disable all database triggers for the Load Process, re-enabling the triggers
after the process completes.
Never Select this option to execute all database triggers during the Load Process.
Prompt
Select this option to selectively disable database triggers during the Load Process and selectively
reenable triggers when the process is complete.

Error File Options


Create Select this check box to instruct the loader to create a discard file to use during the Load Process.
Max Errors
Enter the number of rows up to 999999999, that the loader can discard because of errors during
the Load Process. The process stops when the specified number of rows is discarded.
v To end the process if a single row is discarded, specify 1 as the maximum.
v To set no limit to the number of rows that can be discarded, specify zero (0) or leave blank.

Additional Loader Parameters

You can augment the loader arguments created automatically by Archive with additional loader
parameters, if necessary. The additional parameters you create are appended to the list created by
Archive, but are not validated by Archive prior to starting the loader. Refer to Sybase ASE documentation
for valid operands. If additional loader parameters are forced from within Product Options, you cannot
modify them. Refer to the Installation and Configuration Guide.

164 IBM Optim: Archive User Manual


Use NT Authentication

Select this check box to instruct Archive to supply the -T parameter to instruct the loader to use the
UserID and Password used to logon to the network. Clear the check box to use a -U and -P parameter
(UserID and Password) when starting the loader.

Workstation Path

Specify a default directory path for storing the temporary loader files.

Load — Table Partition Mapping


If you want to store archived data in a specific partition, you must pass the appropriate partition name
when you run the Load process. (Contact your DBA for the appropriate partition names.) A Table
Partition Mapping dialog is used to map the Destination Table to a Sybase Partition.

This dialog is displayed by clicking Tools → Edit Partition Map.

The Table Partition Mapping dialog includes a tab for each Sybase DB Alias in the subject Optim Load
Request. The Destination Table column lists every table mapped within the Table Map Editor, and the
Partition column is used to specify the Sybase partition identifier or name for each table. You can specify
one partition name only for each table.

Note: Make sure the archive file contains data only for the targeted partition, otherwise you will receive
an error from the Sybase loader.

Chapter 6. Load 165


Say, for example, you created a table called “my_publishers” that is partitioned by list, according to the
values in the state column, as indicated as follows. (Certain entries are shown in bold for emphasis only.)

create table my_publishers


(pub_id char(4) not null,
pub_name varchar(40) null,
city varchar(20) null,
state char(2) null)
partition by list (state)
(west values ('CA', 'OR', 'WA') on seg1,
east values ('NY', 'MA') on seg2)

If your archive file contains data for three states — California (CA), Oregon (OR), and Washington (WA)
— you would specify west as the Partition, as shown in the earlier Table Partition Mapping example.
Conversely, if your archive file contained data for two states — New York (NY) and Massachusetts (MA)
— you would specify east as the Partition.

After you specify the appropriate partition name(s), close the Table Partition Mapping dialog to redisplay
the previous dialog.

DB Alias Tab – SQL Server, Load Request Editor


Use the DB Alias tab to define the specific parameters needed to perform the Load Process for the SQL
Server loader.

Note: SQL Server forces dates to be in a particular format. Therefore, in order to run the request, the
Client language must be the same as the language assigned to the SQL Server User ID.

166 IBM Optim: Archive User Manual


Mode
Insert Insert the rows from the Source File into the destination tables. If the primary key values match,
duplicate rows are discarded or inserted into the error file (if specified).
Replace
Clear all existing rows in the destination tables and replace with the rows from the Source File.

Error File Options


Create Select this check box to instruct the loader to create a discard file to use during the Load Process.
Max Errors
Enter the number of rows up to 999999999, that the loader can discard because of errors during
the Load Process. The process stops when the specified number of rows is discarded.
v To end the process if a single row is discarded, specify 1 as the maximum.
v To set no limit to the number of rows that can be discarded, specify zero (0) or leave blank.

Chapter 6. Load 167


Options
Perform Load
Select this check box to run the loader automatically after file conversion processing is complete.
If you clear this check box, the Load Process prepares the data in the appropriate format and
creates the BAT file to run the loader, but does not initiate the loader. To run the loader, edit the
BAT file to include the proper password information and then run the BAT file.

Note: Since SQL Server does not accept a Replace operand for a load request, you must ensure
the tables are empty before you run the BAT file.
Delete files if Successful
Select this check box to delete the data files after the loader completes successfully. If you select
this check box, the Fast Load Confirmation feature is unavailable.

Note: Fast Load Confirmation reduces processing time when you run a Load Request that has
run before. See “Process a Load Request” on page 183 for detailed information.
Delete files if Failure
Select this check box to delete the data files if the loader does not complete successfully. If you
select this check box, the Fast Load Confirmation feature is unavailable.
Load when source is Empty
Select this check box to perform the Load if the source file tables are empty. For example, if you
need to clear database tables of existing data rows, use empty tables for the Load and select the
option Load when source is Empty. If you do not select this check box, any empty tables in the
source file will not be loaded.

Disable Triggers

Note: Options for disabling database triggers are applicable to SQL Server Version 7.0 or later.
Never Select this option if you do not want to disable database triggers for the loader.
Always
Select this option to disable database triggers during the Load Process and then re-enable the
triggers after the process completes.
Prompt
Select this option to display the Disabling Trigger/Constraint Confirmation dialog. This dialog
displays a list of tables with all associated triggers. You can right-click to enable or disable
triggers during the Load Process for each table. You can also select whether to enable or disable
the triggers after the Load Process completes.

Disable Constraints

Note: Options for disabling referential integrity constraints are applicable to SQL Server Version 7.0 or
later.
Never Select this option if you do not want to disable referential integrity constraints for the loader.
When this option is selected, a warning message displays when you run the loader.

168 IBM Optim: Archive User Manual


Always
Select this option to disable constraints during the Load Process and then re-enable the
constraints after the process completes.
Prompt
Select this option to display the Disabling Trigger/Constraint Confirmation dialog. This dialog
displays a list of tables with all associated constraints. You can right-click to enable or disable
constraints during the Load Process for each table. You can also select whether to enable or
disable the constraints after the Load Process completes.

Note: Options to disable triggers and constraints apply only when you select the Perform Load option.

The Disabling Trigger/Constraint Confirmation dialog displays the list of tables in the Load Process and
tabs that contain the corresponding database triggers and referential integrity constraints for each table.

A Focus Arrow in the first grid column indicates the table for which triggers and constraints are listed. To
display the corresponding triggers and constraints for a different table, click a Focus Arrow grid cell to
reposition the arrow, or use the up/down arrows on your keyboard.

Chapter 6. Load 169


Right-click the Status During Process column to select to enable or disable the corresponding trigger or
constraint during the Load Process.

Right-click the Status After Process column to select whether to enable or disable the corresponding
trigger or constraint after the Load Process completes.

Additional Loader Parameters

You can augment the loader arguments created automatically by Archive with additional loader
parameters, if necessary. The additional parameters you create are appended to the list created by
Archive, but are not validated by Archive prior to starting the loader. Refer to SQL Server documentation
for valid operands. If additional loader parameters are forced from within Product Options, you cannot
modify them. Refer to the Installation and Configuration Guide.

Use NT Authentication

Select this check box to instruct Archive to supply the -T parameter to instruct the loader to use the
UserID and Password used to logon to the network. Clear the check box to use a -U and -P parameter
(UserID and Password) when starting the loader.

170 IBM Optim: Archive User Manual


Work Path for interim files

Specify a default directory path for storing the temporary loader files.

DB Alias Tab – Informix, Load Request Editor


Use the DB Alias tab to define the specific parameters needed to perform the Load Process for the
Informix loader.

Mode
Insert Insert rows from the Source File into empty destination tables. If destination tables contain data,
the loader returns an error.
Replace
Clear all of the existing rows in the destination tables and replace with the rows from the Source
File.

Violation Table Options


Start Violation Table
Select this check box to issue a Start Violation Table SQL statement. Check for previously linked
violation tables and diagnostic tables by clicking Tools → Edit Exception Table Map in the menu.
The Exception Table Mapping dialog displays.

Note: Archive uses the terms violation table and exception table synonymously.
If linked tables are present, the Exception Table Map is automatically populated with the table
names. By default, a violation table name is the table name with the suffix ‘_E'. (A diagnostic
table name has the suffix ‘_D'.) You can change the names of the tables by overtyping them.
Delete all rows
Select this check box to delete all rows in existing violation tables and diagnostic tables, before
the Load begins.

Chapter 6. Load 171


Options
Perform Load
Select this check box to run the loader automatically after file conversion processing is complete.
If you clear this check box, the Load Process prepares the data in the appropriate format and
creates the BAT file to run the loader, but does not initiate the loader. To run the loader, edit the
BAT file to include the proper password information and then run the BAT file.
Delete files if Successful
Select this check box to delete the data files after the loader completes successfully. If you select
this check box, the Fast Load Confirmation feature is unavailable.

Note: Fast Load Confirmation reduces processing time when you run a Load Request that has
run before. See “Process a Load Request” on page 183 for detailed information.
Delete files if Failure
Select this check box to delete the data files if the loader does not complete successfully. If you
select this check box, the Fast Load Confirmation feature is unavailable.
Load When Source Is Empty
Select this check box to perform the load if a table to be loaded contains no rows. If you do not
select this check box, any tables in the Archive File containing no rows will be skipped in the
load phase. Using load with an empty source table deletes rows from the target table, resulting in
a clean test environment.

Commit

Specify whether you want the loader to commit changes to the database by a specified number of rows
or one table at a time.
v To commit changes based on a number of rows, enter the number of rows up to a maximum of
999999999.
v To commit changes after all data is loaded into a table, specify zero (0) or leave blank. This method has
advantages when you want to ensure that either all data or no data is loaded.

Warning Limit

Specify the number of rows, up to a maximum of 999999999, that the loader can discard during the Load
Process. The process stops when the specified number of rows is discarded.
v To end the process if a single row is discarded, specify 1 as the maximum.
v To set no limit to the number of rows that can be discarded, specify zero (0) or leave blank.

Additional Loader Parameters

You can augment the loader arguments created automatically by Archive with additional loader
parameters, if necessary. The additional parameters you create are appended to the list created by
Archive, but are not validated by Archive prior to starting the loader. Refer to Informix documentation
for valid operands. If additional loader parameters are forced from within Product Options, you cannot
modify them. Refer to the Installation and Configuration Guide.

Disable Triggers
Never Select this option if you do not want to disable database triggers for the loader.
Always
Select this option to disable database triggers during the Load Process and then re-enable the
triggers after the process completes.

172 IBM Optim: Archive User Manual


Prompt
Select this option to display the Disabling Trigger/Constraint Confirmation dialog. This dialog
displays a list of tables with all associated triggers. You can right-click to enable or disable
triggers during the Load Process for each table. You can also select whether to enable or disable
the triggers after the Load Process completes.

Disable Constraints
Never Select this option if you do not want to disable referential integrity constraints for the loader.
When this option is selected, a warning message displays when you run the loader.
Always
Select this option to disable referential integrity constraints during the Load Process and then
re-enable the constraints after the process completes.
Prompt
Select this option to display the Disabling Trigger/Constraint Confirmation dialog. This dialog
displays a list of tables with all associated constraints. You can right-click to enable or disable
constraints during the Load Process for each table. You can also select whether to enable or
disable the constraints after the Load Process completes.

Note: Options to disable triggers and constraints apply only when you select the Perform Load option.

The Disabling Trigger/Constraint Confirmation dialog displays the list of tables in the Load Process and
tabs that contain the corresponding database triggers and referential integrity constraints for each table.

A Focus Arrow in the first grid column indicates the table for which triggers and constraints are listed. To
display the triggers and constraints for a different table, click the first cell to reposition the arrow, or use
the up/down arrows on your keyboard.

Chapter 6. Load 173


Right-click the Status During Process column to select to enable or disable the corresponding trigger or
constraint during the Load Process. Right-click the Status After Process column to select whether to
enable or disable the trigger or constraint after the Load Process completes.

Note: For Informix, you can also elect to enable constraints with or without using a violation table. Select
With Vio to enable the constraint and use a violation table. Select No Vio to enable the constraint and
not use a violation table. (If you select Enabled, the Informix default for violation tables applies.)

Workstation Path

Specify a default directory path for storing the temporary loader files.

DB Alias Tab – z/OS, Load Request Editor


Archive can create load and SQL statement files to support the IBM z/OS® loader. Use the DB Alias tab
in the Load Request Editor to define the specific parameters needed to create the files. The FTP Options
allow you to automatically transfer the files to the z/OS FTP server and optionally run the loader.

174 IBM Optim: Archive User Manual


Mode
Replace entire Tablespace
Select this check box to indicate that all rows in the tablespace should be deleted before the Load
Process is performed.
Resume
Select this check box to indicate that existing rows in the tablespace should not be deleted when
the Load Process is performed.

Sysin Load Statement Options


Perform Logging during Load
Indicator for performing logging during the load.
Use Single Load Data File
Indicator for grouping all tables to be converted into a single data file, instead of using an
individual file for each table.

Note: You can only use a Single Load Data File when all the tables are to be loaded in the same
tablespace.

Chapter 6. Load 175


Run inline Runstats
Invoke RUNSTATS to ensure that statistical data is accurately updated. RUNSTATS is invoked at
the tablespace level and includes all tables and indexes in the tablespace.
Produce Statistics Report
Produce report of RUNSTATS, when Run inline Runstats is selected.
Enforce RI during Load
Indicator for loading data into dependent tables without verification of RI constraints. Before the
database can be used, RI enforcement determines that the load has not violated RI rules. For
example, proper parents must exist for all rows inserted into a child table.
Load When Source Is Empty
Select this check box to perform the load if a table to be loaded contains no rows. If you do not
select this check box, any tables in the Archive File containing no rows will be skipped in the
load phase. Using load with an empty source table deletes rows from the target table, resulting in
a clean test environment.
Target Code Page
The target code page to use for proper character translation for the z/OS DB2 environment.
Discard Limit
Enter the number of rows up to 999999999, that the loader can discard during the Load Process.
The process stops when the specified number of rows is discarded.
v To end the process if a single row is discarded, specify 1 as the maximum.
v To set no limit to the number of rows that can be discarded, specify zero (0) or leave blank.

FTP Options
Transfer File to z/OS
Indicator for transmitting files to the FTP server after successfully converting the row data. Select
this check box to enable the remaining FTP Options.
Submit Job on z/OS
Indicator to submit the generated JCL to z/OS after Optim transmits the required files. The job
number is provided in the Informational Messages of the Load Process Report.

Note: Optim does not return any output from the actual job. You can, however, determine the
status of the job by signing onto z/OS and locating the job in the JES spool.
Review Generated JCL
Indicator to display the Viewing File dialog to review the generated JCL after the files have been
transmitted to the z/OS machine but before the job is submitted.

Note: This option is available only when Submit Job on z/OS is selected.
Save Generated JCL on z/OS
Indicator to save the JCL to z/OS, allowing you to run the job manually.
Use FTP login from Personal Options
Indicator to use FTP login information on the Load tab in Personal Options instead of the login
information in the FTP Options.
FTP Server
Enter a TCP/IP address or z/OS FTP server name.
Port Enter the port used by Optim to open a connection. Enter 0 to use the default.
User ID
Enter a z/OS FTP server User ID.

176 IBM Optim: Archive User Manual


Password
Enter the password for the z/OS FTP server User ID.
z/OS Dataset Qualifier
Enter the DSN qualifier(s). The dataset is prefixed with the User ID and the qualifier(s). Use a
single quote as the first character to indicate that all datasets transmitted to z/OS are fully
qualified and will not be prefixed with the User ID.
The total length of the dataset name cannot exceed 44 characters. The last two qualifiers of the
dataset require up to 12 characters (the first 8 characters of the Archive File name and 4
characters for a unique generated file number). For example, ‘userID.qualifier.FileName.X001.'
JCL Template
Enter the name of the file used to construct the generated JCL submitted to z/OS.
A template file, LOADDB2.JCL, is distributed with Optim in the RT/Samples/JCL directory. It is
recommended that you copy this file to your default data directory and modify the JCL to meet
the requirements at your site.

Work path for interim files


The directory path for the temporary loader files on your workstation or network server.

Viewing File

The Viewing File dialog displays the generated JCL for review. Click OK to submit the job. If you click
Cancel, the job is not submitted; however, the transmitted files remain on the z/OS machine, and you
can run the job manually.

Age Function Tab, Load Request Editor


Use the Age Function tab to provide parameters for using the Age function in a Column Map.

Chapter 6. Load 177


The values on this tab are applied to columns for which you specify the Age function as AGE(DEF) or
AGE(RU=DEF). These values are also used to complete the specifications for date adjustment values in
columns defined with the Age function when the specifications are incomplete.

Date Adjustment Values


None Specifies that an aging increment is not used.
Years, Months, Weeks, Days
Adjusts dates incrementally by a specified number of years, months, weeks, and/or days.
Years Number of years (-2500 to +1581) to adjust the date.
Months
Number of months (-30000 to +30000) to adjust the date.
Weeks Number of weeks (-30000 to +30000) to adjust the date.
Days Number of days (-99999 to +99999) to adjust the date.

Note: Use a minus (-) sign to decrement the date. The plus (+) sign is not required to increment
the date.

178 IBM Optim: Archive User Manual


Specific Year
Adjusts the date to a specific four-digit year (1582 to 3999).
Specific Date
Adjusts the date to a specific date. To select a date from a perpetual calendar, click the down
arrow. Click the arrow buttons to set the month and year. Click on a day to set the day of the
month.

Note: If you do not specify a date, the system (current) date displays. The date format is based
on the Regional Settings on the Control Panel of your computer.
Base/Target
Adjusts the date incrementally by a calculated aging amount. The aging amount is the number of
days between the Base date and the Target date. To select a base or target date from a perpetual
calendar, click the down arrow. Click the arrow buttons to set the month and year. Click on a day
to set the day of the month.
Base Specify an explicit start date for calculating the aging amount.
Target Specify an explicit end date for calculating the aging amount.
Multiple/Rule
Adjusts the date by applying the specified date aging rule the specified number of times. For
example, if the rule is defined as NEXTPAYDAY and you specify 4 as the multiple, the date is
adjusted from the source date to the fourth NEXTPAYDAY.
Multiple
Number of times (1 to 30000) to apply the specified rule for date aging.
Rule Name of the rule to use.

Date Adjustment Options


Calendar
Enter the name of the calendar to use by default. To select from a list of available calendars, click
the down arrow.
Rule Enter the name of the rule to use by default. To select from a list of available rules, click the
down arrow.

Note: Define calendars and rules by clicking Utilities → Calendar from the menu. For details,
refer to the Common Elements Manual .
Century Pivot
Enter the value to use to determine the appropriate century when a date value is defined with a
twodigit year. If you do not specify a value, 65 is used by default. For example, if you specify 55
as the Century Pivot, then:
v All two-digit years equal to or greater than 55 are assumed to be in the 20th century.
v All two-digit years less than 55 are assumed to be in the 21st century.

Exception Options

Select the following exception options to handle special date values when aging data. Rather than treat
these dates as errors, the dates are moved directly from the source to the destination if the column
attributes are identical.
v Process rows with invalid dates — If you select this check box, rows with columns that contain
invalid dates are processed and the results are written to the destination. If you clear the check box, the
rows are discarded and are noted in the Control File.

Chapter 6. Load 179


v Process rows with skipped dates — If you select this check box, rows with columns formatted as
skipped dates are processed and the results are written to the destination. If you clear the check box,
the rows are discarded and are noted in the Control File.

At times, special values called skipped dates are used to indicate special handling or unique conditions.
To determine whether or not to skip a date, the date aging function evaluates each date for the following:
v If a date column contains all spaces, hexadecimal zeros (low values), or hexadecimal 'FF' (high values),
the date is skipped.
v If a date column contains a skipped date value, the value is parsed based on the specified date format
or exit routine.

The date aging function recognizes the following as skipped dates:

Date Format Skipped Date Value


Y/M/D 1999/99/99
9999/99/99
9999/12/31
1900/0/0
2000/0/0
0/0/0
1/1/1
Y/J 1999/999
9999/999
1900/0
2000/0/0
0/0
Y/M 1999/999
9999/999
1900/0
2000/0
0/0
Y 9999
0
M/D 99/99
0/0
M 99
0/0
D 9/9
0/0

This list is intended to be as comprehensive as possible. If you require additional skipped dates, contact
Optim Support.

Global Aging Tab, Load Request Editor


Use the Global Aging tab to specify parameters for aging data in columns defined with a native date
data type.

180 IBM Optim: Archive User Manual


Global Aging parameters apply to all date columns not specifically defined by an Age function in a
Column Map.

Note: The parameters shown on the Global Aging tab are the same as those shown on the Age Function
tab. For information about each parameter, see “Age Function Tab, Load Request Editor” on page 177.

Currency Tab, Load Request Editor


Use the Currency tab to specify the default Currency Table to use when the Currency function is defined
in a Column Map. Specify global parameters for currency conversions in columns that have a native
currency data type.

Default Currency
Specify the Currency Table to use when the Currency function is specified in a Column Map.
Global Currency Options
These options specify the global parameters for currency conversions in columns that have a
native currency data type.
Global Currency
Specify the default Currency Table to use for currency conversions in columns that have a
native currency data type.

Chapter 6. Load 181


From Type To Type
Enter specific currency types for the source and destination currency when converting
currency values in columns that have a native currency data type.
Triangulate
Select this check box to convert the specified source currency to the euro dollar, then
convert the euro dollar value to the specified destination currency.

Report Options Tab, Load Request Editor


Use the Report Options tab to specify which information to include in the Load Process Report.

Reporting Options
Report errors
Select this check box to include a list of errors in the Load Process Report.
Report Invalid Dates
Select this check box to include rows with invalid dates in the Load Process Report when you
select the corresponding Exception Option on the Age Function or Global Aging tab.

182 IBM Optim: Archive User Manual


Report Skipped Dates
Select this check box to include rows with skipped dates in the Load Process Report when you
select the corresponding Exception Option on the Age Function or Global Aging tab.
Maximum number per table
Specify the maximum number of errors per table to include in the Load Process Report.
Maximum number per run
Specify the maximum number of errors per run to include in the Load Process Report.

Aging Option
Report Aging Summary
Select this check box to include a summary of aging parameters in the Load Process Report. A
report that includes the Aging Summary can be printed in landscape mode only.

Notify Tab, Load Request Editor


Use the Notify tab to specify options and addresses for automatic E-mail notification of the success or
failure of the process. The process report generated when the process completes is automatically sent as
an attachment.

Process a Load Request


You can process a Load Request at any time. However, in order to reuse a new Load Request, you must
save it.

You can process a Load Request from within a Restore Request (see Chapter 8, “Restore,” on page 209).
Alternately, you can run a Load Request by itself, or you can schedule a Load Request.

Schedule a Load Request


To schedule a Load Process to run once or repeatedly at a specified future time, save the Load Request,
and click File → Schedule.
v Processing is initiated at the scheduled time; you do not review the process as it is performed.
v If warning conditions exist, processing continues without prompting, depending on the Stop on Error
parameter you specified on the Steps tab of the Scheduling Job dialog.
v During processing, if an error occurs, processing stops.

For details on scheduling, refer to the Common Elements Manual .

Run a Load Request


To process a Load Request immediately, click File → Run. It is not necessary to save the Load Request
before it is run.
v Before processing begins, the request is verified. If warning conditions exist, you can review the details
in the Warnings dialog, and choose to continue or cancel processing.
v During processing, if an error occurs, processing stops.

A progress dialog and status messages provide information while the request is processing. When
processing completes, or stops because of an error, you can review the details in the process report. You
can also browse the Control File to review process details.

Fast Load Confirmation

Fast Load significantly reduces processing time when you reuse a Load Request. The Fast Load
Confirmation dialog displays if the following conditions are met:

Chapter 6. Load 183


v The names of the Load Request, Source File, and Table Map (named or local) match those used to
generate the loader files.
v The content of the Source File has not changed since the loader files were generated.
v Any Column Maps reference the same tables.
v The drive and directory for all loader files for each table are the same as when the files were
generated.

If the Load Request, Source File, and Table Map names have changed, or the content of the Source File
has changed, Archive cannot perform Fast Load for any table in the Load Request, and the Fast Load
Confirmation dialog is not displayed.

If a Column Map name or the drive and directory for the loader files for a given table change, Archive
cannot perform Fast Load for the table, and the table is not listed in the Fast Load Confirmation dialog.

Note: If you select Delete files if successful or Delete files if failure on the DBMS tab in the Load
Request Editor, Fast Load is not available.

The Fast Load Confirmation dialog displays the Source file name, Table Map name or Local, and a list of
the converted tables. A tab is displayed for each DB Alias.

184 IBM Optim: Archive User Manual


Use the Fast Load Confirmation dialog to review the list of converted tables. To reuse all DBMS loader
files for the tables listed, click OK. To create new DBMS loader files for any table, clear the check box for
the table, and click OK. Click Cancel to stop processing and return to the Load Request Editor.

Note: You can right-click the grid and select commands from the shortcut menu to select or deselect all
tables for the corresponding DB Alias. You can also use Select All or Deselect All to select or deselect all
tables for all DB Alias tabs.

Load Request Progress Dialog


During the Load Process, the Load Request Progress dialog displays status information.

Totals
Rows to be processed
Number of Source File rows to be loaded.
Failed Rows
Number of rows that could not be converted and were discarded.
Rows Converted
Number of rows that were converted.

The totals in the Load Request Progress dialog are refreshed according to a number of row setting on the
Actions tab in Personal Options, and when the load for one table completes and the process begins for
the next table. (Refer to the Common Elements Manual for details.)

Current Table
Failed Rows
Number of rows from the current table that could not be converted and were discarded.
Rows Converted
Number of rows from the current table that were converted.

Chapter 6. Load 185


Grid Details
DB Alias
DB Aliases that correspond to tables to be loaded.
[Convert or Load] Status
The status of the process for each database involved in the load process. Processing proceeds
through the following steps:
v Convert in Progress
v Convert Complete
v Validating Table Map
v Now Processing: creatorid.tablename
v Complete

Command Button
Cancel Process
To stop processing during conversion, click Cancel Process. A confirmation dialog opens. Click
Yes to stop processing and return to the Load Request Editor, or click No to continue processing.
You cannot cancel processing during loading.

The Status Bar at the bottom of the dialog displays the name of the table being processed or a description
of the action being performed.

Cascading Delete/Update Confirmation


Archive performs a cascading delete/update check while processing a Load Request

After the cascading delete/update check, Archive displays the Cascading Delete/Update Confirmation
dialog if the following conditions are true:
v The Warn on Cascade Delete/Update option in either Product or Personal Options must be set to
Runtime or Always. (Refer to the Installation and Configuration Guide and the Common Elements Manual
.)
v The Replace mode (or Truncate mode for Oracle) and the Perform Load option must be selected on the
DB Alias tab of the Load Request Editor.
v The cascade delete or update must affect at least one table that is not explicitly included in the Load
Process.

Click OK to continue processing the Load Request, or click Cancel to stop processing and return to the
Load Request Editor.

For details, refer to the Common Elements Manual .

Load Process Report


The Load Process generates a Load Process Report that provides general information and statistics about
the Load Process.

The following is a sample:

186 IBM Optim: Archive User Manual


The Load Process Report displays the following information:
v Name of the Load Request (or Untitled if not saved).
v Name of the Server or Local, for client workstation.
v Directory path and name of the Source File used as input to the process.
v Directory path and name of the Control File specified in the Load Request.
v Name of the Table Map or LOCAL, as specified in the Load Request.
v User IDs of the user requesting the Load Process.
v Date and time the process started.
v Date and time the process finished.
v Elapsed time for the Load Process to complete.
v The status of the Load Process.

Chapter 6. Load 187


Note: The Time Started, Time Finished, and Elapsed Time refer to the conversion phase of the process
only.

Errors

If any errors or warnings occur during processing, a list of the errors or warnings is provided. Review
the list of errors that caused processing to stop. For example, an internal error condition exists when the
process exceeds the discard row limit or if you are not authorized to access a particular database table.

Process Summary

Statistics are provided for data preparing to load:


v Total number of Tables Processed.
v Total number of Rows Extracted.
v Total number of Rows Converted.
v Total number of Rows with Errors.

Row Details

Information is provided for each table:


v Number of extracted rows.
v Number of converted rows.
v Number of failed rows.
v List of tables used in the Load Process. The tables are listed in the same order as in the Source File. If a
table was selected on the Fast Load Confirmation dialog, the table name is underscored.

Save the Report


To save the report to a file, click File → Save As to open the Windows Save dialog.

Print the Report


To print the report, click File → Print to open the Windows Print dialog.

Redisplay the Report


To refer to a closed report, click File → Redisplay Results → Current to redisplay the report from the last
Load Process run, or click File → Redisplay Results → All to display a list of all retained Load Process
Reports.

For details, see the Common Elements Manual .

188 IBM Optim: Archive User Manual


Chapter 7. Report
Using the Report Process, you may create a report on the contents of an Archive or Compare File or list
Archive Directory entries that meet criteria you supply.

Depending on your specifications, you can create a report that will:


v List the contents of selected tables in an Archive File, or show joined segments of archived data,
beginning with rows from the table you select and proceeding to related rows in joined tables. You can
use selection criteria to define a segment or to select rows from joined tables.
v List Archive Directory entries matching criteria you provide.

The Report Process runs on the workstation (not on the Optim Server). Specifications for a Report Process
are stored as a Report Request. The Report Request provides the parameters needed to select data from
the Archive File or the Archive Directory. For an Archive File Report Request, you can also select the
output options: a file, a printer, or both.

Note: For information needed to create a report on data in a Compare File, refer to the Compare User
Manual .

Run or Schedule

You can process a Report Request immediately (by clicking File → Run) or you can schedule the request
for processing at a later time (by clicking File → Schedule). You can also run a Report Request from the
command line, providing overrides for parameters in the request (for more information, refer to
Chapter 12, “Command Line Interface — Processing Utilities,” on page 327). You must save a request to
schedule it or run it from the command line, but need not save a request to run it.

Naming Conventions

A fully qualified Report Request name is in the form identifier.name, where:


identifier
Identifier assigned to the Report Request name (1 to 8 characters).
name Base name assigned to the Report Request (1 to 12 characters).

A logical set of naming conventions can identify the use for each Report Request and be used to organize
them for easy access.

Section Contents

This section explains how to create, maintain and process a Report Request, including how to:
v Select the type of Report Request (File or Archive Directory).
v Identify the Source File and tables to analyze for the report, or provide criteria and values to find
Archive Directory entries.
v Select output options for the report (for Archive File Report Requests only).
v Select layout, row display, and format options.
v Run, save, and schedule a Report Request.

© Copyright IBM Corp. 1994, 2010 189


Open the Report Request Editor
Use the Report Request Editor to create or edit requests for reports on data in an Archive File or entries
in an Archive Directory.

These requests may be stored in the Optim Directory. There are different ways to open the editor,
depending on whether you want to create a new Report Request or edit an existing a Report Request.

Create a new Report Request


Use this task to create a Report Request. A Report Request contains specifications for a report on the
contents of an Archive or Compare File or list Archive Directory entries that meet criteria you supply.

You can create a Report Request from the main window or from the Report Request Editor.

From the Main Window


Use this task to create a Report Request if the Report Request Editor is not already displayed.

To create a Report Request:


1. In the main window, click File → New → Report to open the Report Request Editor.
2. On the General tab, select the type of Report Request, and for Archive File Report Requests, provide
an optional title for the report and select output options, including the file name or printer selection
for the report.
3. Depending upon the type of report, use the Source File tab to enter the name of a Source File and
select tables on which to report and the Archive Details tab to select layout and row display options,
or the Archive Criteria tab to provide criteria for Archive Directory entries.
4. Provide Notification parameters, and for Archive File Report Requests, provide Formatting
parameters.
5. In the Report Request Editor, click File → Save to open the Save a Report Request dialog.
6. In the Pattern box, type a unique name for the new Report Request and click Save.

From the Report Request Editor


Use this task to create a Report Request if the Report Request Editor is already displayed.

To create a Report Request from the Report Request Editor:


v To create a new Report Request, click File → New in the Report Request Editor.
v To create a new Report Request modeled on an existing one, open the desired Report Request and click
File → Save As.
v To create and store a copy of the active Report Request and continue editing, click File → Save Copy
As.

These steps are the minimum required to create a Report Request. After you create a request, you can run
the process immediately, or save the request and schedule it. Because the options to create a Report
Request and to modify a Report Request are similar, refer to “Using the Report Request Editor” on page
191 for complete details.

Select a Report Request to Edit


You can select a Report Request for editing from the main window or from the Report Request Editor.

To select a Report Request to edit:


1. In the main window, click File → Open to display the Open (object selection) dialog.
2. Under Identifier, open Report Request and click ID to display a list of Report Requests.
3. To limit the list based on your criteria, specify a Pattern and click Refresh.

190 IBM Optim: Archive User Manual


4. Double-click the grid row for the desired Report Request to open the Report Request Editor.

To select the last Report Request you edited, click Actions → Report in the main window to open the
Report Request Editor and the last edited Report Request.

When you click File → Open in the main window or an editor, the Open dialog is displayed. For general
information about this dialog, see the Common Elements Manual .

Using the Report Request Editor


In the Report Request Editor you can create, modify, or delete Report Requests. You can also save Report
Requests to the Optim Directory.

Description
Text to describe the purpose of the Report Request (up to 40 characters).
Tabs
Use the Report Request Editor tabs to provide parameters and select options to define Report
Requests. Each tab in the editor serves a unique purpose.

Chapter 7. Report 191


General
Parameters required by the Report Process, including the type of report (in other words,
Archive Directory or File), the report title, output options, report file name, and printer
specifications, as applicable. Each time you open the editor, the General tab is shown
first.
Archive Criteria
Parameters needed to select entries in the Archive Directory (for example, Creator ID or
Archive File name) for the report. The Archive Criteria tab is available when Report
Type on the General tab is set to Archive Directory.
Source File
Parameters required to select an Archive or Compare File for the report, including the
Server name, Source File name, and the tables included in the report. The Source File tab
is available when Report Type on the General tab is set to File.
Archive Details
Layout and row display options for the report. The Archive Details tab is available when
Report Type on the General tab is set to File and the Source File is an Archive File.
Formatting
Limits, spacing, and table heading options for the report. The defaults for formatting
options are set in Product Options.
Notify Options for automatic email notification of the success or failure of the process.

Tools Menu Commands

In addition to the standard commands on the File, Edit, and Tools menus, you can select the following
commands from the Tools menu:
Convert to Local
Convert a named Report Request to a local Report Request. A local Report Request is saved with
the Archive Request. Convert to Local is active only when the Report Type is File.
Edit Joins
Open the Edit Joins dialog to select joined tables in the report. Available when Show Joins is
selected on the Archive Details tab and the Report Type is File.

General Tab, Report Request Editor


Use the General tab to select the report type and provide the title for the report. You can also select
output options for the report, including the text format, and choose to save report information to a
named Report File or to print the report.

192 IBM Optim: Archive User Manual


Report Type

Select the type of report:


File Report on data in a Source Archive or Compare File.
For information needed to create a report on data in a Compare File, see the Compare User Manual
.
Archive Directory
Report on selected Archive Directory entries and the properties of associated Archive Files.
Security
Report on Functional or Object Security permissions. For more information, see the Installation and
Configuration Guide .

Report Title

For Archive File Report Requests only. Enter a title to appear on each page of the report.

Chapter 7. Report 193


Output Options

Output Options are available for Archive File Report Requests only.

:
Local File
Select Local File and enter a Report File name to save the output of the Report Process as a .txt
or .rtf file.
Local Printer
Select Local Printer to print the Report on a selected printer.
Rich Text Format
Select Rich Text Format to obtain formatted text and graphics. The default font is Courier. You
can modify RTF files using Microsoft Word. The files may be used with different output devices,
operating environments, and operating systems.
Plain Text Format
Select Plain Text Format to obtain Plain Text (ASCII). Plain text is supported by nearly every
application on every machine. However, it cannot contain any formatting.

Note: If you select Plain Text Format, you must also select Local File. (Local Printer is ignored.)
Report File
The name of the Report File. Report File is available if Local File is selected. If you enter the
name of an existing file, a prompt confirms that you want to overwrite the file unless it is
disabled in Personal Options.
To browse the contents of an existing Report File, right-click the file name and select View from
the shortcut menu.
Report Printer
The name of the printer. Report Printer is available if Local Printer is selected. To change the
printer, click the Print Options button to display the Windows Print Setup dialog.

Archive Criteria Tab, Report Request Editor


Use the Archive Criteria tab to provide criteria for a list of Archive Directory entries. This list is typically
used to review Archive Files for which the retention period is about to lapse before they are deleted.

If needed, you can extend the retention period using the Archive Directory Entry Information dialog. See
“Update Directory Entry” on page 254 for more information. You can also generate lists to evaluate usage
of Storage Profiles, Optim Servers, or backup devices for maintenance purposes.

The Archive Criteria tab is available only if you select Archive Directory as the Report Type on the
General tab.

194 IBM Optim: Archive User Manual


The elements of the Archive Criteria tab are described as follows.

Combine all criteria with

Option for combining criteria:


AND An Archive Directory entry must match all criteria.
OR An Archive Directory entry must match one or more criteria.

All entries that match any criteria for a single criteria type are selected, regardless of the Combine all
criteria with setting.

Variable Delimiter

Character used to separate multiple criteria for a type. To change the delimiter, click the down arrow.

Chapter 7. Report 195


Criteria grid

Use the grid to provide criteria for Archive Directory entries to be listed in the report or leave the grid
blank to report on all entries. The report lists entries in the order in which matching Criteria are selected
on the Archive Criteria tab. Click a Criteria grid cell to select a criteria type and enter one or more Values
for each criteria type, using the Value Delimiter to separate multiple values. You can select the Sort
Ascending check box to list Archive Directory Entries that match the criteria for the Criteria type in
ascending order or clear the check box to list entries in descending order. Criteria types and values that
you can enter as criteria are as follows:
Server Optim Server(s) for Archive File(s) associated with Directory entries in report. Possible values are:
blank, (Local), or (None)
Archive Files reside on the local Optim Server.
servername
Name or pattern for one or more Optim Servers.
Group Group name(s) for Archive File(s) associated with Directory entries in report. Possible values are:
blank or (None)
Entries with no specified group name.
groupname
1 to 8-character name or pattern.
Filename
Archive File(s) associated with Directory entries to be listed. Possible values are:
filename
Explicit path and name or pattern for Archive File.
Creator
Creator ID(s) under which the Archive File(s) associated with Directory entries in report were
created. Possible values are:
creatorid
1 to 26-character name or pattern.
Creation Date Range
Date range in which Archive File(s) associated with Directory entries in report were created.
Separate start and end dates with the Variable Delimiter and enclose in parentheses.
Assuming a comma as the Variable Delimiter, the date range is in the format: (startdate, enddate).
startdate
Date (in the format MM/DD/YYYY) after which the Directory entry was created.
(Required)
enddate
Date (in the format MM/DD/YYYY) before which the Directory entry was created.
(Required)
Retention Date Range
Date range in which Archive File(s) associated with Directory entries in report are to be deleted.
Separate start and end dates with the Variable Delimiter and enclose in parentheses.
Assuming a comma as the Variable Delimiter, the date range is in the format: (startdate, enddate).
startdate
Date (in the format MM/DD/YYYY or as a number of days from 1 to 9132) after which
the Archive File is to be deleted.

196 IBM Optim: Archive User Manual


enddate
Date (in the format MM/DD/YYYY or as a number of days from 1 to 9132) before which
the Archive File is to be deleted.
blank Archive Files with no retention policy.
Storage Profile
Storage Profile criteria for Archive File(s) associated with Directory entries in report. Possible
values are:
blank or (None)
Entries that do not reference a Storage Profile.
profilename
Name or pattern for the Storage Profile.
Backup Device
Backup device criteria for Archive File(s) associated with Directory entries in report. Possible
values are:
blank or (No Device)
Archive Files that are not saved to a backup device.
Centera
Archive Files saved to Centera.
EMC NetWorker
Archive Files saved to EMC NetWorker.
IBM Tivoli®
Archive Files saved to IBM Tivoli.
Description
Description for Archive File(s) associated with Directory entries in report.
blank or (None)
Entries that do not have a description.
description
Name or pattern of the description.
Table Name
Names of table(s) in Archive File(s) associated with Directory entries in report. Possible values
are:
tablename
Name or pattern for the table name. (Required)
Litigation Hold
Litigation Hold status for Archive Files stored on Centera. Values are:
Yes Archive Files with Litigation Hold value of Yes.
No Archive Files with Litigation Hold value of No.
% Use the percent (%) wildcard to include Archive Files with any of the following values
for Litigation Hold:
Yes The value is Yes.
No The value is No.
Unavailable
Attempt to connect to Centera failed or the Archive File entry is invalid.

Chapter 7. Report 197


(None)
Archive File is not stored on Centera and the archive criteria are combined with
OR.
Centera Advanced Retention Management is not licensed
Centera is not licensed for Advanced Retention Management and archive criteria
are combined with OR.

Sort Ascending

The report lists Archive Directory entries in the order in which matching Criteria are selected on the
Archive Criteria tab. Select the Sort Ascending check box to list Archive Directory Entries that match the
criteria for the Criteria type in ascending order or clear the check box to list entries in descending order.

Shortcut Menu

To clear an entry, right-click a row to display the shortcut menu and select Remove. Select Remove All to
clear all criteria.

Edit Criteria Values


The Edit Criteria dialog provides additional space to help you more easily define values for a single
criteria type.

Click the browse button to open the Edit Criteria dialog. The Edit Criteria allows you to:
v Enter multiple criteria values on individual rows.
v Select dates from a calendar utility.
v Select Backup Devices from a list of available devices.

Note: You can use the % (percent) wild card to represent one or more characters or use the _
(underscore) wild card to represent a single character. (The underscore must be selected as an SQL LIKE
character on the General tab of Personal Options.)

If the Criteria type is Backup Device, the Edit Criteria dialog displays a list of available backup devices.

198 IBM Optim: Archive User Manual


Source File Tab, Report Request Editor
Use the Source File tab to provide the name of the Source File for the report and identify tables in the
Source File from which to compile the report information. The Source File tab is available if you select
File as the Report Type on the General tab.

Chapter 7. Report 199


Source File Server

Select (Local) for a Source File that resides on the workstation or click the down arrow to select the
Server on which the file resides.

Source File Name

Enter the complete path and file name for the Source File containing the data for the report. Type the
name, click the Browse button to select the file from a directory, or click the Retrieve button to select the
last Source File you created.

To browse the contents of the Source File, right-click the file name and select Browse from the shortcut
menu. For details on the Browse Utility, refer to the Common Elements Manual .

Table List/Start Table

A list of tables in the Source File. The label varies according to the Show joins setting on the Archive
Details tab. You can create a report that lists the contents of selected tables or a report that shows a
segment of joined rows in the tables.

200 IBM Optim: Archive User Manual


To create a report that lists the contents of selected tables, you must clear the Show joins check box on the Archive
Details tab.
Table List Select a check box to include the table data in the report or click Select All to select all listed table
names, or Clear All to clear all check boxes. You must select at least one table to run the Report Request.
Automatically Select this check box to include data from all Source File tables in the report, whether or
Report New not the tables are named or selected in the original Table List. This feature is useful in an
Tables automated process in that you need not update the Report Request manually to process
Source Files that include tables different from, or in addition to, those in the original
Source File.

(Available only when the Show joins check box on the Archive Details tab is cleared.)
To create a report showing joined segments of archived data, you must select the Show joins check box on the
Archive Details tab.
Start Select the check box for one table on the list to be the Start Table. To join other tables to the Start Table
Table and to joined tables and to apply selection criteria, click Tools → Edit Joins to open the Edit Joins dialog.
Refer to “Edit Joins.”

Edit Joins
When you select the Show joins check box on the Archive Details tab, you must select a Start Table from
the list of tables on the Source Table tab. You can then use the Edit Joins dialog to join related tables,
beginning with the Start Table.

You can join data from other related tables in the Source File, provide selection criteria, and format the
report to start a new page for each segment of joined data, beginning with the parent row.

Click Tools → Edit Joins to display the Edit Joins dialog.

Joined Tables

Select a table name in the Joined Tables tree to display the names of related tables in Related Tables.
Shortcut menu commands allow you to edit selection criteria for the selected table, precisely defining the
segment of archived data in the report, to assign each selected row of the table to a new report page, or
to remove a join.

Chapter 7. Report 201


Related Tables

Double-click a name in Related Tables to join the table to the table selected in Joined Tables tree.
Alternately, you can right-click the table name and select Join Table from the shortcut menu. If more than
one relationship between a pair of tables exists, you are prompted to select the relationship to use.

Report Selection Criteria


You can define selection criteria for any table listed in the Joined Tables tree on the Edit Joins dialog. The
selection criteria applies to the table in all Archive Files processed by the Report Request.

To define selection criteria, right-click a table name in the Joined Tables tree and select Edit Selection
Criteria from the shortcut menu. The Report Selection Criteria dialog is displayed.

The selected table name is displayed at the top of the Local Selection Criteria dialog.

Tabs

The dialog has two tabs. Use the Column Criteria tab to define selection criteria for any column in the
selected table, or the SQL tab to define an SQL WHERE clause for the table.

Use the Column Criteria tab to provide criteria for one or more columns in the selected table. For further
information, see “Column Criteria Tab” on page 230

202 IBM Optim: Archive User Manual


For selection criteria that is more complex than can be defined on the Column Criteria tab, use the SQL
tab to create an SQL WHERE clause. For example, to select the desired rows from a table, you may need
a combination of AND and OR logical operators. For further information, see “SQL Tab” on page 231.

Archive Details Tab, Report Request Editor


Use the Archive Details tab to provide layout and row display parameters. The Archive Details tab is
available if you selected File as the Report Type on the General tab, and the Source File is an Archive
File.

Layout Options
Columnar In columnar format, the column headings are placed horizontally across the report, with the data
displayed in columns beneath the headings. Note that headings for primary key column(s) display in
bold type.

Columnar format is valid only for a report generated using Rich Text Format (RTF).
Side In side label format, the column headings for each row are listed down the left side of the report and
Labels the data displayed to the right of the headings. This format focuses on a single row and can often
provide room for more columns in a row than the columnar format.

Chapter 7. Report 203


Show Select to display headers for tables that contain rows that, due to criteria specifications, are not included
Empty in the report.
Tables

Row Display Options


Show joins Select Show joins to create a report showing segments of relational data. You must select a Start Table
from the list of tables on the Source File tab before clicking Tools → Edit Joins from the menu to
display the Edit Joins dialog. Use the Edit Joins dialog to join related tables, beginning with the Start
Table. Refer to “Edit Joins” on page 201.

Formatting Tab, Report Request Editor


Use the Formatting tab to define formatting and other parameters for the Report Process output.

Limits

The default values for Limits are set on the Report tab in Product Options. Refer to the Installation and
Configuration Guide .

204 IBM Optim: Archive User Manual


Rows per Table
Maximum number of rows (1 to 99999999) that can be reported on during a single Report
Process. This setting applies only if the Report Type is File.
Lines per Page
Maximum number of lines per page (50 to 999).
Line Length
Maximum number of characters per line (31 to 999).
Character Column Width
Maximum number of characters per column (1 to 999) for the report. This setting applies only if
the Report Type is File.

Spacing

The default values for Spacing are set on the Report tab in Product Options. Refer to the Installation and
Configuration Guide .
Blank Lines Between Rows
Number (0 to 9) of blank lines between rows.
Minimum Spaces Between Columns
Number (0 to 9) of blank spaces between columns.
Blank Lines Between Levels
Number (0 to 9) of blank lines between each level of related tables, when Show joins is selected,
and related tables are joined.
Spaces to Indent Subordinate Tables
Number (0 to 9) of spaces to indent subordinate rows.

Adjust Oversized Lines

Options for handling lines that exceed the limits of the report page are handled.
Truncate
End each report row after the maximum number of characters (including spaces) per line is
reached.
Wrap Wrap each row to the next line of the report when the row length exceeds the maximum number
of characters (including spaces) per line.

Show Table Headings

Provide column names with data reported from the Start table.

Show Subordinate Table Headings

Provide column names with first joined row.

Show Redundant Table Headings

Include column names with every row of related data reported from a joined table.

Get Site Defaults

Inserts Limits and Spacing defaults as set in Product Options. Refer to the Installation and Configuration
Guide .

Chapter 7. Report 205


Notify Tab, Report Request Editor
Use the Notify tab to specify options and addresses for automatic email notification of the success or
failure of the process. The process report generated when the process completes is automatically sent as
an attachment.

Process a Report Request


A Report Request processes in several steps. There are a few differences depending on whether you
schedule the process or run the Report Request immediately.

Schedule a Report Process


To schedule a Report Process to run once or repeatedly at a specified future time, save the Report
Request and click File → Schedule.
v Processing is initiated at the scheduled time; you do not review the Report Process as it is performed.
v If warning conditions exist, processing continues without prompting, depending on the Stop on Error
parameter you specified on the Steps tab of the Scheduling Job dialog.
v If an error occurs during the Report Process, processing stops.

For details on scheduling, refer to the Common Elements Manual .

Run a Report Request


To process a Report Request immediately, click File → Run. It is not necessary to save the Report Request
before it is run.
v Before processing begins, the Report Request is verified. If errors exist, you can review the details on
the message bar at the bottom of the Report Request Editor.
v After the Report Request has been verified, the process parameters are verified. If warnings or errors
exist, you can review the details in the Warnings dialog and choose to continue or cancel the process.
v If an error occurs during the Report Process, processing stops.

Report Process Report


The Report Process generates a Report Process Report that provides general information and statistics
about the Report Process.

The formatting of the Report Process Report is determined by the Report Type. The following is a sample
from a Report Process where File is the Report Type:

206 IBM Optim: Archive User Manual


The Report Process Report displays the following information:
v Name of the Report Request (or (Untitled) if you did not save the request).
v For an Archive File Report Request, the name of the Source File containing the data for the report.
v For an Archive File Report Request, indicator (File or Printer) of the Output Options for the Report
Process. If the Output Options is Local File, the complete path and name of the Report File.
v User IDs of the user requesting the Report Process.
v Date and time the Report Process started.
v Date and time the Report Process completed.
v The elapsed time.
v A list of any warnings or errors that occur during processing.

Process Summary

For an Archive File Report Request, the following statistics are provided:
v Total number of Tables Processed.
v Total number of Rows Processed.

Chapter 7. Report 207


For an Archive Directory Report Request, the following statistics are provided:
v Name of the Optim Directory referenced in the report.
v Indicator (Combined using ANDor Combined using OR) of how the Report Criteria was combined.
v The criteria and values used to search for Archive Directory entries.
v Number of Archive Directory entries that match the specified criteria.

Row Details

For an Archive File Report Request, statistics for each table are provided:
v Names of tables selected in the Report Request, and the number of rows in each table.

208 IBM Optim: Archive User Manual


Chapter 8. Restore
Use the Restore Process to select data from one or more Archive Files and restore the data to the original
or to a different database.

Specifications for a Restore Process are stored as a Restore Request. Use the Restore Request Editor to
define parameters for a Restore Process, including the source of the archived data and the destination to
which it is restored, and designating whether a Load Process or an Insert Process is used to restore the
data.

There are two steps to a Restore Process. First, the Archive File that contains the desired data is located
and the desired data selected. Once the data is located, it is restored. The Restore Request Editor has two
work areas to accommodate these steps: the top area is used to locate and select the desired data and the
bottom area is used to manage restore processing – including whether to use an Insert Process (in other
words, dynamically constructed SQL) or a Load Process (in other words, the DBMS Load Utility) to
restore the selected data.

A Restore Process can be run from the graphical user interface (by clicking File → Run on the Restore
Request Editor) or from the command line. The approach used depends upon how your organization
manages its archiving environment. You can also schedule the request to run at a later time (by clicking
File → Schedule), but this is done infrequently.

For unplanned restorations, a member of the IT group will typically use the Restore Request Editor to
define and run the Restore Process from the graphical user interface. However, many organizations can
anticipate and plan restorations. These organizations can use the Restore Request Editor to define the two
parts of the Restore Request in advance. The Restore Process is then run in an automated fashion, using
the command line interface. When defining a Restore Request in advance, the top portion of the editor
lists one or more representative Archive Files (templates for files that may be found when searching for
data to be restored) and the bottom portion provides the information needed to Insert or Load data from
similar files. In this automated process, Archive Files to be restored are substituted at run-time for the
template files listed in the pre-defined Restore Request.

This automated approach accommodates changes in data model by allowing you to list “template”
Archive Files in the Restore Request that mirror the data model for an application. The rules for restoring
data from each template are typically straightforward and you can create an Insert or Load Request to
match each template Archive File. As the application and data model evolve over time, the Insert or Load
Request for an early Archive File can be updated, creating a new Insert or Load Request to accommodate
files that reflect the more recent data model.

Using the command line interface, all Archive Files for the application are searched and the names of
matching Archive Files are used as overrides for files listed in the Restore Request. The Insert or Load
Request (referenced in the Restore Request) that matches the Archive File is then used to restore the
selected data.

Example

As an example of this approach, assume that when archiving is implemented, the data model of the
production database matches that of the Archive Files. Therefore, the Restore Request lists a single Insert
(or Load) Request that references, as its Source File, an Archive File with this data model. At some point
in the future, a new version of the application is released and the data model changes. At that time, a
second Insert Request, which references an Archive File with the new data model as its Source File, is

© Copyright IBM Corp. 1994, 2010 209


added to the Restore Request. In addition, the Table Map and any Column Maps for the original Insert
Request can be edited to accommodate the new data model. This process is repeated each time the data
model is updated.

Suppose that the data model of your production database is based on version 1 of your order-entry
application. From July 2000 to November 2000, you archive old orders monthly. To restore data, you need
only one Restore Request. This Restore Request lists a single Insert Request that references an Archive
File (say, from August 2000) as its Source File. The data model of this Source File matches all Archive
Files created during that time.

In December 2000, your company implements version 2 of the application, and the data model of the
production database changes. You continue to archive orders monthly. To restore data successfully,
however, you must alter the Restore Request. First, to restore data from files archived from July 2000 to
November 2000, you must modify the original Insert Request by editing the Table and/or Column Maps
to reflect the new data model. Second, you must add a new Insert Request to the Restore Request, which
references the new data model as its Source File. These changes ensure that you can restore data from the

210 IBM Optim: Archive User Manual


Archive Files using one Restore Request, and that you have accommodated changes to the data model.

In this example, each Archive File is processed by the first Insert or Load Request for which the data
model of the Source File matches that of the Archive File.

Section Contents

This section explains how to create, maintain, and process a Restore Request, including how to:
v Select Archive Files that contain the data to restore.
v Specify parameters to select archived data for restoration.
v Select the method used to restore the data.
v Specify notification options.
v Run, save, and schedule a Restore Request.
v Review, save, and print a Restore Process Report.

Chapter 8. Restore 211


Open the Restore Request Editor
Use the Restore Request Editor to create and maintain requests to restore archived data. There are
different ways to open the editor depending on whether you want to create a new Restore Request or
select a Restore Request to edit.

Create a New Restore Request


Use this task to create a new Restore Request. A Restore Request contains the parameters for a Restore
Process, including the source of the archived data and the destination to which it is restored, and
designating whether a Load Process or an Insert Process is used to restore the data.

To create a new Restore Request:


1. In the main window, click File → New → Restore to open the Restore Request Editor.
2. Type a brief description of the Restore Request, if desired.
3. Right-click the Archive Files grid and click Add Archive File(s) → Archive Directory Index or Add
Archive File(s) → File System to select and add name(s) of Archive Files for the data model(s) to
restore.
4. Select Insert or Load as the method used to restore the data.
5. Complete the following.

Option Description
If the method you use to restore the data is... Then...
Insert right-click an Archive File name in the Archive Files grid
and click Create Insert Request → Local or Create Insert
Request → Named, depending on the data model for the
selected file.
Load right-click an Archive File name in the Archive Files grid
and click Create Load Request → Local or Create Load
Request → Named, depending on the data model for the
selected file.

See Chapter 5, “Insert,” on page 113 or Chapter 6, “Load,” on page 135 for more information about
creating an Insert or Load Request.

These steps are the minimum required to create a Restore Request. After you create a request, you can
run the process immediately, or save the request. If desired, you can schedule a saved request. The
options to create a Restore Request and to modify a Restore Request are similar; see “Using the Restore
Request Editor” on page 213 for details.

As an alternate method for opening the Restore Request Editor, click Actions → Restore in the menu in
the main window. By default, the last Restore Request you edited is shown. The next step depends on
your purpose:
v To create a Restore Request, click File → New in the Restore Request Editor.
v To create a Restore Request modeled on an existing one, open the desired Restore Request and click
File → Save As in the Restore Request Editor.
v To create and store a copy of the current Restore Request and continue editing, click File → Save Copy
As in the Restore Request Editor.

212 IBM Optim: Archive User Manual


Using the Restore Request Editor
Use the Restore Request Editor to create, modify, or delete a Restore Request. You can save a set of
parameters as a named Restore Request to be reused, or to use as a model for future Restore Requests.
Restore Requests are stored in the Optim Directory.

In addition to providing processing instructions, a Restore Request lists Archive Files that serve as
templates for categories of Archive Files or that contain the archived data to restore. The Restore Request
also lists Insert or Load Requests that may be used to restore selected data.

The Restore Request Editor allows you to describe a precise set of archived data and easily restore it to a
database. You can define criteria to list Archive Files that are likely to contain the data to restore, and
define additional criteria to select specific data from the Archive Files. You can also browse the Archive
Files to confirm and review the archived data before you begin the Restore Process.
Description
Text that describes the purpose of the Restore Request (up to 40 characters). This information can
help identify a Restore Request in a selection list.
Global Selection Criteria Defined
Indicator for global selection criteria. This check box is available and selected when you click
Tools → Apply Global Selection Criteria and define criteria on the Global Selection Criteria
dialog. Clear this check box to remove global selection criteria and disable the check box. See
“Define Search or Selection Criteria” on page 229.
Automatically Generate Subset Extract Files at Runtime

Chapter 8. Restore 213


When you restore part of an Archive File (that is, when you perform a selective restore), the
subset of data to restore is extracted from the Archive File and stored in a Subset Extract File.
Select this check box to generate a name for each Subset Extract File, as needed. Generated file
names are in the form pstnnn.xf, where nnn is a number that is not used in the name of an
existing Subset File. The files are stored in the default Data Directory or in the Temporary Work
Directory, according to the option selected on the Archive tab in Personal Options.
If you clear this check box, you must provide a Subset Extract File name for each Archive File to
which you have applied selection criteria. If the name you provide is not fully qualified, the
Subset Extract File is stored in the default Data Directory.
Compress Subset Extract Files
Select this check box to compress Subset Extract Files automatically.
Delete Subset Extract File after successful Restore
Select this check box to delete any Subset Extract Files created during a successful Restore Process
automatically. You can choose to retain a Subset Extract File and reuse it.

Note: Subset Extract Files saved on secondary media (for example, a drive for removable media)
are not deleted.
Continue Processing if Errors
Select this check box to continue processing any unprocessed Archive Files after an error
condition. (No prompt is displayed.)
Archive Files List
This lists the Archive Files that are referenced by the Restore Request.
For a detailed description of the items in this list, see “Archive Files List” on page 215.
Restore Process
Options allow you to choose the method used to restore data. Select one of the following options:
Insert Use the Insert Process to restore data. The database is available to other users during
Insert Processing. Also, an Insert Process can provide one-step Update/Insert Processing.
See Chapter 5, “Insert,” on page 113 for more information about the Insert Process.
Load Use a Load Process to transform the data into a format appropriate for a DBMS loader
and start the database load utility used to restore the data. For a large volume of data or
because of referential integrity cycles, a Load Process may be preferred over an Insert
Process. See Chapter 6, “Load,” on page 135 for more information about the Load Process.
Insert Request Selection Mode (or Load Request Selection Mode)
Because the data model of your production database may change over time, you can list several
Insert or Load Requests in the Restore Request and provide criteria needed during processing to
match an Archive File with the appropriate Insert or Load Request. Use these options to specify
the type of criteria used. During processing, an Archive File is matched with listed Insert or Load
Requests on the basis of the Request Selection Mode and the criteria provided. The first request
that matches the Archive File is used to restore data in that Archive File. If no match is found,
data from the Archive File is not restored, and an error occurs.
To be used to restore data from an Archive File, an Insert or Load Request must be compatible
with the Archive File. In general, an Insert or Load Request is compatible with an Archive File if
the data model for the Source File, specified in the Insert or Load Request is the same as the data
model for the Archive File.
The heading on the list reflects the Restore Process option you select. For example, if you select
Insert as the Restore Process, the title is Insert Request Selection Mode. If Load is the Restore
Process, the title is Load Request Selection Mode.

214 IBM Optim: Archive User Manual


The options are:
Data Model
Use the first listed Insert or Load Request that matches the data model of the Archive File
to be restored. To match the Archive File, the Source File in an Insert or Load Request
must contain the same number of tables with the same names.
Also, if the Table Map used with the Insert or Load Request references a Column Map,
the Column Map must apply to the same columns as in the corresponding table in the
Archive File, with compatible data types.
Date Use the first listed Insert or Load Request for which the specified date range includes the
creation date of the Archive File to be restored.
Description
Use the first listed Insert or Load Request for which the specified description matches the
Description for the Archive File to be restored.
Group Use the first listed Insert or Load Request for which the specified group matches the
Group designation for the Archive File to be restored.
Insert Requests List (or Load Requests List)
This lists the Insert Requests or the Load Requests that you can use to restore data.
The heading on the list reflects the Restore Process option you select. For example, if you select
Insert as the Restore Process, the title is Insert Requests List. If Load is the Restore Process, the
title is Load Requests List.
For a detailed description of the items in this list, see “Insert Requests List (or Load Requests
List)” on page 218.

Archive Files List

This lists the Archive Files that are referenced by the Restore Request. The Archive Files list contains the
following:
Archive File
The names of Archive Files referenced by the Restore Request. Archive Files are processed in the
order in which they are listed. You can change the order by dragging a grid row number to the
desired position.

Note: The order in which files are processed might inadvertently cause old data to supersede
new data.
To remove, add, or replace Archive File names, right-click and select a command from the
shortcut menu. To browse a listed Archive File, click Browse in the shortcut menu.
Status The status of each Archive File. Archive automatically provides status information about a listed
Archive File, as follows:
(blank) The Archive File is valid and accessible.
Not Found
The Archive File cannot be found and no Archive Directory information is available.
Inaccessible
The Archive File is not available to the workstation.
Invalid
The listed file is not an Archive File.
Unregistered
The Archive File is not registered in the Archive Directory.

Chapter 8. Restore 215


Server The name of the server on which the Archive File resides or (Local) if the Archive File was
created on a workstation. Archive automatically provides this information about a listed Archive
File.
Group Group information for the Archive File.

Note: Archive normally provides Group information from the Archive Directory. If a listed
Archive File is not registered, Archive obtains the information directly from the file. If the file is
inaccessible (that is, if the file is stored on a drive that is not directly accessible), Archive leaves
these grid cells blank. If the Group information is not taken from the Archive Directory, the grid
cell is cross-hatched.
Created Date
The date the Archive File was created.

Note: Archive normally provides Created Date information from the Archive Directory. If a listed
Archive File is not registered, Archive obtains the information directly from the file. If the file is
inaccessible (that is, if the file is stored on a drive that is not directly accessible), Archive leaves
these grid cells blank. If the Created Date information is not taken from the Archive Directory,
the grid cell is cross-hatched.
Description
Description information for the Archive File.

Note: Archive normally provides Description information from the Archive Directory. If a listed
Archive File is not registered, Archive obtains the information directly from the file. If the file is
inaccessible (that is, if the file is stored on a drive that is not directly accessible), Archive leaves
these grid cells blank. If the Description information is not taken from the Archive Directory, the
grid cell is cross-hatched.
Modified AD
A modified Access Definition, saved with the Restore Request, is used to select archived data to
restore. (For example, a modified Access Definition may be needed to restore data using a Start
Table different from that used to archive the data.) The Modified AD check box is selected
automatically if you alter the Access Definition in the Archive File and save the modified version
with the Restore Request.
To edit the original or a modified Access Definition, right-click the Archive File name and click
Browse → Access Definition → Modified or Browse → Access Definition → Original in the
submenu. Archive displays the Access Definition in the Access Definition Editor. You can then
change the Start Table and the traversal path, or specify reference tables for restoring data from
the Archive File.
Clear the check box to revert to the original Access Definition.
Sel Crit
The type of selection criteria applied to the Archive File. You must specify selection criteria to
selectively restore archived data.
Local Criteria specific to this Archive File applies.
v To copy global criteria as local, right-click a grid cell for the Archive File and click
Copy Global Selection Criteria.
v To set all listed Archive Files to local selection criteria, right-click a grid cell for an
Archive File and click Set All → Local in the shortcut menu.
v To define or edit local criteria, right-click a grid cell for the Archive File and click
Apply Local Selection Criteria in the shortcut menu to open the Local Selection
Criteria dialog.
v To use no criteria for an Archive File, right-click a grid cell for the Archive File and
click Remove Selection Criteria.

216 IBM Optim: Archive User Manual


Global
Global criteria applies to this Archive File.
v To replace global criteria with local criteria, right-click a grid cell for the Archive File
and click Replace Global Selection Criteria.
v To use global selection criteria for this file, right-click a grid cell for the Archive File
and click Use Global Selection Criteria.
v To set all listed Archive Files to global selection criteria, right-click a grid cell for an
Archive File and click Set All → Global in the submenu.
v To define or edit global criteria, click Tools → Apply Global Selection Criteria in the
menu to open the Global Selection Criteria dialog.
v To use no criteria for an Archive File, right-click a grid cell for the Archive File and
click Remove Selection Criteria.
None No selection criteria apply to this Archive File.
v To use no criteria for an Archive File, right-click a grid cell for the Archive File and
click Remove Selection Criteria.
v To use no selection criteria for all listed Archive Files, right-click a grid cell for the
Archive File and click Set All → None in the submenu.
Restore Row Limit
Specify the maximum number of rows (0 to 99999999) to restore. The Restore Process is
terminated if the number of restored rows exceeds this limit.

Note: To set no limit to the number of rows to restore, specify zero (0) or leave blank.
Subset Extract File
When you restore a subset of data, it is extracted from the Archive File and stored in a Subset
Extract File. You must provide a name for the Subset Extract File, unless you select the
Automatically Generate Subset Extract Files at Runtime check box.

Note: When naming a Subset Extract File, you cannot specify a path to the same drive for
removable media on which the Archive File is stored.

Right-click the Archive Files list in the Restore Request Editor to display shortcut menu commands. These
commands help you accomplish many tasks needed to define a Restore Request. In addition to typical
Cut, Copy, Paste , Clear, and Select All commands, you can select commands to:
Remove
Remove an Archive File name from the list.
Remove All Archive Files
Remove all Archive File names from the list.
Add Archive Files
Add Archive File names on the basis of information in the Archive Directory Index or by
browsing the File System.
Replace Archive File
Replace the selected Archive File name with one from the Archive Directory or the File System.
Browse
Browse the original or a modified version of the Access Definition, or the contents of the Archive
File. If the Restore Request has run, you can also browse the Control File generated during the
Insert or Load Process, any Subset Extract File, or the Restore results pertaining specifically to
that Archive File.

Note: When browsing an Access Definition, you can:


v Change the Start Table used to begin the Restore Process.

Chapter 8. Restore 217


v Redefine the Relationship traversal path.
v Create new or modify existing substitution variables to be used to specify local selection
criteria for an Archive File.
v Designate a table as a reference table, or remove the reference table designation for any table.

If you make any changes, the modified Access Definition is saved with the Restore Request,
without modifying the original.
For more information, see the Common Elements Manual .
Apply Local Selection Criteria
Display the Local Selection Criteria dialog. Use this dialog to define, modify, and apply local
selection criteria to the selected Archive File.
Copy Global Selection Criteria
Copy global selection criteria to replace any local selection criteria for the selected Archive File.
You can open the Local Selection Criteria dialog and modify the copied criteria, as necessary. The
criteria applies only to the selected Archive File.
Use Global Selection Criteria
Apply global selection criteria to the selected Archive File.
Remove Selection Criteria
Remove selection criteria for the selected Archive File.
Replace Global Selection Criteria
Copy local selection criteria for the selected Archive File to replace global selection criteria. You
can open the Global Selection Criteria dialog and modify the copied criteria, as necessary. The
criteria is used with all Archive Files to which global selection criteria applies.
Set All
Click Set All → None from the shortcut menu to remove selection criteria settings for all Archive
Files listed in the Restore Request. Click Set All → Local or Set All → Global from the shortcut
menu to apply that setting to all Archive Files listed in the Restore Request. Local selection
criteria must be defined in order to apply.
Clear All Modified ADs
Drop any modified Access Definitions for listed Archive Files.
Create Insert (or Load) Request
Open the Insert Request Editor or Load Request Editor to create an Insert or Load Request with
the Archive File as the Source File. The type of editor that opens depends on the Restore Process
selection in the Restore Request Editor. You can create a new, named request or a local request.
Determine Insert (or Load) Request Selection
Evaluate the compatibility of listed Insert (or Load) Request with the selected Archive File. If a
listed Insert or Load Request contains a set of parameters suitable for the Archive File, the row
containing the request name flashes briefly. If not, a message is displayed.

Insert Requests List (or Load Requests List)

The heading on the Requests list reflects the Restore Process option you select. For example, if Insert is
selected as the Restore Process, the heading is Insert Requests. If Load is the Restore Process, the
heading is Load Requests.

Archived data is restored using the first Insert or Load Request in the list that matches the Archive File.
A match is determined on the basis of criteria provided to the right of the Insert or Load Request name.
You can change the order of the requests by dragging a grid row number to the desired position.

218 IBM Optim: Archive User Manual


Request Name
The Insert or Load Requests that can be used in the Restore Process. If a listed request is stored
in the Directory, the name is displayed. If an Insert or Load Request is saved as part of the
Restore Request, it is listed as (Local).
Using the shortcut menu, you can add an existing, or create and add a new Insert or Load
Request to the list.
v To add an insert request, right-click the Insert Requests grid and click Add Insert Request →
Existing, Add Insert Request → New Local, or Add Insert Request → New Named from the
shortcut menu.
v To add a load request, right-click the Load Requests grid and click Add Load Request →
Existing, Add Load Request → New Local, or Add Load Request → New Named from the
shortcut menu.
v To edit a listed request, rightclick the grid and click Edit Request.
See Chapter 5, “Insert,” on page 113 for information needed to create or edit an Insert Request or
Chapter 6, “Load,” on page 135 for information needed to create or edit a Load Request.

Note: If the Request Selection Mode is Data Model, it might be helpful to use the shortcut
menu from the Archive Files List to create an Insert or Load Request with the selected Archive
File as the Source File.
Criteria
The grid column heading and the criteria used to match an Insert or Load Request with an
Archive File varies according to the selected Request Selection Mode option.
If the Request Selection Mode is Data Model, the heading is:
Description
The data model is the only criteria for this selection mode. The description for each listed
Insert or Load Request is displayed for reference.

If the Request Selection Mode is Date, the headings are:


Start Enter the beginning date in a range of Archive File creation dates.
End Enter the ending date in a range of Archive File creation dates.

Notes:
v If you do not enter a Start or End Date, any date range is valid.
v If you enter a Start Date only, the range includes Archive Files created after the Start Date but
before the current date.
v If you enter an End Date only, the range includes Archive Files created before the End Date.
If the Request Selection Mode is Description, the heading is:
Description
Enter the case-sensitive Archive File Description needed for data to be restored using the
Insert or Load Request.

If the Request Selection Mode is Group, the heading is:


Group Enter the case-sensitive Archive File Group designation needed for data to be restored
using the Insert or Load Request.

Right-click the Requests list in the Restore Request Editor to display shortcut menu commands. These
commands help you accomplish certain tasks needed to define a Restore Request. In addition to typical
Cut, Copy, Paste, Clear, and Select All commands, you can select commands to:

Chapter 8. Restore 219


Remove
Remove an Insert or Load Request from the list.
Remove All
Remove all Insert or Load Requests from the list.
Add Insert Request (or Add Load Request)
Add an Insert or Load Request to the list. Select one of the following commands from the
submenu:
Existing
Open the Select an Insert Request dialog or the Select a Load Request dialog. Use this
dialog to select an existing Request from the Directory and add it to the list.
New Local
Open the Insert Request Editor or the Load Request Editor. Use this dialog to create and
list a new local Request that is saved with the Restore Request.
New Named
Open the Insert Request Editor or the Load Request Editor. Use this dialog to create and
list a new named Request that is saved in the Directory and can be used with other
Restore Requests.
Edit Request
Open the Insert Request Editor or the Load Request Editor to edit the Insert or Load Request
selected from the list.

See Chapter 5, “Insert,” on page 113 for information needed to create or edit an Insert Request, or
Chapter 6, “Load,” on page 135 for information needed to create or edit a Load Request.

Menu Commands

In addition to the standard File, Edit, and Tools commands, you can select the following commands from
the Tools menu.
Apply Global Selection Criteria
Open the Global Selection Criteria dialog and define or edit selection criteria for all files that do
not have local selection criteria. After global selection criteria is defined, the Global Selection
Criteria Defined check box is available and selected. For information about defining global
selection criteria, refer to “Define Search or Selection Criteria” on page 229.
Remove Global Selection Criteria
Delete global selection criteria specifications. The Global Selection Criteria Defined check box is
unavailable and cleared. Clearing the Global Selection Criteria check box has the same effect as
selecting this menu command.

List Archive Files


The Archive Files grid on the Restore Request Editor serves several purposes.

The purposes served by the Archive Files grid include the following:
v For an unplanned Restore Process, the grid can lists Archive Files that contain data to restore.
v To aid you when setting up a Restore Request for an automated Restore Process, it can be useful to list
an Archive File for each data structure to be restored using the Request.
v For an automated Restore Process, the grid must list at least one Archive File, which serves as a
placeholder for files from which data is restored. At runtime, the names of files from which data is
restored are provided as command line overrides, or are obtained using command line search criteria.

220 IBM Optim: Archive User Manual


To list an Archive File, right-click the grid and click Add Archive File(s) → Archive Directory Index or
Add Archive File(s) → File System from the shortcut menu. The option that you select depends upon the
source of information about the Archive File or files to be added to the list. If the desired file is not
registered, or if you can easily identify a file to add to the list, click Add Archive File(s) → File System to
display the Open dialog. Select the Optim Server, if any, on which the file resides and click Refresh to
display a list of Archive Files on the specified server, drive, and Directory.

However, clicking Add Archive File(s) → Archive Directory Index allows you to search the Archive
Directory and locate registered Archive Files. You can also search for Archive Files that contain specific
data.

If the Archive Files grid already contains an archive file and you want to list a different Archive File,
click Replace Archive File → Archive Directory Index or Replace Archive File → File System from the
shortcut menu.

Archive Directory Search


The Archive Directory Search allows you to search the Archive Directory and locate registered Archive
Files. You can also search for Archive Files that contain specific data.

When you select Archive Directory Index, both the Select Archive File(s) and the Archive File Filters
dialogs open, with the Archive File Filters dialog enabled. Use the Archive File Filters dialog to provide
criteria for Archive Files that are candidates for the Archive Files list.

Chapter 8. Restore 221


When the Archive File Filters dialog opens initially, each filter includes default wildcard patterns. (In
other words, File Name, Server Name, Group, Creator, Table Name, and Description each contain a
default wildcard pattern.) To display all Directory entries for Archive Files, you can accept these defaults.
However, to limit the list of Archive Files in the Select Archive File(s) dialog, enter appropriate patterns
and text for one or more filters. You can use the % (percent) symbol and the _ (underscore) as wildcards.
You can also enter a date range to limit the list to Archive Files created within a specific time frame.
Filter entries are profiled and presented the next time you open the Select Archive File(s) dialog.

Note: In an automated Search and Restore process, values for one or more filters can be provided from
the command line to designate Archive Files for Restore processing.

After specifying the appropriate criteria, click OK to close the Archive File Filters dialog and populate the
Select Archive File(s) dialog with information about files that match the Archive File Filters criteria.

222 IBM Optim: Archive User Manual


This list of Archive Files can be refined further by using search criteria or the Archive File Filters at the
bottom of the dialog. See “Search” on page 226 and “Archive File Filters” on page 228 for more
information.

Select Archive File(s) Grid

The grid on the Select Archive File(s) dialog includes:


Status: Archive File
The status of the Archive File for each listed Directory entry, as follows:
(blank) The Archive File is valid and accessible, or the file is stored on removable media (for
example, zip disk, backup device).
Inaccessible
The Archive File is valid, but not available to the workstation or server.
Invalid
The file is not an Archive File, or the Archive File is secured by a File Access Definition
and Archive File Security is not enabled.
Not Found
The Archive File is not found (the Archive File, but not the Directory entry, may have
been deleted, or the file moved to a different drive or Directory).
Offline
The Archive File has been moved to offline storage during hierarchical storage
management (HSM) processing. The Archive File has been replaced by a stub file and is
not immediately available.

Note: The Offline status is set by the HSM software (for example, Symantec VERITAS
Enterprise Vault).

Chapter 8. Restore 223


Status: Search
The status of the most recent search operation since the list has been refreshed. (Clicking Refresh
clears the Search Status.) See “Search” on page 226 for more information about searching listed
Archive Files.
(blank) No search was attempted.
Match A row or rows match the Search criteria.
No Match
No rows match the Search criteria. This status cannot be displayed if the Automatically
Trim Search List check box on the Archive tab in Personal Options is selected.
Indeterminate
A match could not be determined on the basis of information in the Index File. Use the
Resolve or Resolve All shortcut menu command to search the Archive File.
This status cannot be displayed if the Only Use Index to Perform Search check box on
the Archive tab in Personal Options is cleared.
Invalid Index
The Index File is invalid. This status cannot be displayed if the Only Use Index to
Perform Search check box on the Archive tab in Personal Options is cleared.
No Index
An Index File for the Archive File does not exist. This status cannot be displayed if the
Only Use Index to Perform Search check box on the Archive tab in Personal Options is
cleared.
Not Searched
The file was not searched because:
v The file is inaccessible and the search applies to accessible files only. (See information
on the “Shortcut Menu Commands” on page 225.)
v The grid row was excluded during the search. (See information on the “Shortcut Menu
Commands” on page 225.)
v The file is not searchable.
This status cannot be displayed if the Automatically Trim Search List check box on the
Archive tab in Personal Options is selected.
Archive File
The fully qualified name of the Archive File referenced by the listed entry.
Server The server, if any, on which the Archive File resides. If the Archive File was created on a
workstation (Local) is displayed. If the machine name does not match the current machine name,
(Local) is italicized.
Media Type
The type of media on which the Archive File resides.
Fixed The file is stored on a local hard drive.
Network
The file is stored on a network drive.
Removable
The file is stored on removable media (for example, a zip disk).
WORM Device
The file is stored on a WORM device.

Note: If a minimum file retention period is not specified for an Archive File on a WORM
device, the file will have a Fixed or Network Media Type.

224 IBM Optim: Archive User Manual


Backup Device
The type of backup device used during the Archive Process: Centera, Tivoli, NetWorker, or
(None).
Searchable
Indicator that the Archive File or Index File can be accessed.
Secured File
Indicator that the Archive File is secured using a File Access Definition.
Group Group name or information for the Archive File.
Created Date
The date the Archive File was created.
Description
Description for the Archive File.
Created on Machine
The name of the machine or server on which the Archive File was created.

Shortcut Menu Commands

Right-click the grid on the Select Archive File(s) dialog to display shortcut menu commands:
Search
Search for Archive Files that contain specific data. Select a command from the submenu to open
the Index Search Selection Criteria dialog.
All Media
Search all Archive Files listed in the Archive Directory Maintenance dialog.
Direct Access Media
Search only the listed Archive Files stored on a local hard drive, network drive, or a
WORM device.
Removable Media and Backup Devices
Search only the listed Archive Files stored on removable media (for example, a zip disk
or backup device).

Note: The Search command is disabled following a search. Click Refresh to restore the original
list, clear the Search Status, and enable the Search command.
Resolve
Resolve is enabled for a listed Archive File with a status of Indeterminate. Use Resolve to search
the file for data that matches the search parameters.
Resolve All
Resolve All is enabled if one or more listed Archive Files have a status of Indeterminate. Use
Resolve All to search all listed files with this status for data that matches the search parameters.
Trim Search List
Select this option to limit the display to Archive Files that match search criteria or have a status
of Indeterminate. (If the Automatically Trim Search List option in Personal Options is selected,
this menu option is disabled.)
Exclude
Remove the entry from the grid. Excluded entries are indicated by a bold line in the grid.
Show Next
Redisplay the first excluded entry below the selected entry. To redisplay all excluded entries, click
Refresh.

Chapter 8. Restore 225


Show All
Redisplay all excluded entries below the selected entry and above the next visible entry. To
redisplay all excluded entries, click Refresh.
Browse Access Definition
Browse the Access Definition used to create the selected Archive File.
Browse Archive File
Browse the contents of the selected Archive File. (Refer to the Common Elements Manual for
additional information.)

Command Buttons

Command buttons on the Select Archive File(s) dialog allow you to:
Select List the selected Archive File names on the Restore Request Editor and close the Select Archive
File(s) dialog. Any search criteria are transferred to the Restore Request Editor as Local Selection
Criteria. (See “Search.”) To select a single Archive File and close the Select Archive File(s) dialog,
you can doubleclick a file name.
Select All
List all Archive Files on the Restore Request Editor and close the Select Archive File(s) dialog.
Any search criteria are transferred to the Restore Request Editor as Local Selection Criteria.
Refresh
Clear any Archive File Filters in the Select Archive File(s) dialog and display the original list.
Respecify
Return to the Archive File Filters dialog.
Cancel
Return to the Restore Request Editor.

Search
Using Index Search Selection criteria, you can limit the list to Archive Files that contain specific data.

Depending on the type of media that you want to search, click Search → All Media, Search →
NonRemovable Media, or Search → Removable Media to open the Index Search Selection Criteria
dialog.

226 IBM Optim: Archive User Manual


Use the Index Search Selection Criteria dialog to enter column criteria or SQL statements for listed tables.
The criteria are applied to all listed Archive Files, or to listed Archive Files stored on accessible media,
depending on your selection from the Search submenu.

Note: In an automated Search and Restore process, selection criteria can be provided from the command
line to designate Archive Files and select data from them for Restore processing.

Combine all table criteria with

An option unique to the Index Search Selection Criteria dialog allows you to apply criteria specified on
the Index Selection Criteria dialog in one of two ways. Select one of the following:
AND Find each listed Archive File that includes all tables for which criteria are specified with data that
matches the criteria for each table.
OR Find each listed Archive File that includes at least one table for which criteria are specified with
data that matches the criteria for one table.

Criteria entered on the Index Search Selection Criteria dialog apply to files listed on the Select Archive
File(s) dialog, while criteria entered on the Global Selection Criteria or the Local Selection Criteria dialog
apply to files listed on the Restore Request Editor. In other ways, the Index Search Selection Criteria
dialog resembles the Global Selection Criteria dialog and criteria are defined in the same way on the
dialogs. (See “Search and Selection Criteria” on page 228 for more information.)

Chapter 8. Restore 227


Begin the Search

To begin the search, close the Index Search Selection Criteria dialog. The search proceeds as follows:
v If the Only Use Index to Perform Search check box on the Archive tab in Personal Options is cleared,
the Archive Index for each listed file, if one exists, is matched against the criteria. If information in the
Index is not sufficient to satisfy the search, data in each Archive File is searched for possible matches to
the specified criteria.
v If the Only Use Index to Perform Search check box is selected, Archive Indexes are searched for
possible matches to the specified criteria. If Archive Index information is insufficient to establish a full
match (for example, data is indexed but the column for which you provide criteria is not), the Status is
shown as Indeterminate. You can right-click and click Resolve or Resolve All from the shortcut menu
to search the Archive File for data that matches the criteria.

Archive File Filters


You can use Archive File Filters on the Select Archive File(s) dialog to refine the list of Archive Files.

Initially, each filter contains default wildcard patterns. For example, File Name, Server Name, Group,
Creator, Table Name, and Description contain default wildcard patterns. To limit the list of Archive Files
in the Select Archive File(s) dialog, enter appropriate patterns (using the % (percent) symbol and the _
(underscore) as wildcards) and text for one or more filters.

To select from values for all listed files, click the arrow in a filter box. If desired, you can edit a selected
value. You can also enter a date range to limit the list to Archive Files created within a specific time
frame. After specifying the appropriate filters, click one of the following command buttons to proceed:
Select Matching
Apply the specified Archive File Filters to the list in the Select Archive File(s) dialog, add
matching Archive Files to the list in the Restore Request Editor, and close the Select Archive
File(s) dialog.
Display
Apply the Archive File Filters to the list in the Select Archive File(s) dialog. To redisplay the
original list, click Refresh.

Filtering Listed Archive Files


You can filter the Archive Files listed in the Archive Directory Maintenance dialog.

To filter listed Archive Files:


1. On the Archive Directory Maintenance dialog, select a parameter for one or more Archive File Filters
(e.g., Server Name).
2. Click Display to limit the list of Archive File entries to those that match the specified parameters.
3. To redisplay the original list of Archive File entries clearing any Archive File Filters specified on the
Archive Directory Maintenance dialog, click the Refresh button.
4. To open the Archive File Filters dialog allowing you to refetch additional Archive File entries, click
the Respecify button.

Search and Selection Criteria


You can use criteria to search for and identify Archive Files that contain specific data. You can also use
the same or similar criteria to select and restore a subset of data from an Archive File (that is, selection
criteria).

Two types of selection criteria can be used in a Restore Process:


Global
Global selection criteria is defined as part of the Restore Request, and can be selectively applied

228 IBM Optim: Archive User Manual


to any Archive File listed in the Restore Request. In other words, you can define global selection
criteria once and use the shortcut menu to apply it to selected Archive Files or to all Archive Files
listed in the Restore Request Editor.

Note: Any search criteria specified in an automated Search and Restore process overrides Global
selection criteria in the Restore Request and is applied to all processed files.
Local Local selection criteria is specific to a single Archive File. You can define and apply local selection
criteria to any Archive File listed in the Restore Request. You can also use substitution variables
referenced in the current Access Definition and Point and Shoot to select specific Start Table rows
from an Archive File.

Note: Any search criteria used to select an Archive File for the Restore Process is copied to the
Restore Request as local selection criteria. Local selection criteria has no effect in an automated
Search and Restore process.

When running the Restore Process from the graphical user interface, you can use shortcut menu
commands to apply local or global selection criteria to any Archive File listed in the Restore Request. You
can also copy global selection criteria and apply it as local, modifying or adding to the copied criteria, as
necessary. See “Archive Files List” on page 215 for the Archive File(s) List.

Note: Any Restore Request settings to apply criteria to listed files are disabled in an automated Restore
Process for which Archive File overrides are provided, or in an automated Search and Restore process.

Define Search or Selection Criteria


Search or global selection criteria can be applied to several Archive Files, even if the data models are not
exactly the same.

Use the Index Search Selection Criteria dialog to define search criteria for any table in any Archive File
listed in the Select Archive File(s) dialog. Use the Global Selection Criteria dialog to define selection
criteria for any table in any Archive File processed using the Restore Request.

The tabs on the Index Search Selection Criteria dialog and the Global Selection Criteria dialog are alike
and the methods used to define search criteria are the same as those used to define global selection
criteria. Although the following discussion concerns the Global Selection Criteria dialog, the information
also applies to the Index Search Selection Criteria dialog as well as to the Column Criteria and SQL tabs
on the Local Selection Criteria dialog.

Chapter 8. Restore 229


Table

Click the down arrow to select from an alphabetical list of all tables in all Archive Files referenced by the
Restore Request or, when defining search criteria, the Select Archive File(s) dialog.

Tabs

The dialog has two tabs. Use the Column Criteria tab to define selection criteria for any column in the
selected table, or the SQL tab to define an SQL WHERE clause for the table.

Note: If you define both column criteria and an SQL WHERE clause for a table, the specifications are
logically ANDed.

Column Criteria Tab


Use the Column Criteria tab to specify criteria for one or more columns in the selected table.

Combine all column criteria with

Option for combining criteria for multiple columns. Select:


AND A row must match selection criteria for all columns.
For example: CUSTNAME > 'M' AND STATE = 'NJ'
OR A row must match selection criteria for any column.

230 IBM Optim: Archive User Manual


For example: CUSTNAME > 'M' OR STATE = 'NJ'

Column Name

Name of each column. For convenience, you can rearrange the order in which the columns are displayed
by dragging the grid row number. You cannot modify column names.

Since the data model of the production database may change over time, two or more versions of a table
may be represented in listed Archive Files. For example, the ORDERS table in a recent Archive File may
include a column, ORDER_SALESMAN that is not present in earlier files. Thus, a superset of column
names from all versions of the selected table is displayed in the dialog.

Column Criteria

To enter selection criteria for a column, click the Operator grid cell and select an operator from the list.
Enter a value in the Selection Criteria cell. The data types of values for selection criteria must be
appropriate for the column and conform to SQL syntax. Any variables must be defined in the current
Access Definition.

Notes:
v You must use these formats when specifying date/time selection criteria:
– Date ‘YYYY-MM-DD'
– Time ‘HH:MM:SS'
– Timestamp ‘YYYY-MM-DD HH:MM:SS.FFF[FFF]'
v Note that the following separators are valid: colon (:), space ( ), slash (/), minus (-).
v You cannot use variables on the Global Selection Criteria or Index Search Selection Criteria dialog.
v The variable delimiter in a Restore Process is a colon (:) and cannot be modified.

To validate selection criteria, click outside the grid row. If the criteria is invalid, a message is displayed.

SQL Tab
For selection criteria that is more complex than can be defined on the Column Criteria tab of the Global
Selection Criteria dialog, use the SQL tab of the Global Selection Criteria dialog to create an SQL WHERE
clause.

For example, to select the desired rows from a table, you may need a combination of AND and OR
logical operators.

Note: For details on rules that apply to SQL statements used internally by Archive, refer to Appendix A,
“SQL Grammar for Search and Restore,” on page 387.

Chapter 8. Restore 231


SELECT. . . FROM (table) WHERE

Enter the SQL WHERE clause of the SELECT statement.


v To create an SQL WHERE clause, type directly into the SELECT text box or select column names and
operators from the lists.
v To delete an SQL WHERE clause, right-click the SELECT text box and select Remove SQL. You may
also overtype with blanks, or use the Delete or Backspace key.
v To validate an SQL WHERE clause, right-click the SELECT text box and select Validate SQL, or click
outside the text box. If the statement is invalid, a message is displayed.

Columns

A list of the columns in the table. Select a column name to add it to the SQL WHERE clause, positioned
ahead of the cursor.

Since the data model of the production database may change over time, two or more versions of a table
may be represented in listed Archive Files. For example, the ORDERS table in a recent Archive File may
include a column, ORDER_SALESMAN that is not present in earlier files. Thus, a superset of column
names from all versions of the selected table is displayed in the dialog.

232 IBM Optim: Archive User Manual


Operators

A list of valid operators and symbols you can use in the SQL WHERE clause. Select an operator to insert
it before the cursor position.

Define Local Selection Criteria


You can define local selection criteria for any Archive File listed in the Restore Request Editor. Local
selection criteria apply to a specific Archive File only and are typically used in a unplanned Restore
Process that is run from the graphical user interface.

To define local selection criteria, right-click an Archive File name in the Restore Request Editor and click
Apply Local Selection Criteria in the shortcut menu. The Local Selection Criteria dialog is displayed.

The selected Archive File name and a list of tables in the file are displayed at the top of the Local
Selection Criteria dialog. In many respects, the Local Selection Criteria dialog is like the Index Search
Selection Criteria and Global Selection Criteria dialogs – the Column Criteria and SQL tabs on the three
dialogs are exactly the same. For information about defining selection criteria or an SQL WHERE clause,
refer to “Define Search or Selection Criteria” on page 229.

Chapter 8. Restore 233


Variables

One of the main differences between the Local Selection Criteria and Global Selection Criteria dialogs is
that the Local Selection Criteria dialog allows you to include variables on the Column Criteria and SQL
tabs.

You can use the substitution variables specified in the current Access Definition for the Archive File. You
can add, modify, or delete substitution variables for the current Archive File by browsing the Access
Definition from the Restore Request Editor.

Note: On the Local Selection Criteria dialog, the Variable Delimiter is always a colon (:), and cannot be
modified.

For more information about using variables, see the Common Elements Manual .

Point and Shoot

The Local Selection Criteria dialog includes a third tab, the Point and Shoot tab, which is not on the
Index Search Selection Criteria or Global Selection Criteria dialog.

A Point and Shoot list consists of primary key values, in ASCII format, that are used as criteria to select
Start Table rows. For a selective restore from the graphical user interface, it may be easiest or most
convenient to select rows from the Start Table rather than to devise selection criteria or an SQL WHERE
clause.

Use the Point and Shoot tab to select Point and Shoot options and browse, edit, or create a
Point-and-Shoot list.

234 IBM Optim: Archive User Manual


Start Table

Name of the table designated as the Start Table in the original or a modified version of the Access
Definition used to create the Archive File. To change the Start Table for the Restore Process, click Browse
→ Access Definition → Original from the Archive File List to open the Access Definition Editor. If the
Access Definition has been modified, click Browse → Access Definition → Modified from the Archive File
List to open the Access Definition Editor.

File Options
None A Point and Shoot list is not used.
Local A Point and Shoot list for the Archive File is stored with the Restore Request. A Local list is unavailable to
other Archive Files, process requests, or Access Definitions. However, you can save a Local Point and Shoot
list as a named Point and Shoot list.
File The Point and Shoot list is named and saved as a file that can be referenced for use with other Archive Files,
Access Definitions, and process requests, and shared with other users. A Point and Shoot file is stored in the
directory you specify. To use an existing file or to create a new, named Point and Shoot file, select File, and
type the file name.

Click Tools → Edit Point and Shoot from the menu to display the Point and Shoot Editor. Start Table
rows that satisfy any selection criteria for the table are displayed. You can use the Point and Shoot Editor
to select individual rows from the Archive File for restoration.

Chapter 8. Restore 235


Primary Keys

The Start Table must have a primary key for Point and Shoot to function. The process uses primary key
values to identify Start Table rows to be restored. The primary key values of the selected rows are saved
in the Point and Shoot list.

Processing

The following considerations apply to Restore processing using Point and Shoot lists:
v If you specify selection criteria, an SQL WHERE clause, or both, and use a Point and Shoot list, the
criteria is logically ORed with the Point and Shoot selection to select data for restoration.
v You can join other tables to the display for reference, but you can select rows from the Start Table only.
v Archive Files on secondary media must be copied to a pre-defined disk location, which may delay
processing and consume memory.

Point and Shoot Editor


The Point and Shoot Editor displays data from the Start Table in a browse window. A toolbar in the
browse window allows you to select display options and menu choices that pertain to the display.

Selected Rows

Number of selected Start Table rows to include in the Point and Shoot list.

236 IBM Optim: Archive User Manual


Rows Not Found

Number of rows in the Point and Shoot list that are not listed on the grid. A number greater than zero
may indicate that the Default Qualifier has changed since the Point and Shoot list was created or that the
Point and Shoot list includes rows that do not match current selection criteria.

Browse Window

The first browse window in the Point and Shoot Editor displays the Start Table rows. A grid column
labeled Select provides a check box for each row. Select the check box to include the row in the Point and
Shoot list. Clear the check box to retract a selection.

Joining tables is useful for inspecting segments of related data to ensure that the appropriate sets of data
are selected for restoration. You can join and display rows from related tables, using the Join button on
the toolbar. Rows from each joined table are displayed in a separate browse window in the dialog.

In each browse window, data can be navigated and customized using the Find, Exclude, Include, Hide,
and Lock options available from the grid heading shortcut menu. (See the Common Elements Manual for
additional information.)

A browse window has the following components:


Table The name of the table shown in the browse window. The first browse window in the Point and
Shoot Editor always displays the Start Table.
Format

or
Click the Format button to switch the data display between columnar and side label format. The
default format is set in Personal Options.
In columnar format, the column names are displayed across the top of the grid and the data is
displayed beneath the headings. Note that the headings for primary key column(s) are in bold
typeface.

Note: The Select grid column, with check boxes for selecting rows for the Point and Shoot list, is
available in columnar format only.
Options

Click the Options button to display the Options menu.


Display Attributes
Switch between displaying and hiding column attribute information in the column
headings.
Select All Rows
Select all rows in the browse window.
Invert All Row Selections
Reverse selected and unselected rows.
Deselect All Rows
Clear all previously selected rows.

Chapter 8. Restore 237


Show Excluded Rows
Display all previously excluded rows (rows excluded using the Exclude command on the
shortcut menu). To display excluded rows individually, right-click a row and click Show
Next in the shortcut menu.

Display Multiple Tables (Join Tables)

In many cases, a table is related to two or more tables, creating different paths for joining and browsing
the data. Thus, you can join more than one related table to a table. When several tables are joined to a
table, the joined tables are "stacked" in a single edit window, in the order in which they were joined, with
the most recently joined table displayed and the other tables in the stack hidden. You can display any
table in the stack and join other related tables to any table in the stack.

Note: Only Start Table rows can be selected for a Point and Shoot list.

Only one relationship can be used in a join.


v If a relationship between the tables exists, the table is joined automatically and related rows displayed
in a new browse window.
v If a relationship does not exist, the Create a New Relationship dialog opens.
v If more than one relationship exists, the Select a Relationship dialog, listing the relationships, opens.
You must select the relationship to use.

In a stack, the name of the displayed table appears in a drop-down list in the browse window. Click the
arrow to display the list of tables in the stack. Select a table name from the list to display that table in the
browse window.

238 IBM Optim: Archive User Manual


When a stacked table is displayed, all subordinate joined tables are also displayed. When a stacked table
is hidden, all subordinate joined tables are also hidden.

Process a Restore Request


A Restore Request is run in several steps. The steps differ slightly if you schedule the Restore Process to
run later, rather than run the Restore Process immediately.

Match Each Archive File to an Insert or Load Request


A Restore Process uses either the Insert or Load Process to restore data. One or more Insert or Load
Requests are listed on the bottom section of the Restore Request Editor, so that a single Restore Request
can be used to process multiple Archive Files.

At run time, each Archive File is matched with the first Insert or Load Request that meets the specified
criteria specified by the Insert or Load Request Selection Mode.

If a match is not found, an error occurs and the processing of the Restore Request stops.

Note: Regardless of the Request Selection Mode, data can only be restored if the Archive File can be
processed as the Source File of the Table Map for the Insert or Load Request.

Create Subset Extract Files


When you selectively restore data from an Archive File, the data to be restored is copied to a Subset
Extract File. Data in this file is then restored to the selected database.

The Restore Process creates all Subset Extract Files before any data is restored.

Validate the Access Definition

First Archive validates the specifications in the modified Access Definition. If the Access Definition is
valid, processing continues. If the Access Definition is invalid, processing proceeds as follows.
v If the Restore Process is scheduled, the Stop on Error parameter on the Steps tab of the Job Details
dialog determines whether processing continues.
v If the Restore Process is run immediately, Archive displays an error message and processing stops.

Locate the Extract File

Archive locates the Extract File. If the file does not exist, Archive creates it. If the Extract File does exist,
processing proceeds as follows:
v If the Extract Process is scheduled, processing continues, the file is overwritten.
v If the Extract Process is run immediately, a Personal Options setting determines whether you are
prompted to confirm that the data in the file is to be overwritten.

Validate Variable Value

Archive checks whether variables are defined in the modified Access Definition, and if so, verifies that
valid values are provided for each variable.
v If valid values are provided, processing continues.
v If invalid values are provided, processing stops and errors are recorded on the Restore Process Report.
v If values are missing, processing proceeds as follows:
– If the Restore Process is scheduled, processing stops and errors are recorded on the Restore Process
Report.

Chapter 8. Restore 239


– If the Restore Process is run immediately, the Archive File Variable Values dialog is displayed. Enter
values for variables as required, to continue processing.

Validate Point and Shoot

If a Point and Shoot list is specified, Archive verifies that the rows are valid.
v If the rows in the Point and Shoot list are valid, processing continues.
v If a Point and Shoot list file is specified and cannot be found, processing stops.
v If the rows in a Point and Shoot list are invalid, missing, or if primary key values in the file do not
exist in the Start Table, processing proceeds as follows:
– If the Restore Process is scheduled, the Stop on Error parameter you specified on the Steps tab of
the Job Details dialog determines whether processing continues.
– If the Restore Process is run immediately, you are prompted to specify how to proceed. You can
select to continue processing the Restore without using the Point and Shoot list, or select to cancel
the Restore.

Load or Insert Data


Once any necessary Subset Extract Files are created, the selected data from each Archive File, starting
with the first, in the Restore Request Editor is restored using the matching Insert or Load Request.
v Before rows are inserted or updated, the Restore Process checks to make sure that the total number of
rows to be restored from an Archive File does not exceed the specified Restore Row Limit.
v Then, each Insert or Load Request is verified. If warning conditions exist, you can review the
parameters in the Warnings dialog, and choose to continue or cancel processing.
v During processing, if an error occurs, processing stops.

For more information about the Insert or Load Process, see Chapter 5, “Insert,” on page 113 or Chapter 6,
“Load,” on page 135.

Run a Restore Request from the Command Line


After you create a Restore Request, you can use the command line interface to run the process, specifying
criteria for Archive Files to use as overrides for files listed in the Restore Request. The Insert or Load
Request referenced in the Restore Request that matches an Archive File is then used to restore the
selected data.

See Chapter 12, “Command Line Interface — Processing Utilities,” on page 327 for more information.

Schedule a Restore Request


To schedule a Restore Process to run once at a specified future time or repeatedly at specified intervals,
save the Restore Request, and click File → Schedule from the menu.

Refer to the Common Elements Manual for more information.


v Processing is initiated at the scheduled time; you do not monitor the process as it is performed.
v If warning conditions exist, processing continues without prompting, depending on the Stop on Error
parameter you specified on the Steps tab of the Scheduling Job dialog.
v If an error occurs, processing stops.

Run a Restore Request Immediately


To process a Restore Request immediately, click File → Run. It is not necessary to save a Restore Request
before it is run.
v Before processing begins, the request is verified. If warning conditions exist, you can review the
reasons in the Warnings dialog, and choose to continue or cancel processing.

240 IBM Optim: Archive User Manual


v During processing, if an error occurs, processing stops.

A progress dialog and status messages provide information while a request is processing. When
processing completes, or stops because of an error, you can review the details in the Restore Process
Report.

Restore Request Progress Dialog


When the Restore Process begins, the Restore Request Progress dialog displays current status information.
The Restore Request Progress dialog also displays specific information pertaining to the selected Restore
Process, Insert or Load.

Note: The Cascading Delete/Update Confirmation dialog might be displayed during Restore processing,
depending on conditions for the Insert or Load Process used to restore data. (Refer to “Process an Insert
Request” on page 130 or “Process a Load Request” on page 183 for information about these conditions.)
Click OK to continue processing the Restore Request, or click Cancel to stop processing and return to the
Restore Request Editor.

Restore Process Summary


Row Selection
Status of subset Extract Process, when restoring a selected subset of data from an Archive File.
The status is shown as None (no subset extract), Pending, Active, or Complete.
Restore Process
Status of the Restore Process (Pending, Active, or Complete).
Files to Process
The number of files remaining to be processed.
Files Processed
The number of files that have been processed.
Current File
The name of the Subset Extract File or Archive File currently being processed.

Row Selection

The Row Selection label changes to Selecting Rows, when active.


Copy Objects
The status of object selection as Active or Pending.
Rows Selected
Current number of rows selected from the table.

Insert Process
The Insert Process label changes to Inserting Rows, when active.

Information for an Insert Process is displayed, as follows:

Chapter 8. Restore 241


Totals
Rows to be processed
Number of rows in the Archive File to be processed.
Failed Rows
Number of rows from all tables that have errors.
Rows Inserted
Number of rows that were inserted.
Rows Updated
Number of rows that were updated.

Current Table
Failed Rows
Number of rows in the current table that could not be inserted and were discarded.
Rows Inserted
Number of rows inserted in the table.
Rows Updated
Number of rows updated in the table.

The totals in the Restore Request Progress dialog are revised after a number of rows (specified on the
Actions tab in Personal Options) are processed for each table, and when one table is completed and the
process begins for the next table. (Refer to the Common Elements Manual for details.)

242 IBM Optim: Archive User Manual


Load Process
The Load Process label changes to Loading Rows, when active.

Information for a Load Process is displayed on the Restore Request Progress dialog, as follows:

Totals
Rows to be Processed
Number of rows in the Archive File to be processed.
Failed Rows
Number of rows from all tables that have errors.
Rows Converted
Number of rows converted to the DBMS Load format.

Current Table
Failed Rows
Number of rows in the current table that could not be inserted and were discarded.
Rows Converted
Number of rows converted in the current table.
Chapter 8. Restore 243
Grid Details
DB Alias
The DB Aliases involved in the Restore Process.
Status Status of the Load Process for each DB Alias.

Cancel Process
To stop the Restore Process, click Cancel Process. A confirmation dialog opens. Click Yes to stop the
process and return to the Restore Request Editor, or click No to continue processing.

Status Bar
The Status Bar at the bottom of the dialog displays the name of the table being processed or a description
of the action being performed.

Restore Process Report


The Restore Process generates a Restore Process Report that provides general information and statistics
about the Restore Process.

The following is a sample:

244 IBM Optim: Archive User Manual


Chapter 8. Restore 245
The Restore Process Report displays the following information:
v Name of the Restore Request (or Untitled if you did not save the request).
v User ID of the user requesting the Restore Process.
v Date and time the Restore Process started.
v Date and time the Restore Process completed.
v Elapsed time for the Restore Process to complete.
v Process Status that lists any errors or warnings that occur during processing.

Process Summary

Summarizes the number of Archive Files processed, the number of Subset Extract Files created, and the
number of files successfully restored.

File Details

Displays the status, number of errors and warnings, and the name of each Archive File processed in the
Restore Request. Summarizes the number of Archive Files processed, the number of Subset Extract Files
created, and the number of files restored.

Possible status messages are:


Restore Complete
The Restore Process for the Archive File (Insert or Load) has completed without errors.
Restore Failed
The Restore Process for the Archive File (Insert or Load) encountered an error.
Row Selection Complete
The Subset Extract File was successfully completed. The Restore Process was not attempted.
(Prior Restore errors could cause this condition.)
Row Selection Failed
The Subset Extract File was not created due to errors encountered.
Aborted
The Restore Process (Insert/Load) was cancelled by the user.

Row Selection Process


The Row Selection Process section of the Restore Process Report contains information on each Subset
Extract File that was created.

The details included in the Row Selection Process section include the following:
v Name of the Server.
v Name of the Archive File.
v Name of the generated Subset Extract File.
v User IDs of the user.
v Date and time the subset Extract Process started.
v Date and time the subset Extract Process completed.
v The elapsed time.
v Process status that lists any errors or warnings that occur during processing.

Process Summary

Statistics are provided for the data copied to the Subset Extract File during the subset Extract Process:
v Number of Tables Processed.

246 IBM Optim: Archive User Manual


v Number of Rows Extracted.
v Number of Rows with Errors.
v Number of First Pass Table Rows.

Row Details

Statistics are provided for the rows copied to the Subset Extract File from each table in the Archive File:
v Number of rows extracted from each table.
v Number of failed rows for each table.
v Names of tables used in the subset Extract Process. The tables are listed in the same order as in the
Access Definition.

Insert (or Load) Process


The Insert Process (or Load Process) section of the Restore Process Report contains information on each
Insert or Load Process that was performed during the Restore Process.

The information in this section includes the following:


v Name of the Request (or Untitled if you did not save the request).
v Name of the Server.
v Name of the Source File.
v Name of the generated Control File.
v Name of the Table Map (or Local).
v The Restore Row Limit (or None if no row limit was specified).
v Indicator (Skipped or Processed) for processing file attachments.
v User IDs of the user.
v Date and time the process started.
v Date and time the process completed.
v The elapsed time.
v Indicator that the Control File was retained or deleted.
v Process status that lists any errors or warnings that occur during processing.

Process Summary

Statistics for the data restored are provided:


v Total number of Tables Processed.
v Total number of Rows Restored.
v Total number of Rows with Errors.
v Total number of Rows Skipped (a row may be skipped as the result of the On Error Option selected for
an Archive Action).
v Subset Extract File status (retained or deleted).

Row Details

Information is provided for each table:


v Number of rows inserted.
v Number of rows updated.
v Number of failed rows.
v Number of rows skipped.
v Names of tables used in the Restore Process.

Chapter 8. Restore 247


Errors

If any errors occur during processing, a list of the errors is provided. Review the list of errors that caused
processing to stop. For example, an internal error condition exists when the process exceeds the discard
row limit or if you are not authorized to access a particular database table.

Save the Report


To save the report to a file, click File → Save As to open the Windows Save dialog.

Print the Report


To print the report, click File → Print to open the Windows Print dialog.

Redisplay the Report


If you need to refer to the report after closing it, click File → Redisplay Results → Current to redisplay the
report from the last Restore Process run, or click File → Redisplay Results → All to display a list of all
retained Restore Process Reports.

For details about retaining process reports, see the Common Elements Manual .

Note: Once the Restore Process is complete, you can also review an abridged version of the process
report focusing on a specific Archive File. In the Restore Request Editor, right-click an Archive File name
and then click Browse → Results.

248 IBM Optim: Archive User Manual


Chapter 9. Archive Maintenance Utilities
To access archived data, you must be able to find it. By organizing Archive Files using purposeful
conventions and implementing well-conceived indexing, you lay the groundwork for efficient searches of
archived data.

Together, Archive Directory entries and Archive Indexes support your ability to search or restore Archive
Files. You can also use Directory entries to create an Archive File Collection, which allows you to logically
union the entries as a single data source for access with Open Data Manager (ODM).

An Archive Directory entry indicates the database tables from which the data was archived, the date the
data was archived, the Optim Server on which the Archive File resides, and the name of any associated
Archive Index File or Storage Profile. The Directory entry includes a globally unique identifier (GUID) for
the Archive File that is generated in the Archive Process and also identifies each Archive File by Name,
Group, and Description.

Archive Directory entries are rows in a database table and can be searched very quickly, in order to
identify Archive Files that are candidates for further processing. Archive Index Files are also stored on
disk and can be searched for specific data more readily and efficiently than Archive Files—especially very
large Archive Files or Archive Files stored on secondary media (for example, tape). Each table in an
Archive File can have as many as 16 indexes in the Archive Index File. Thus, the combination of Archive
Directory information with well-conceived Archive Indexes provides powerful support for automated or
manual searches of Archive Files, regardless of the media on which the Archive Files are stored.

Maintenance and Change Management

Over time, your applications may evolve and your searches for archived data change. In other words, it
is likely that your requirements for accessing archived data will change. For example, Archive Indexes
that were adequate to locate archived inventory data by part number in 2010 will not be of much help in
2016 if you discover an unanticipated need to restore data for a particular vendor. Also, your storage
configuration may change or you may move Archive Files or Archive Indexes from one location or Optim
Server to another. If so, you must update or create a new Archive Directory Entry. In addition to the
general utilities described in the Common Elements Manual, Archive provides maintenance utilities to help
you manage these changes and maintain Archive Directory Entries and Archive Indexes.

Archive Directory Maintenance Utility

Use the Archive Directory Maintenance Utility to:


v Update Group and Description information in the Archive Entry for an Archive File to match current
needs or update the location of the corresponding Archive Index File.
v Delete Archive Entries, Archive Files, or both when the files have outlived their usefulness or have
been exported to another location.
v Add or change Archive Indexes for a single Archive File.

Archive Registration Utility

Use the Archive Registration Utility to create new Archive Entries for Archive Files imported from a
different location or for which the entry has been removed. For example, Archive Files that are imported
from off-site locations, or from another Optim Server, must be registered.

© Copyright IBM Corp. 1994, 2010 249


Archive Index Maintenance Utility

Use the Archive Index Utility to analyze, update, delete, or add indexes for a group of Archive Files in
one operation.

Archive File Collection Editor

Use the Archive File Collection Editor to create an Archive File Collection and add Archive Files to a
collection.

Section Contents

This section explains how to maintain the Archive Directory, add entries to the Archive Directory using
the Archive Registration Utility, create Archive Indexes using the Archive Index Maintenance Utility, and
create Archive File Collections.

Archive Directory Maintenance


Use the Archive Directory Maintenance dialog to organize Archive Files and manage Archive Directory
entries.

Click Utilities → Archive → Directory Maintenance in the menu on the main window. The Archive
Directory Maintenance dialog and the Archive File Filters dialog open at the same time.

Enter criteria on the Archive File Filters dialog to display a limited selection of Archive Directory entries
or, to display all Archive File entries in the Directory, accept the wildcard entered by default for each
filter.

You can enter specific file names, Optim Server names, groups, creators, table names, or descriptions,
using the % (percent) symbol and the _ (underscore) as wildcards. You can also enter a range of dates to
limit the list to entries for Archive Files created within a specific time frame.

Click OK to display the Archive Directory Maintenance dialog.

250 IBM Optim: Archive User Manual


The Archive Directory Maintenance dialog lists the Archive Directory entries for files that match the
criteria you specified in the Archive File Filters dialog. You can refine the list further using additional
Archive File Filters at the bottom of the dialog.

You can also use the list to export security information for secured Archive Files, which are indicated by
Secured File. The exported security information allows you to register secured Archive Files in other
Archive Directories. To export security information, right-click the entry, and click Export Security
Information in the shortcut menu. For more information about exporting security information, see
“Export Security Information” on page 255.

By default, all file data is searched if a match cannot be determined from Archive Index Files. To direct
Archive to search Archive Index Files only, you must select the Only Use Index to Perform Search check
box on the Archive tab in Personal Options. For details, refer to the Common Elements Manual .

Grid Details
The grid on the Archive Directory Maintenance dialog contains the following details.
Status: Archive File
The status of each Archive File listed, as follows:
(blank) The Archive File is valid and accessible, or the file is stored on removable media (for
example, zip disk, backup device).
Inaccessible
The Archive File may be valid but is not available to the workstation (that is, the server
where the file exists cannot be contacted or the file is in use by another user or process).
Invalid
The file is not an Archive File, or the Archive File is secured by a File Access Definition
and Archive File Security is not enabled.

Chapter 9. Archive Maintenance Utilities 251


Not Found
The Archive File is not found (file may have been deleted, or moved to a different drive
or directory).
Offline
The Archive File has been moved to offline storage during hierarchical storage
management (HSM) processing. The Archive File has been replaced by a stub file and is
not immediately available.

Note: The Offline status is set by the HSM software (for example, VERITAS Enterprise
Vault).
Status: Search
The status of the last search operation, as follows:
(blank) No search was attempted.
Match At least one row matches the criteria.
No Match
No rows match criteria.
Indeterminate
In an Index File search, a match could not be determined.
Invalid Index
For an Index File search, the Index File is invalid.
No Index
For an Index File search, the Index File does not exist.
Not Searched
The file was not searched for one of the following reasons:
v User request for search on accessible files only.
v Row was excluded during search.
v File is not searchable.
Restricted Access
The Archive File is secured by a File Access Definition that restricts access to the file for
one of the following reasons:
v The user is denied access to the table or a column in the table specified in the criteria.
v The associated File Access Definition may not exist.
Archive File
The fully qualified name or Universal Naming Convention (UNC) name of each Archive File
represented in the Directory Index.
Server The server, if any, on which the Archive File resides.
Media Type
The type of media on which the Archive File resides.
Fixed The file is stored on a local hard drive.
Network
The file is stored on a network drive.
Removable
The file is stored on removable media (for example, Zip disk).
WORM Device
The file is stored on a WORM device.

252 IBM Optim: Archive User Manual


Note: If a minimum retention period is not specified for a file on a WORM device, the
file will have a Fixed or Network Media Type.
Backup Device
The type of backup device used during the Archive Process: Centera, Tivoli, NetWorker, or
(None).
Searchable
The check box is selected if an entry is searchable (the Archive File or Index File is accessible).
Secured File
The check box is selected if the Archive File is secured using a File Access Definition.
Group Group information for the Archive File.
Created By
User ID of the person who created the Archive File.
Created Date
Date the Archive File was created.
Description
Description information for the Archive File.
Created on Machine
The machine on which the Archive File was created.

Note: If created on a local server but the machine name does not match the current machine
name, local is italicized.

Archive Directory Maintenance Shortcut Menu Commands


Right-click the grid on the Archive Directory Maintenance dialog to display shortcut menu commands.

Search
Index search selection criteria allow you to find and list Archive Files that contain data that match the
specified criteria.

Chapter 9. Archive Maintenance Utilities 253


Select Search and one of the following commands to display the Index Search Selection Criteria dialog:
All Media
Search all Archive Files listed in the Archive Directory Maintenance dialog.
Direct Access Media
Search only the listed Archive Files stored on a local hard drive, network drive, or a WORM
Device.
Removable Media and Backup Devices
Search only the listed Archive Files stored on removable media (for example, zip disk, backup
device).

Note: To perform another search, you must refresh the list.

Resolve
If a match for the criteria is not found in the Archive Index information for the Archive File, the Status is
shown as Indeterminate, No Index, or Invalid Index.

Right-click the name of an Archive File and click Resolve in the shortcut menu to search the Archive File
for data that matches the criteria.

Resolve All
If a match for the criteria is not found in the Archive Index information for the Archive File, the Status is
shown as Indeterminate, No Index, or Invalid Index.

Right-click and click Resolve All → Direct Access Media or Resolve All → Removable Media and Backup
Devices in the shortcut menu to search Archive Files on the selected media type(s) for matches to the
search criteria.

Trim Search List


Remove the names of Archive Files with a Status of No Match or Not Searched from the list.

Note: If the Automatically Trim Search List option in Personal Options is selected, this menu option is
unavailable.

Exclude
Remove the file from the list. Excluded rows are indicated by a bold line in the grid.

Show Next
Return one previously excluded file to the list. The first excluded row beneath the row you right-click
returns to the list. To display all excluded rows, click Refresh.

Show All
Return all excluded rows between the row you right-click and the next visible row. To display all
excluded rows, click Refresh.

Index Specifications
Display the Index Maintenance dialog, to view, edit, or create Archive Indexes for the specified Archive
File.

For information about using the Index Maintenance dialog, refer to “Archive Index Maintenance” on
page 272.

Update Directory Entry


Display the Archive Directory Entry Information dialog to update the Archive Directory entry for the
Archive File.

254 IBM Optim: Archive User Manual


Delete
Delete the selected Archive Directory entry or both the Archive File and Archive Directory Entry.

Notes:
v If the Archive File is on Centera storage and the minimum retention period has expired, the Delete
command automatically deletes the Centera copy. If the minimum retention period has not expired,
you are prompted to confirm or cancel the deletion of the Directory Entry. If you choose to delete the
Directory Entry, the Archive File on Centera storage is orphaned and you can no longer retrieve the
file.
v If Litigation Hold is set for an Archive File, you cannot delete the Archive File or Directory entry.
(See“Litigation Hold” for information on this feature.)

Delete all Entries with


Delete all Archive Directory entries with a specific status.

Click one of the following in the Delete all Entries with submenu:
Not Found
Delete all Archive Directory entries for which the Status:Archive File is Not Found.
Invalid
Delete all Archive Directory entries for which the Status:Archive File is Invalid.
Both Delete all Archive Directory entries for which the Status:Archive File is either Not Found or
Invalid.

Browse Access Definition


Browse the contents of the Access Definition used to create the selected Archive File.

Browse Archive File


Browse the contents of the selected Archive File.

Export Security Information


Open the Export Archive File Security dialog to export security information for a secured Archive File
into a Security File. This shortcut command is available for a secured Archive File only.

Recall Complete File


Recalls an Archive File saved to a Centera Server. The file is recalled to the path specified in the Storage
Profile used to create the Archive File. You can access this Archive File as needed. (The original Archive
File saved to the Centera Server remains intact.)

Notes:
v This shortcut command is available only if the Archive File has been backed up to the Centera Server.
v If you do not use the Recall Complete File command, Archive Files stored on Centera are recalled in 2
MB quantities of data, as needed.

Litigation Hold
Turns Litigation Hold on or off for an Archive File stored on a Hitachi Content Archive Platform (HCAP)
WORM device or a Centera backup device.

Click one of the following in the Litigation Hold submenu:


Set Turns Litigation Hold on. Prevents the Archive File from being deleted from storage, regardless of
the file retention setting in the associated Storage Profile.
Remove
Turns Litigation Hold off. Allows the Archive File to be deleted from storage in accord with the
file retention setting in the associated Storage Profile.

Chapter 9. Archive Maintenance Utilities 255


Query State
Determines if Litigation Hold is set for an Archive File stored on a Centera backup device. (This
option is disabled for an Archive File stored on an HCAP WORM device.)

Index Search Selection Criteria Dialog


Use the Index Search Selection Criteria dialog to enter column criteria or SQL statements for selected
tables. The criteria that you enter on the Index Search Selection Criteria dialog is applied to all listed
Archive Files stored on the selected media type.

To open the Index Search Selection Criteria dialog, right-click the grid in the Archive Directory
Maintenance dialog and click one of the options in the Search submenu.

Table

Click the down arrow to select a name from a superset of tables in all listed Archive Files stored on the
selected media type. It is possible to have two or more tables with the same name, but different columns.
Thus, the names of all columns in tables with the selected name are displayed in the Index Search
Selection Criteria dialog.

Combine all table criteria with

Option for combining criteria for multiple tables:

256 IBM Optim: Archive User Manual


AND Data in an Archive File must match selection criteria for all tables.
OR Data in an Archive File must match selection criteria for one table.

You can use column criteria and SQL WHERE clauses for each table, as appropriate.

Note: If you define both column criteria and an SQL WHERE clause for a table, the specifications are
logically ANDed.

Column Criteria Tab


Use the Column Criteria tab to define selection criteria for any column in the table. Enter selection
criteria for a specific column next to the column name.

Combine all column criteria with

Option for combining criteria for multiple columns in the table:


AND A row must match selection criteria for all columns.
For example: CUSTNAME > 'M' AND STATE = 'NJ'
OR A row must match selection criteria for one column.
For example: CUSTNAME > 'M' OR STATE = 'NJ'

Column Name

Name of each column. You can rearrange the order in which the columns are displayed by dragging the
grid row number. You cannot modify column names.

Operator

Click the Operator grid cell to select an operator from a list.

Selection Criteria

Enter a value or substitution variable in the Selection Criteria cell. Values for selection criteria must
conform to SQL syntax and include appropriate relational or logical operators. To validate selection
criteria, click outside the grid row. If the criteria is invalid, a message indicates the problem.

SQL Tab
Use the SQL tab to create an SQL WHERE clause to handle selection criteria that is more complex than
can be defined on the Column Criteria tab.

For example, to search for the desired set of data in a table in an Archive File, you may need to use a
combination of AND and OR logical operators.

Note: For details on rules that apply to SQL statements used internally by Archive, refer to Appendix A,
“SQL Grammar for Search and Restore,” on page 387.

Chapter 9. Archive Maintenance Utilities 257


SELECT. . . FROM (table) WHERE

Enter the SQL WHERE clause portion of the SELECT Statement.


v To create an SQL WHERE clause, type directly into the SELECT text box or select from the Columns
and Operators lists.
v To remove an SQL WHERE clause, right-click the SELECT text box and click Remove SQL. You may
also overtype with blanks, or use the Delete or Backspace key.
v To validate an SQL WHERE clause, right-click the SELECT text box and click Validate SQL, or click
outside the text box. If the statement is invalid, a message is displayed.

Columns

A list of the columns in the selected table. Select a column name to add it to the SQL WHERE clause
before the cursor position.

Operators

A list of valid operators and symbols you can use in the SQL WHERE clause. Select an operator to insert
it before the cursor position.

Note: See Appendix A, “SQL Grammar for Search and Restore,” on page 387 for more information.

258 IBM Optim: Archive User Manual


Begin the Search

To begin the search, close the Index Search Selection Criteria dialog.

Depending on whether you selected the Only Use Index to Perform Search check box on the Archive tab
of Personal Options, the search proceeds as follows:
v If the Only Use Index to Perform Search check box is cleared, the data in all listed Archive Files is
searched for possible matches to the specified criteria.
v If the Only Use Index to Perform Search check box is selected, Archive Indexes are searched for
possible matches to the specified criteria. This can be a more expedient way to find a match for
specified criteria, but may not be definitive. If Archive Index information matches the criteria, but is
insufficient to establish a full match (for example, data is indexed but the column for which you
provide criteria is not), the Status is shown as Indeterminate. Right-click and click Resolve or Resolve
All in the shortcut menu to search the complete set of archived data for matches to the criteria.

Searching Listed Archive Files


Use the Index Search Selection Criteria dialog to enter column criteria or SQL statements for searching
selected tables.

To search listed Archive Files:


1. Complete one of the following from the Archive Directory Maintenance dialog:
v To search all listed Archive Files, right-click the grid and click Search → All Media from the menu.
v To search only listed Archive Files stored on a local hard drive, network drive, or a WORM device,
right-click the grid and click Search → Direct Access Media.
v To search only listed Archive Files stored on removable media and backup devices, right-click the
grid and click Search → Removable Media and Backup Devices.
2. In the Table list on the Index Search Selection Criteria dialog, click the down arrow to select a table
name from those listed Archive Files. The names of columns in the selected table are displayed in the
dialog.
3. If you are using selection criteria for more than one table, select a logical operator, AND or OR, in
Combine all table criteria with.
4. In the Operator column, click the down arrow to select an operator next to the desired column name.
5. In the Selection Criteria column, enter a value or substitution variable for the column name.
6. If using selection criteria for more than one column in the table, select a logical operator, AND or OR,
in Combine all column criteria with.
7. When finished, click File → Close to search for rows in the listed Archive Files that match the selection
criteria.

Archive Directory Entry Information Dialog


Use the Archive Directory Entry Information dialog to update the Archive Directory entry for the Archive
File.

To open the Archive Directory Entry Information dialog, right-click an Archive File in the grid on the
Archive Directory Maintenance dialog and select Update Directory Entry from the shortcut menu.

Chapter 9. Archive Maintenance Utilities 259


Server Name
The name of the Optim Server on which the Archive File was created. If (Local) is displayed, the
Archive File was not created on a Server.
Archive ID
The unique Archive ID for the selected Archive File.
Group Group name for the Archive File. You can modify the Group name, as required.
Creation Date
The date and time on which the Archive File was created.
Creator
The User ID under which the Archive File was created.

260 IBM Optim: Archive User Manual


Created on Machine
The name of the workstation or Server on which the Archive File was created.
GUID Globally Unique Identifier. Archive assigns an identifier to each Archive File, recording the GUID
in the Optim Directory. A sample GUID follows:
{4CABBD4E-4EAB-43B7-9211-D713B7CF21D5}.
Storage Profile
Name of the Storage Profile for the Archive File. You can enter another Storage Profile name, or
click the browse button to open a dialog for selecting a Storage Profile.
Storage Profile is available only if the Archive File was created with a Storage Profile.

Note: Changing the Storage Profile does not change the retention policy for the Archive File.
Description
Description for the Archive File.
Index File Name
The fully qualified path and file name for any Archive Index File for the Archive File. Click the
browse button to update the location of the Archive Index File, if moved from its original
location.

Primary File Tab


The Primary File tab on the Archive Directory Entry Information dialog lists all segments of the Archive
File, and other information specific to the primary Archive File.
File Name
The fully qualified path and file name for the primary Archive File.
File Access Definition
File Access Definition for the Archive File.
Segment Name
The path and file name for each segment of the Archive File. If the path to the Archive File
segments has changed, you can correct the information.
The following naming convention is used for segments of an Archive File:
filename.1.af, filename.2.af, (... filename.n.af), filename.af.
For example, when creating an Archive File named c:\arch\archtest.af that requires three
segments, the segments are as follows:
c:\arch\archtest.1.af (segment 1)
c:\arch\archtest.2.af (segment 2)
c:\arch\archtest.af (segment 3)
Media Type
The media type of the Archive File (that is, Fixed, Network, Removable, WORM Device).
Backup File
The type of backup device used during the Archive Process, if any (that is, Centera, Tivoli,
NetWorker).

Retention Policy

Use the following options to change the retention policy for the primary Archive File.

For more information about retention policy, see Chapter 10, “Manage Archive Media,” on page 289.
Auto Delete Date
Click the down arrow to change the date when the primary copy of the Archive File is
automatically deleted or select Never to remove the existing retention policy.

Chapter 9. Archive Maintenance Utilities 261


Note: You cannot select a date prior to the current Auto Delete Date.
User Name
The User ID under which the Archive File is deleted.
Change User Name if the original is no longer valid or no longer has sufficient rights to delete
the file.

Note: The User ID must have administrative privileges, or be a member of a group with the
appropriate authority.
Password
Password corresponding to the User Name.
Domain
The Domain name for the User Name.

You can use shortcut menu commands to register the duplicate Archive File and view WORM Device or
Centera attributes for a file. Right-click the grid and select from the following commands:
Register Duplicate File
Register the duplicate Archive File in the Archive Directory by selecting the name of the duplicate
Archive File from the Open dialog. (Enabled if the duplicate file exists but is not registered.)
Display Centera Attributes
Opens the Centera File Attributes dialog, which displays Centera attributes for the selected
Archive File or segment.
Display WORM Device Attributes
Opens the WORM Device Primary File Attributes dialog, which displays the WORM Device
retention period for the primary Archive File.
Display Audit Trail
Opens the Archive Audit Trail dialog, which displays any migration history of Archive Files.

Duplicate File Tab


If a duplicate Archive File is registered, the Duplicate File tab on the Archive Directory Entry
Information dialog displays the names of all segments of the duplicate. Media Type displays the value
listed for the file on the Archive Directory Maintenance dialog.

You can use shortcut menu commands to view WORM Device attributes, remove the duplicate Archive
File registration, or register the duplicate as the primary. Right-click the grid and select from the
following commands:
Display WORM Device Attributes
Opens the WORM Device Duplicate File Attributes dialog, which displays the WORM Device
retention period for the duplicate Archive File.
Remove All
Delete registration for all segments of the duplicate Archive File.
Replace Primary Segments
Register the duplicate Archive File as the primary Archive File.

Centera File Attributes Dialog


The Centera File Attributes dialog displays information about the Archive File saved to the Centera
Server, including the retention period for a specific Archive File.

This dialog is informational only and cannot be modified. To open the Centera File Attributes dialog,
right-click the Segment Name grid in the Archive Directory Entry Information dialog and select Display
Centera Attributes from the shortcut menu.

262 IBM Optim: Archive User Manual


Note: The SegNum value for a nonsegmented Archive File is 0. For a segmented Archive File, the
SegNum attribute displays the number of segments created for the Archive File, regardless of the
segment you selected on the Archive Directory Entry Information dialog. All other Centera file attributes
pertain to the last segment created, that is, the segment with the original Archive File name (for example,
custarchive.AF).

Archive Audit Trail Dialog


The Archive Audit Trail dialog displays the migration history of an Archive File created by the Archive
File Migration Process.

To open the Archive Audit Trail dialog, right-click the Segment Name grid in the Archive Directory Entry
Information dialog and select Display Audit Trail from the shortcut menu

The Archive Audit Trail dialog contains two grids, audit records and record details. The upper grid
displays the audit records of the migration process. If the file was created from a source Archive File also
created by the migration process, the audit records grid lists each source file up to an original source
Archive File created by an Archive Process. Select a record in the audit records grid to display
information in the record details grid about the migration process that created the file. The Right Arrow
column in the audit records grid indicates the selected record.

Chapter 9. Archive Maintenance Utilities 263


Audit Records
Migration Date
The date and time the migration was performed.
Migrated By
User ID of the person who performed the migration.
Input Filename
The name and location of the source Archive File.

Record Details
Input/Output Archive File Attributes
The Input Archive File Attributes and Output Archive File Attributes lists display Archive
Directory details about the Archive Files used in a migration process as well as the following
information:
Created By
User ID of the person who created the Archive File.
Created on Machine
Machine on which the Archive File was created.
Creation Date
Date the Archive File was created.
File Access Definition
The File Access Definition associated with the Archive File.
File Name
The fully qualified name of the Archive File.

264 IBM Optim: Archive User Manual


File Version
The version of Optim used to create the file.
GUID Globally unique identifier (GUID) for the Archive File.
Operating System Type
The Optim Server operating system: Windows, UNIX, or Linux.
Operating System Extension
The Optim Server operating system version.
Version Build Number
The build number installed on the Optim Server.
Version Build Sub-Number
The build version installed on the Optim Server.
Runtime Options
Displays options used during the Archive File Migration Process.
Audit Version
The version of the Archive File Migration utility used to migrate the file.
Compress
TRUE indicates the output file was compressed.
Register
TRUE indicates the output file was registered in the Archive Directory.
Replace Directory Entry
TRUE indicates the output file replaced an Archive Directory entry.
Retain GUID
TRUE indicates the output file uses the same Globally Unique Identifier (GUID) as the
source file.
Migrated from Mainframe
TRUE indicates the source file was created on a z/OS platform.
Mainframe Access Definition
If the source file was created on a z/OS platform, the Access Definition name for the
output file.
Migration Description
Description of the Archive File Migration process.
Mainframe DBAlias
If the source file was created on a z/OS platform, the DB Alias name for tables in the
output file.

Export Archive File Security Dialog


Use the Export Archive File Security dialog to export security information for a secured Archive File into
a Security File.

The Security File maintains the security for the Archive File. To open the Export Archive File Security
dialog, right-click an Archive File in the grid on the Archive Directory Maintenance dialog and, in the
shortcut menu, click Export Security Information → Primary File (for primary files) or Export Security
Information → Secondary File (for duplicate files).

When you use the Archive Registration Utility to register a secured Archive File, the Security File is
selected instead of the Archive File. The Security File includes a password needed to register the Archive

Chapter 9. Archive Maintenance Utilities 265


File and contains information needed to create the associated FAD in the new Directory. If the FAD
already exists, you are given the option to overwrite it or to associate the Archive File with the existing
FAD.

Note: Only users with permission to update the File Access Definition can export the security
information.

Server The server on which the Archive File resides.


Output File
Directory path and name of the Security File. By default, the Security File path and name matches
that of the Archive File with an .sf extension. Click the down arrow to select from a history list
of file names, or click the browse button to select from another directory.
Password
Password for securing the Archive File. This password must be used when registering the file in
another Optim Directory.
Verify Password
Re-enter the Password for verification.

Exporting Security Information


Use the Export Archive File Security dialog to export security information for a secured Archive File into
a Security File.

To export security information:


1. Right-click the Archive File name and click Export Security Information → Primary File in the
shortcut menu (for primary files) or Export Security Information → Secondary File in the shortcut
menu (for duplicate files). The Export Archive File Security dialog is displayed.
2. In the Export Archive File Security dialog, type or select the Security File name in Output File.
3. Type a Security File Password.
4. Re-type the password in Verify Password.
5. Click OK. The Security File is created.

Archive File Filters


You can refine the list of Archive Directory entries further using the Archive File Filter parameters at the
bottom of the Archive Directory Maintenance dialog.

266 IBM Optim: Archive User Manual


You can use the Archive File Filter parameters in the same way as the Archive File Filters dialog.
However, Archive File Filters specified in the Archive Directory Maintenance dialog apply only to the
listed entries.

Click the arrow in the file name, Optim Server name, group, creator, table name, description, or date
range box to select specific parameters. Click Display to apply Archive File Filters and display the new
list.

Use command buttons on the Archive Directory Maintenance dialog as follows:


Refresh
Remove any Archive File Filters in the Archive Directory Maintenance dialog and display the
original list.
Respecify
Return to the Archive File Filters dialog.

Archive Registration Utility


You can add Archive Directory entries to the Optim Directory. Archive Files that were created on
workstations using a different Optim Directory, or for which entries have been deleted, might require
new entries to enable Archive functions.

Use the Archive Registration Utility dialog to create Archive Directory entries for Archive Files.

To display an Open dialog from which to select Archive Files for registration, right-click the grid and
click Add Archive Files in the shortcut menu. To register a secured Archive File, select the associated
Security File from the Open dialog. For more information about registering secured Archive Files, see
“Register Secured Archive Files” on page 271.

Selected Archive Files are listed on the Archive Registration Utility dialog. To run the registration process,
click File → Run.

Chapter 9. Archive Maintenance Utilities 267


Registering Archive Files
Use the Archive Registration Utility dialog to create Archive Directory entries for Archive Files.

To register Archive Files:


1. From the Archive Registration Utility dialog, right-click in the Archive File list and click Add Archive
Files.
2. From the Open dialog, find and select the Archive File(s) you want to register and click Open. The
Archive File(s) names are added to the Archive Registration Utility dialog.
v To register a secured Archive File, you must select the Security File for the Archive File.
3. Click File → Run in the menu to register Archive File(s).
4. If the Archive File is secured, the Import Archive File Security dialog displays. Enter the name of the
File Access Definition for the Archive File and the Security File password.
5. Click OK.

Changing Optim Servers


Archive, Delete, or Restore Requests can contain references to a specific Optim Server. If you change the
location of an Optim Server, you must also change these references before using the Archive, Delete, and
Restore Requests again.

After you change the location of your Optim Servers, you must do the following to access your Archive
Files:
1. Use the Archive Registration Utility to register your existing Archive Files. If you have not deleted the
original Archive Directory entries, you will be prompted to do so.
2. Modify any predefined or default Archive, Delete, or Restore Requests that reference invalid files or
directories on an Optim Server.
3. Open the Archive tab of the Personal Options dialog to change the default Archive Directory,
Archive Index Directory, and Archive Browse Index Directory, if needed.

Note: You might not be able to browse Control Files, unless you place the Archive Files in the same
directory structure on the new Optim Server.

Grid Details
The grid on the Archive Registration Utility dialog contains the following values.

Status

The status of each listed Archive File, as follows:


(blank) The Archive File is valid, prior to the registration process.
Registered
The Archive File was successfully registered. After a successful registration, all columns except for
the Status column appear highlighted.
Skipped
An existing entry was retained for the Archive File in the Archive Directory.
Invalid
The grid row contains invalid data. For example, an Invalid status is displayed if you refer to an
Archive Index File that is not compatible with the Archive File, or if you enter the name of a
Storage Profile that does not exist in the Optim Directory.
Failed The registration process for the Archive File failed.
Inaccessible
The Archive File is not available to the workstation (the requested server is not accessible).

268 IBM Optim: Archive User Manual


Note: When the status of an Archive File is Invalid or Failed, the appropriate error message is displayed
in the message bar at the bottom of the Archive Registration Utility dialog.

Archive File

Name of the Archive File to register.

Server

Name of the Optim Server on which the Archive File was created. If (Local) is displayed as the server
name, the Archive File was not created on an Optim Server.

Index File
Fully qualified path and file name for the Archive Index File created with the Archive File, if it exists.
You can update the location of the Archive Index File, but the Index File must be the one associated with
the Archive File.

Storage Profile

Name of a Storage Profile associated with the Archive File, if any.

If the Storage Profile does not exist in the Optim Directory (resulting in an Invalid status), you can open
a dialog from which to select a new Storage Profile by clicking the browse button.

Note: A Storage Profile is necessary to recall an Archive File from a backup device. See Chapter 10,
“Manage Archive Media,” on page 289 for information on copying to and recalling from a backup device.

Group

Group name as entered on the Archive Request Editor when the Archive File was created. You can edit
the group name, replacing the original in the Archive File.

Delete File

Change or apply a retention policy (for Archive Files created on an Optim Server only). Click the browse
button to open a calendar dialog and select a new retention policy delete date.

Description

Description information as entered on the Archive Request Editor when the Archive File was created. You
can edit the description information, replacing the original in the Archive File.

Security File

Fully qualified path and file name for the Security File associated with a secured Archive File. For
information about registering secured Archive Files, see “Register Secured Archive Files” on page 271.

Continue Processing if Errors

Select this check box to continue processing the list of Archive Files despite error conditions.

Shortcut Menu Commands


You can use shortcut menu commands on the Archive Registration Utility dialog to manage the list of
Archive Files, browse an Archive File, or open a Storage Profile.

Chapter 9. Archive Maintenance Utilities 269


Right-click on a grid row to display the following options.

Add Archive File(s)

Display an Open dialog, allowing you to select one or more Archive Files to register. To include a secured
Archive File for registration, select the associated Security File.

Replace Archive File

Display an Open dialog, allowing you to select an Archive File to replace the listed Archive File. To
include a secured Archive File for registration, select the associated Security File.

Remove
Delete the entry.

Remove All

Delete all entries.

Remove Registered

Delete only registered entries.

Browse Archive File

Open the Browse Utility, used for browsing the Archive File.

Note: Refer to the Common Elements Manual for information on the Browse Utility.

Open Storage Profile

Open the Storage Profile Utility, allowing you to edit the Storage Profile.

Note: See Chapter 10, “Manage Archive Media,” on page 289 for information on the Storage Profile
Utility.

Register the Archive Files


To create an Archive Directory entry for each listed Archive File, click File → Run from the menu.

The process begins with the file at the top of the list and registers files one at a time. If an entry for an
Archive File already exists, you are prompted to replace the entry with a new one, or retain the entry, as
follows:

Click Proceed to replace the entry with a new one. Click Skip to retain the entry.

270 IBM Optim: Archive User Manual


When the process is complete, the Status column shows results for each listed Archive File. See “Grid
Details” on page 251 for a discussion of the Status column.

Register Secured Archive Files


During the registration process, the Import Archive File Security dialog is displayed for each listed
Security File. Use this dialog to identify the File Access Definition for the Archive File and to provide the
Security File password.

Use FAD Name to associate the Archive File with a File Access Definition. By default, the name of the
File Access Definition previously associated with the Archive File is displayed.

You must either associate the Archive File with a File Access Definition in the current Optim Directory or
create a new File Access Definition from specifications in the Security File. The File Access Definition
name specified in the Import Archive File Security dialog need not match the name originally associated
with the Archive File.

If you enter the name of a File Access Definition that does not exist in the Optim Directory, a new FAD is
created from specifications in the Security File and you are prompted to create an ACL for the new FAD.

If you enter the name of an FAD that exists in the Optim Directory, you are prompted to overwrite the
existing definition, use the existing definition, or skip the import of the Archive File. If you overwrite the
existing File Access Definition, you are prompted to create an ACL for the new definition.

Security File

Directory path and name of the Security File.

FAD Name

The File Access Definition for the Archive File. Click the down arrow to select from a history list of File
Access Definition names, or use the browse button to select a File Access Definition from the Optim
Directory.

Password

The password for the Security File.

Chapter 9. Archive Maintenance Utilities 271


Archive Index Maintenance
Because Archive can search an index more quickly than it can search an Archive File, Archive Indexes can
greatly enhance performance for searches and restorations of archived data. As your organization's
applications and business processes evolve, however, its requirements for searching or restoring archived
data might change.

For example, after several years of monthly Archive Processes to remove two-year-old sales transactions
from the production database, a company adopts new audit processes that require information about
sales transactions for one or more specific products over a five-year period. Although the archived data
was indexed at the time it was archived, indexes to locate transactions by product do not exist. To
support the new audit applications, the Archive Administrator can use the Archive Index Maintenance
Utility to analyze, add, delete, augment, or edit indexes for sales data that was archived years earlier.

To open the Index Maintenance dialog, click Utilities → Archive → Index Maintenance in the menu in the
main window. The Archive File Filters and Select Archive File(s) dialogs are displayed at the same time.

Note: You can also open the Index Maintenance dialog for a single Archive File by selecting Index
Specifications from the shortcut menu on the Archive Directory Maintenance dialog.

Select Archive Files


The Select Archive File(s) dialog lists the Archive Directory entries for files that match criteria in the
Archive File Filters dialog.

These dialogs are similar to those described in “Archive Directory Maintenance” on page 250; however,
the Select Archive File(s) dialog differs from the Archive Directory Maintenance dialog by allowing you
to select names of multiple Archive Files.

272 IBM Optim: Archive User Manual


To select Archive Files for index maintenance, hold the Ctrl or Shift key while clicking file names, then
click Select. To select a single Archive File, double-click the file name or select the file name and click
Select.

The Select All button allows you to select all Archive Files listed on the Select Archive File(s) dialog. The
Select Matching button allows you to select the Archive Files with names that match the criteria
specified in the Archive File Filters. After you select the Archive Files, the Index Maintenance dialog is
displayed.

Note: You cannot select names of Archive Files with Inaccessible status.

Grouping Files

If the Archive Files contain tables with the same name but different qualifiers, you will receive a prompt
asking if you want to group the tables by table name alone or with qualifiers.

Equality Rules for Multiple Tables

When you use multiple tables, the utility matches tables, columns, and indexes according to the following
rules:
v Tables match if they have the same names, regardless of qualifiers. Tables with the same name but
different qualifiers are displayed according to the method you select to group them. Matching tables
may have different column names and data types. Two or more tables in the same Archive File may
match.
v Table, column, and index names are not case sensitive. The case format for the first occurrence of a
table, column, or index is displayed in the utility.
v Columns match if their names match. Matching columns may have different data types.
v Each index consists of a set of columns in a specific order. Indexes match if the column names and the
order of the columns are equal. The names and data types of matching indexes may be different.

Modifying an Archive Index File


Use the Index Maintenance dialog to modify an Archive Index File.

To modify an Archive Index File:


1. In the main window, click Utilities → Archive → Index Maintenance.
2. Enter the desired filters, and then click OK to limit the list of Archive Files in the Select Archive
File(s) dialog.
3. In the Select Archive File(s) dialog, double-click the desired Archive File to open it in the Index
Maintenance dialog.
4. Click the Indexes tab.
5. Select the table in which you want to add or modify an index.

Chapter 9. Archive Maintenance Utilities 273


6. In the Index grid, click to select the index you want to modify, or right-click the Index grid and click
Add from the shortcut menu to create a new index.
7. In Available Columns, double-click the names of the columns you want added to the index. In
Index Columns, double-click the names of the columns you want removed from the index, if
needed.
8. Create and modify additional indexes, if needed.
9. When finished, click File → Run to modify the existing Archive Index File and display the Archive
Index Generation Progress dialog.
10. When the process is finished, click File → Close to close all dialogs and return to the main window.

Creating Archive Index Files for Multiple Archive Files


Use the Index Maintenance dialog to create Archive Index Files for multiple Archive Files.

To create Archive Index Files for multiple Archive Files:


1. In the main window, click Utilities → Archive → Index Maintenance.
2. Enter the desired filters, and click OK to limit the list of Archive Files in the Select Archive File(s)
dialog.
3. In the Select Archive File(s) dialog, select Archive Files by holding the Ctrl or Shift key while
clicking file names, and then click Select to display the files in the Index Maintenance dialog.
4. In the Index Maintenance dialog, right-click the Archive Index File column and click Generate for
Empty from the shortcut menu to create any needed Archive Index Files.
5. Click the Tables tab to view which tables are shared by the Archive Files.
6. Click the Indexes tab.
7. Select the table in which you want to add an index.
8. Right-click in the Index grid, and click Add from the shortcut menu to create a new index.
9. In Available Columns, double-click the names of the columns you want added to the index.
10. Create additional indexes for the same or additional tables, if desired.
11. When finished, click File → Run to create the Archive Index Files and display the Archive Index
Generation Progress dialog.
12. When the process is finished, click File → Close to close all dialogs and return to the main window.

Index Maintenance Dialog


The Index Maintenance dialog allows you to analyze, create, or edit Archive Indexes for selected Archive
Files.

The Number of Files value is the number of files selected in the Select Archive File(s) dialog. Any errors
that occur while you are creating or editing an index are displayed at the bottom of the dialog.

274 IBM Optim: Archive User Manual


Tabs

Tabs on the Index Maintenance dialog allow you to browse, edit, and create Archive Indexes for the
specified Archive Files.
Files Displays information about each Archive File. You can enter Archive Index File names for
Archive Files without an index file.
Tables Lists the tables in the Archive Files. You can identify Archive Files that include data from specific
archived tables.
Indexes
Lists indexes by table. You can create or modify indexes for each table in the Archive Files.

Files Tab
A grid on the Files tab lists information about each Archive File. You can use this tab to provide names
of Archive Index Files to be generated for Archive Files that have no indexes.
Server
The server on which the Archive File resides.

Chapter 9. Archive Maintenance Utilities 275


Archive File
The Archive File name, including the path.
Archive Index File
The name, including the path, of the Archive Index File associated with the Archive File. If an
Archive Index for the Archive File exists, you cannot change the Archive Index File name.
If an Archive File does not have an associated Archive Index, you can type the name of the file to
be generated, use the browse button in a selected grid cell to specify a file, or allow the Index
Maintenance Utility to create a file name automatically. The new Archive Index File resides on
Server.

Notes:
v If you enter an Archive Index File name, this name is overwritten if you select Generate for
All from the shortcut menu.
v The utility generates indexes for a validly named Archive Index File only. An error message
identifies grid rows that require a name.
Index File Status
The status of the Archive Index File.
Active File
An Archive Index File exists and is currently associated with the Archive File.
Empty No Archive Index File name is specified.
New The named Archive Index File will be generated when you run the Index Maintenance
Utility.
Exists The named Archive Index File exists, but it is not associated with the Archive File. When
you run the Index Maintenance Utility, you are prompted for permission to overwrite the
existing Archive Index File.
Invalid
The Archive Index File name is invalid.

Shortcut Menu Commands

Right-click the Archive Index File grid column to display the following shortcut menu commands:
Generate for Empty
Generate default Archive Index File names for any blank index file names. Any Archive Index
File names that you have entered in the grid are not changed. The default file name is the same
as the Archive File name, with an .afx extension.
Generate for All
Generate default Archive Index File names for all Archive Files that do not have an associated
index file. The generated file names replace any Archive Index File names that you have entered
in the grid.
Clear All
Remove any previously entered or generated Archive Index File names.

Right-click anywhere in the grid, to display the following shortcut menu commands:
Clear All Highlights
Remove any highlights, set from the Tables and Indexes tabs, from the grid.
Remove Entry
Remove the selected entry from the grid. When an entry is removed, the Number of files value

276 IBM Optim: Archive User Manual


is updated. Files can be added only by opening a new instance of the Index Maintenance dialog.
This option is not available if only one Archive File is listed.
Add Relationship Indexes
Automatically generate indexes based on the relationships between tables in the Access Definition
used to create the Archive File. The indexes are displayed on the Indexes tab. (If the Archive File
contains tables with the same names but with different qualifiers, you must group the tables with
qualifiers in order to use this command.)
This option is available only when the Index Maintenance dialog is opened from the Archive
Directory Maintenance dialog.

Tables Tab
The Tables tab lists the tables in all Archive Files listed on the Files tab. You can use options at the top of
the tab to limit the tables that are listed.

Show Tables that Exist

When multiple tables are listed in the grid, use the following options to manage the list.

Chapter 9. Archive Maintenance Utilities 277


In Any File
List a superset of all tables in all Archive Files shown on the Files tab. Default.
In Every File
List tables common to all Archive Files shown on the Files tab.
In More than One File
List tables in more than one Archive File shown on the Files tab.

Table Name

The name of the table. The format of the table names (one-part, two-part, or three-part) depends on how
you choose to group them. For more information about grouping, see “Grouping Files” on page 273.

Number of Files

The number of Archive Files that include the table.

Shortcut Menu Commands

Right-click the Tables grid to display the following shortcut menu commands:
Highlight Files
Display the Files tab, highlighting rows for Archive Files that include the selected table.
Edit Indexes
Display the Indexes tab and select the specified table for indexing.

Indexes Tab
Use the Indexes tab to view, create, or modify Archive Indexes for one or more Archive Files.

You can use options at the top of the tab to manage the display of tables, indexes, and columns. Select
the name of a table to list indexes for the table. The Index grid shortcut menu allows you to add or
delete an index.

278 IBM Optim: Archive User Manual


Show Tables that Exist

When multiple Archive Files have been selected for indexing, use the following options to manage the
Table list.
In Any File
List all tables in the Archive Files shown on the Files tab. Default.
In Every File
List tables common to every Archive File shown on the Files tab.
In More than One File
List tables included in more than one Archive File shown on the Files tab.

Show Indexes that Exist

Use the following options to manage Archive Indexes for the selected table.

Chapter 9. Archive Maintenance Utilities 279


Note: These options are unavailable if only one Archive File has been selected for indexing and each
table in the file occurs only once.
In Any Table
List indexes for any occurrence of the table. Default.
In Every Table
List indexes common to all occurrences of the table. Common indexes are determined by columns
and their order in the index, regardless of the index name.
In More than One Table
List indexes common to more than one occurrence of the table. Common indexes are determined
by columns and their order in the index, regardless of the index name.

Show Columns that Exist

Use the following options to manage the list of columns in the Available Columns grid.

Note: These options are unavailable if only one Archive File is selected for indexing and each table in the
file occurs only once.
In Any Table
List all columns for any occurrence of the table. Default.
In Every Table
List columns common to all occurrences of the table.
In More than One Table
List columns common to more than one occurrence of the table.

Table

Select the name of a table for which you can analyze, create, or modify Archive Indexes. The selected
table name represents all occurrences of the table in the files listed on the Files tab. Index, Index
Columns, and Available Columns display information for the selected table. Use the Show Tables that
Exist options at the top of the tab to manage the list of tables.

Index Grid

The Index grid lists indexes for the selected table. Click a row in the grid to view or edit an index, and to
display the Index Columns and Available Columns lists for an index. Use the Show Indexes that Exist
options at the top of the tab to manage the display of indexes.

To create an index, right-click the grid and click Add in the shortcut menu. The utility automatically
generates a default name for each index. Default names are in the form “Index_nnn,” where nnn is a
sequential three-digit number that provides a unique name for each index. You can use the default name,
or edit the name according to your conventions.

Although each occurrence of a table can have no more than 16 indexes at one time, you can define up to
16 indexes for each table without regard to any existing index entries. The Index Maintenance Utility will
not add indexes for a table once it has 16 indexes. If more than 16 existing indexes for a table are listed,
indexes defined for one or more occurrences of a table do not apply to all occurrences.

Note: To delete existing indexes, select Delete in the Action column on the Index grid.

Current Row Indicates the selected index. To select an index, click the row.
Indicator

280 IBM Optim: Archive User Manual


Index Name The Archive Index name. If different occurrences of the table have matching indexes with
different names, the name of the first index is displayed.
Number of Tables The number of occurrences of the table to which the index applies.
Number of Files The number of Archive Files that include an occurrence of the table with this index.
Status The status of the index name.
blank All indexes of the columns shown in Index Columns have the
same name.
Auto-renamed The utility has generated a name for the index because the
name is already used for an index on different columns.
Has multiple names An index on the same columns applies to different occurrences
of the table, but the index names are different. The first name
found is displayed.
Auto-renamed and has The utility has generated a name for the index because the
multiple names name is used for another index; and the index applies to
different occurrences of the table, but the index names are
different.
Action Type of maintenance performed on the index when you run the utility. Click to select from the
following:
Update Update existing index.
Propagate Add index for all occurrences of the table, and update existing
indexes.

Propagate is the default for new indexes.


Delete Remove the index for all occurrences of the table.
Note: The Delete option is the only method for deleting
existing indexes.

Shortcut Menu Commands

Right-click the Index grid to display the following shortcut menu commands:
Add Define a new index. Archive inserts a new line in the grid and provides a default name. The
Action is set to Propagate. You can define up to 16 new indexes (in addition to any indexes that
already apply to the table). Archive will stop creating indexes for a table that has 16 indexes,
however.
Remove
Remove a specified index that has been defined but not created. This does not affect an existing
index. Set the Action value to Delete in order to delete an existing index.
Remove All
Remove all defined indexes from the grid. Existing indexes are not affected.
Set All Update
Set the Action value to Update for all existing indexes. Indexes defined but not created are not
affected. This option is available for the Action column only.
Set All Delete
Set the Action value to Delete for existing indexes. Indexes defined but not created are not
affected. This option is available for the Action column only.
Set All Propagate
Set the Action value to Propagate for existing indexes. Indexes defined but not created are not
affected. This option is available for the Action column only.

Chapter 9. Archive Maintenance Utilities 281


Highlight Files
Display the Files tab and highlight rows for Archive Files that use the specified index. This
option is available for existing indexes only.

Index Columns Grid

The Index Columns grid lists columns in the selected index, in the order that they appear in the index.
You can drag a column name to change its order in the list.

To add a column to an index, double-click or drag a column name from the Available Columns grid to
the appropriate position in the Index Columns grid. To remove a column, use the shortcut menu or
double-click or drag a column name to the Available Columns grid.

Notes:
v You can add any number of columns to the grid, but an index can only have 16 columns. See “Index
Generation Process” on page 284 for information on processing indexes with more than 16 columns.
v Data length for a column cannot exceed 255 characters, and the total length of data in all columns
cannot exceed 512 characters.
v An index cannot include a LOB column.

Column Name The name of the column.


Number of The number of occurrences of the table that include this column.
Tables
Number of Files The number of Archive Files that include occurrences of the table with this column name.

Shortcut Menu Commands

Right-click the Index Columns grid to display the following shortcut menu commands:
Remove
Remove the specified column from the index. The column is displayed in the Available Columns
grid.
Remove All
Remove all columns from the index. The columns are displayed in the Available Columns grid.
Highlight Files
Display the Files tab and highlight rows for Archive Files that use the specified column.

Available Columns Grid

The Available Columns grid lists columns in the table that have not been selected for the index, in the
order that they appear in the table. Use the Show Columns that Exist options at the top of the tab to
manage which columns are displayed in the grid.

Column Name The name of the column.


Number of The number of occurrences of the table that include a column with this name.
Tables
Number of Files The number of Archive Files that include occurrences of the table with this column name.

Shortcut Menu Commands

Right-click the Available Columns grid to display the following shortcut menu commands:

282 IBM Optim: Archive User Manual


Add Add the specified column to the index. The column name is listed at the bottom of the Index
Columns grid.
Add All
Add all columns to the index. The column names are listed in the Index Columns grid.
Highlight Files
Display the Files tab and highlight rows for Archive Files that include the specified column.

Generating Archive Indexes


To generate the Archive Indexes defined in the Indexes tab, click File → Run, or click the Run toolbar
button.

A Personal Option determines whether you are prompted to confirm that you want to overwrite any
Archive Index Files with Exists status on the Files tab.

During the Archive Index generation process, the Archive Index Generation Progress dialog displays a
log of processing activity. The log groups Archive Files by Server. For each table in an Archive File, the
log displays the results of the process for each index.

Select Return to the editor when this dialog is closed to return to the Index Maintenance dialog after
you close the Archive Index Generation Progress dialog.

Click Cancel Process to cancel the Archive Index process. A confirmation dialog prompts to verify that
you want to cancel the process. Any Archive Index Files created up to the point of cancellation are
retained.

For each index that is processed, the log will show the following:
v If the index is new or renamed, the log shows “Added Index (index name).”
v If the columns in the index change, the log shows “Updated Index (index name).”

Chapter 9. Archive Maintenance Utilities 283


v If the index is deleted, the log shows “Deleted Index (index name).”
v If no changes were made to the index, the log shows “No change to Index (index name).”

When the Archive Index process is complete, you can save or print the Archive Index Process Log. To
save the log, click File → Save As. To print the log, click File → Print. The log is also stored in the Temp
directory in the format aixmnnnn.tmp, where nnnn is a four-digit number.

Index Generation Process

If all columns selected for an index do not occur in every occurrence of the table, the Index Maintenance
Utility may either truncate the index or not process it, depending on the position of the missing columns.
v If the missing columns are at the end of the index (preceded by columns that are included in every
occurrence of the table), the utility truncates the index by leaving off the missing columns.
v If the missing columns precede columns that are included in every occurrence of the table, the utility
does not process the index.

If all columns selected for an index are included in every occurrence of the table, but more than 16
columns have been selected for the index, the utility will not create the index.

If a column selected for an index exceeds 255 characters, a column contains a LOB, or the total data
length of all columns in an index exceeds 512 characters, the utility will not create the index.

If an index name is used for another index for the same table, the utility will rename subsequent
occurrences of the index.

Once a table has 16 indexes, the utility will not create any additional indexes for the table.

Archive File Collections


An Archive File Collection is a list of Archive Files that can be logically unioned together as a single data
source for Open Data Manager (ODM) access.

For example, ODM uses an Archive File Collection to provide access to data in multiple Archive Files,
even if all files do not include a specific table or column or if the attributes of data in a column vary from
file to file. For information about using ODM, refer to the Installation and Configuration Guide .

Use the Archive File Collection Editor to create an Archive File Collection. You can add Archive Files to a
collection manually using the editor and also add new files automatically using the Collections tab on
the Archive Request Editor. Archive Files in a collection must be registered in the Archive Directory.
ODM processes Archive Files in the order they are listed in the collection.

When an Archive Index is added, changed, or dropped for an Archive File, the Archive File Collection is
updated to reflect the new index information. When an Archive File is dropped from the Archive
Directory, the file is also dropped from the Archive File Collection.

Archive validates the Archive File Collection when it is saved. The following conditions will cause an
error:
v Tables with matching creator IDs and names have one or more columns with the same name but
incompatible attributes. For more information, see “Column Compatibility” on page 287.
v An Archive File has multiple tables with matching creator IDs and names but different DB Aliases.

Note: The Archive Process will fail if an invalid Archive File is automatically added to an Archive File
Collection.

284 IBM Optim: Archive User Manual


To create a report detailing Archive Files and metadata for archived tables in the Archive File Collection,
click Tools → Report from the menu.

Description

Enter text to describe the Archive File Collection (up to 40 characters).

Default Date

A default date used for rows in a table without a date column that is unioned with a table that includes a
date column.

Archive Files List

The Archive Files list includes the following:


Archive File
The fully qualified names of Archive Files included in the Archive File Collection.
Status The status of each Archive File. Archive automatically provides status information about a listed
Archive File as follows:
(blank) The Archive File is valid and accessible.
Not Found
The Archive File cannot be found and no Archive Directory information is available.
Inaccessible
The Archive File is not available to the workstation.

Chapter 9. Archive Maintenance Utilities 285


Invalid
The file is not an Archive File, or the Archive File is secured by a File Access Definition
and Archive File Security is not enabled.
Unregistered
The Archive File is not registered in the Archive Directory.
Server The name of the Server on which the Archive File resides or (Local) if the Archive File was
created on a workstation. Archive automatically provides this information about a listed Archive
File.
Group Group information for the Archive File.
Created Date
Date and time the Archive File was created.
Description
Description information for the Archive File.

Shortcut Menu Commands

Right-click the Archive Files list in the Archive File Collection Editor to display shortcut menu
commands. In addition to typical Cut, Copy, Paste, Clear, and Select All commands, you can select
commands to:
Add Archive File(s)
Add Archive File names from the Archive Directory using the Archive File Filters and Select
Archive Files dialogs. For more information on the Archive File Filters dialog, see “Archive
Directory Maintenance” on page 250. For more information on the Select Archive Files dialog, see
“Select Archive Files” on page 272.
Replace Archive File
Replace the selected Archive File name with one from the Archive Directory using the Archive
File Filters and Select Archive Files dialogs. For more information on the Archive File Filters
dialog, see “Archive File Filters” on page 266. For more information on the Select Archive Files
dialog, see “Select Archive Files” on page 272.
Remove
Remove an Archive File name from the list.
Remove All
Remove all Archive File names from the list.
Browse Archive File
Browse the contents of the selected Archive File.

Archive File Collection Processing


ODM processes Archive File Collections according to specific rules.

Unioned Tables

Tables with matching creator IDs and names are unioned. To be processed, a table need not exist in every
Archive File. ODM is not case sensitive. ODM does not use DB Aliases; however, the Archive File
Collection Editor will display an error message if an Archive File has two tables with matching creator
IDs and names but different DB Aliases.

Matching tables need not have the same columns. The union will include all column names in the
matching tables. Rows from a table that do not include a column found in another table will use a
default value such as NULL, a default date specified in the Archive File Collection Editor, or an
appropriate data type (spaces, zero, and so on).

286 IBM Optim: Archive User Manual


Column Compatibility

All columns with the same name that are in tables with matching creator IDs and names must have
compatible attributes. If columns have different but compatible attributes, a compatible attribute will be
used for those columns. The column compatibility rules for the Compare Process apply to Archive File
Collections. For information about comparison compatibility rules, refer to the Common Elements Manual .

For example, columns COLX DECIMAL(8,2) and COLX DECIMAL(10,0) will become COLX
DECIMAL(10,2).

If a compatible attribute cannot be found (for example, COLX INTEGER and COLX TIMESTAMP), the
Archive File Collection Editor will display an error message.

Unioned Indexes

Archive Indexes for unioned tables may also be unioned. The following rules apply to unioned indexes:
v Each Archive File that includes the table must also include the index.
v ODM will use a unioned index until a column with a different name or attribute is found (compatible
attributes are not used). The unique column and remaining columns in the index are not processed.

Archive File Security

If access to a table or a column in a table is denied, rows from the table are not retrieved.

Creating an Archive File Collection


Use the Archive File Collection Editor to create an Archive File Collection.

To create an Archive File Collection:


1. In the main window, click Utilities → Archive → Archive File Collection. The Archive File Collection
Editor is displayed.
2. Right-click the Archive Files grid and click Add Archive Files. The Archive File Filters and Select
Archive File(s) dialogs are displayed.
3. In the Archive File Filters dialog, enter the desired filters, and click OK to limit the list of Archive
Files in the Select Archive File(s) dialog.
4. To select Archive Files for the Archive File Collection, hold the Ctrl or Shift key while clicking file
names, then click Select. To select a single Archive File, double-click the file name or select the file
name and click Select.
5. Select a Default Date used for rows in a table without a date column that is unioned with a table that
includes a date column.
6. Click File → Save to save the Archive File Collection.

Chapter 9. Archive Maintenance Utilities 287


288 IBM Optim: Archive User Manual
Chapter 10. Manage Archive Media
You can automatically manage Archive Files using a Storage Profile. It allows you to create a duplicate
copy of an Archive File, save a secondary copy of the Archive File to a backup device, and provide a date
when the primary Archive File is automatically deleted.

Generally, an Archive Process generates a single Archive File that is saved to fixed media (for example, a
local hard drive or network drive) where it resides indefinitely. Without a Storage Profile, you must
manually perform all management of the Archive File (for example, copying, deleting, saving to a backup
device).

Fixed Media versus Secondary Media

Fixed media might be the best choice for Archive File storage if Archive Files must be accessed online or
if quick response time is the primary consideration. As Archive Files accumulate, it might become
important to move older files (for which browsing or restoration is less likely) to cheaper, perhaps less
accessible, media. In addition to minimizing disk storage, a need for offsite storage or portability may
make secondary media a logical choice. In this discussion, secondary media includes any type of storage
media other than fixed (for example, a zip disk or backup device).

File Retention

By default, Archive Files exist for an indefinite period of time until manually deleted. A retention policy
allows you to manage the life span of Archive Files by scheduling them for automatic deletion. You must
determine the number of days for which the data in an Archive File remains active, and configure the
Optim Server to scan Optim Directories for Archive Files with a retention policy.

Note: Only Archive Files that reside on an Optim Server when the retention policy expires are deleted
automatically.

Secondary Media
Although Archive can create Archive Files on fixed media, you can also direct Archive Files to secondary
media, for example, a drive for removable media — simply by providing the path to the appropriate
device with the file name. You can also use Archive with a hierarchical storage management (HSM)
system.

Tape Storage

You cannot directly specify a tape drive as the path in order to place an Archive File on tape. However, if
processing on an Optim Server, you can direct Archive to copy the Archive File from disk to a NetWorker
or Tivoli Storage Manager backup device, when it completes the Archive Process. You can also direct
Archive to remove the Archive File from disk immediately after it is copied to the selected backup device
or after a specified period of time has elapsed. The Archive Index File remains on disk so that you can
efficiently search for an Archive File that has been removed from disk and, if necessary, return it to disk
for browsing or restoration.

To use a tape backup device other than NetWorker or Tivoli, you can copy Archive Files from disk to
tape or other secondary media using the appropriate vendor software, and remove the files from disk.
(Note that if you copy Archive Files to a backup device that is not supported by Archive, you must
arrange to return a file to disk for restoration or browsing.)

© Copyright IBM Corp. 1994, 2010 289


Content Addressed Storage

At the end of Archive Processing, Archive can also copy the Archive File to a Centera networked storage
system, if directed to do so. Analogous to copying files to NetWorker or Tivoli, processing must take
place on the Optim Server, and Archive can remove the copied Archive File from disk immediately after
copying or after a specified period of time has elapsed.

Hierarchical Storage Management Systems

If your facility uses an HSM system, Archive Files can be migrated to tape or other secondary media and
removed from disk in the normal course of HSM processing. In either case, the Archive Index Files must
remain on disk, and can be used as described previously.

The Archive Directory Maintenance Utility indicates an Archive File is in Offline status when it is
replaced by a stub file using an HSM system (for example, VERITAS Enterprise Vault). If Archive must
read the Archive File (for example, during a process or when you define a Table Map), the Archive File is
recalled to its original location, replacing the stub file.

Restoring or Browsing Data from Secondary Media


Archive Files stored on secondary media must be copied to a predefined disk location before they can be
restored or browsed (including point and shoot).

When managed by Archive, this process is generally transparent to the user and does not require user
knowledge of the type of media or the precise location of the Archive File, although the delay from
copying an Archive File to disk may be apparent to the user.

Retention Periods
You can establish a retention policy for primary copies of Archive Files residing on an Optim Server.
After the retention period has expired, the Archive Files are automatically deleted, at the time of day
indicated in the Optim Server options.

For more information about configuring the Optim Server, refer to the Installation and Configuration Guide .

Additionally, you can set a minimum retention period to protect Archive Files on Centera (if your
installation includes retention management features) or a WORM device such as NetApp SnapLock. The
Centera retention period applies to backup copies of Archive Files only, while you can use a WORM
device to set a retention period for primary and duplicate Archive Files. After the Centera or WORM
device retention period has expired, you can use the Archive Directory Maintenance Utility to delete the
Archive File from storage.

Note: If Litigation Hold is set for an Archive File, you cannot delete the Archive File from storage,
regardless of the file retention setting. (See “Archive Directory Maintenance Shortcut Menu Commands”
on page 253 for information on this feature.)

Storage Profile
A Storage Profile is an object in the Optim Directory that lets you provide rules for managing your archive
media according to the needs of your site.

During an Archive Process, Archive references the parameters in a Storage Profile to obtain rules for:
v Determining the type of secondary media to use for Archive Files,
v Creating duplicate Archive Files,
v Copying Archive Files to a supported backup device,

290 IBM Optim: Archive User Manual


v Setting a WORM device or Centera minimum retention period, and
v Options to automatically delete the primary Archive File.

A Storage Profile is not required to simply archive data to disk or to certain secondary media devices.
However, when referenced by the Archive Request, a Storage Profile governs the storage of Archive Files
on secondary media by providing overrides for default segment size values (to see the discussion of
media capacity considerations read “Media Capacity”).

Duplicate Archive Files

In addition to device-specific parameters for archive media, the Storage Profile can provide instructions to
automatically create two Archive Files, a primary and a duplicate, during the Archive Process. You might
want to create a duplicate Archive File on the same or a different type of media, for off-site storage or to
serve as backup for the primary Archive File. Alternatively, when Archive Files are stored on a file server,
you might want to place duplicate Archive Files on a redundant file server.

Media Capacity

The capacity of the archive media must be considered. If an Archive File is larger than the space on the
target media (for example, diskette), the file must be divided into segments, with each segment no larger
than one volume. (The segment names are recorded in the Archive Directory with other information
about the Archive File.)

Personal Options
You can use the Removable Media tab on the Personal Options dialog to establish default segment sizes
for fixed media and removable media.

Storage Profiles allow you to override these default values and provide additional parameters for
secondary media. For more information about Personal Options, refer to the Common Elements Manual .

Product Options
Use the Archive tab on the Product Options dialog to make a backup system available, provide Tivoli
options, and set a default minimum retention period for Centera and WORM devices.

Storage Profiles allow you to override the default minimum retention values. For more information about
Product Options, refer to the Installation and Configuration Guide .

Open the Storage Profile Definition Editor


Open the Storage Profile Editor to create a new Storage Profile Definition or edit an existing Storage
Profile Definition.

Create a New Storage Profile


Use this task to create a new storage profile.

To create a new Storage Profile:


1. Click Utilities → Storage Profile to open the Storage Profile Editor.
2. Click File → New.
3. Provide details on the Primary Copy tab and, as applicable, the Duplicate Copy tab, Backup Device
tab, File Retention tab, and Retention Policy tab.
4. Type a brief description of the Storage Profile (optional).
5. Click File → Save.

Chapter 10. Manage Archive Media 291


These steps are the minimum required to create a Storage Profile.

Select a Storage Profile to Edit


Use this task to select a storage profile to edit in the Storage Profile Editor.

To open a Storage Profile:


1. Click Utilities → Storage Profile to open the Storage Profile Editor.
2. Click File → Open to display the Open a Storage Profile dialog.
3. Double-click a Storage Profile Definition to select it and return to the Storage Profile Editor.

Open a Storage Profile Dialog


The Open a Storage Profile dialog lists the names and properties of available Storage Profiles.

Grid Details
Name Name assigned to the Storage Profile.
Secured
Indicator that the object is or is not secured. Secured objects are protected by Optim Security only
when Object Security is enabled by the Security Administrator.
Modified By
User ID under which the Storage Profile was created or last modified.
Modified Date
Date the Storage Profile was created or last modified.
Description
Text that describes or explains the purpose of the Storage Profile.

Pattern

You can use a pattern to limit the list in the Open dialog. A Storage Profile name has one part: name. You
can use the % (percent) wildcard to represent one or more characters or use the _ (underscore) wildcard
to represent a single character in a Storage Profile name. (The underscore must be selected as the SQL
LIKE character on the General tab in Personal Options.)

292 IBM Optim: Archive User Manual


After you specify a pattern, select Refresh to redisplay the list based on your criteria.

Using the Storage Profile Definition Editor


You can define and save a set of storage parameters as a Storage Profile.

A Storage Profile is referenced by an Archive Request and includes:


v Overrides for the default segment size values set in Personal Options.
v Parameters for creating a duplicate Archive File, regardless of the type of archive media.
v Parameters for copying the Archive File to a supported backup device.
v Retention parameters for the Archive File.

Note: A Storage Profile is not required to create an Archive File, but is required to automatically create a
duplicate Archive File, to copy an Archive File to a backup device, or to maintain a retention policy.

Chapter 10. Manage Archive Media 293


Description

Enter an optional description for the Storage Profile.

Segment Size

Provide size limitations for Archive File segments stored on fixed or secondary media (for example, tape).
An Archive File that is larger than the space limitation for the target media must be segmented to span
volumes. The size limitations in the Storage Profile override any default size limitations for segments set
in Personal Options. (Refer to the Common Elements Manual .)
Fixed The segment size (0 to 9999 MB) when the target is a fixed drive (for example, a local hard drive
or network drive). For no limit, enter a value of 0 (zero).

Notes:
v This value also applies to Archive Files copied to a backup device, because Archive Files are
created on disk before being copied to a backup device.
v The maximum segment size when the target is a Centera Server is 2 GB.
Removable
The segment size (1 to 9999 MB) when the target is a removable device (for example, zip disk).

When creating primary and duplicate Archive Files on media of different types, Archive uses the lesser
value for both files. For example, if the target media for the primary Archive File is a zip disk (with a
segment size of 100), and the target media for the duplicate Archive File is fixed media (with a segment
size of 0), 100 is the segment size for both the primary and duplicate Archive File. (A value of 0 indicates
no limit.)

The naming convention for Archive File segments is:

filename_1.af, filename_2.af, (... filename_n.af), filename.af

The name of the last segment is the file name specified in the Archive Request. For example, when
creating an Archive File named c:\arch\archtest.af in three segments, the segment names are as
follows:
c:\arch\archtest_1.af (segment 1)
c:\arch\archtest_2.af (segment 2)
c:\arch\archtest.af (segment 3)

Tabs
Primary Copy
Parameters for the primary Archive File.
Duplicate Copy
Parameters for an optional duplicate Archive File. To display this tab, select the Create Duplicate
Copy check box on the Primary Copy tab.
(backup device)
Parameters for copying the Archive File to a specific backup device (Centera, NetWorker, or
Tivoli). To display the appropriate tab, select the Copy to Backup Device check box on the
Primary Copy tab. You can then select the name of an available backup device from the
corresponding dropdown list. (The default value for the dropdown list is set in Product
Options.)
File Retention
Parameters for retaining Archive Files on disk after copying to or recalling from a backup device.
This tab is displayed if both the Copy to Backup Device check box and a backup device are
selected on the Primary Copy tab.

294 IBM Optim: Archive User Manual


Retention Policy
Parameters for automatically deleting the primary copy of the Archive File.

Create Duplicate Copy

Select this check box to display the Duplicate Copy tab. Use the Duplicate Copy tab to provide
parameters for creating a duplicate Archive File. The check box is cleared by default.

Primary Copy Tab, Storage Profile Definition


The Primary Copy tab on the Storage Profile contains the backup information for the primary copy of the
Archive File.

Copy to Backup Device

Selecting this check box enables the corresponding drop-down list. Select a backup device from the
drop-down list to display a tab for the backup device parameters and a tab for device-specific retention
options.

Chapter 10. Manage Archive Media 295


Note: The drop-down list includes the available backup devices selected in Product Options. If none
were selected in Product Options, this check box is unavailable. (Refer to the Installation and Configuration
Guide .)

Required WORM Device

Selecting this check box enables the corresponding drop-down list and activates the WORM Device
Minimum File Retention options. Select a WORM device from the drop-down list. The Archive File path
in an Archive Request that uses this Storage Profile must point to the selected WORM device or the
Archive Process will fail.
SnapLock
SnapLock
Archivas
Archivas Cluster
Hitachi
Hitachi Content Archive Platform
WORM
A WORM device is used, but no retention period is defined. The WORM Device Minimum File
Retention options will not be available.

WORM Device Minimum File Retention

Override settings for the minimum period set in Product Options for retaining Archive Files on a WORM
device. The minimum retention period is measured from the time the Archive Process copies the file to
the device. After the minimum retention period expires, the file can be deleted. This setting is available
only if the Allow User to alter Minimum Retention check box on the Archive tab in Product Options is
selected.
Interval
Protect an Archive File from deletion for a specified period after the file is generated. When you
select Interval, the Years and Days boxes become available. You can enter a number of years,
days, or a combination of both.

Note: The interval cannot exceed the maximum date, 01/17/2071. Archive checks the interval
when you save the Storage Profile and when you run the Archive Process.
Years The number of years to protect an Archive File from deletion. The default value is zero
(0).
Days The number of days (0 to 999) to protect an Archive File from deletion. The default value
is zero (0).
Maximum
Use the maximum date, 01/17/2071.
None Do not use a minimum retention period; allow an Archive File to be deleted from the device at
any time.

Note: If Litigation Hold is set for an Archive File stored on a Hitachi Content Archive Platform (HCAP)
WORM device, you cannot delete the Archive File from storage, regardless of the file retention setting.
(See “Litigation Hold” on page 255 for information on this feature.)

Duplicate Copy Tab, Storage Profile Definition


A duplicate Archive File has the same file name and extension as the primary, but must be saved to a
different directory and volume. Use the Alternate File Directory parameter to provide a path for the
duplicate.

296 IBM Optim: Archive User Manual


Alternate File Directory

Complete path to a directory for the duplicate Archive File. Click the arrow to select from the drop-down
list, or click the browse button to select from your system directories. If you do not provide a path, the
duplicate is written to the default Archive Directory specified in Personal Options. (Refer to the Common
Elements Manual for information about the default Archive Directory.)

Required WORM Device

Select this check box to indicate that the duplicate Archive File must be retained on a WORM device. If
you select this option and the Alternate File Directory path does not point to the selected WORM device,
the Archive Process will fail.

SnapLock SnapLock
Archivas Archivas Cluster
Hitachi Hitachi Content Archive Platform

Chapter 10. Manage Archive Media 297


WORM A WORM device is used, but no retention period is defined. The WORM Device Minimum File
Retention options will not be available.

WORM Device Minimum File Retention

The minimum period for retaining Archive Files on a WORM device. The minimum retention period is
measured from the time the Archive Process copies the file to the device. After the minimum retention
period expires, the file can be deleted.

Note: This setting is available only if the Allow User to alter Minimum Retention check box in Product
Options is selected. Otherwise, the default retention period set in Product Options is used.
Interval
Protect an Archive File from deletion for a specified period after the file is generated. When you
select Interval, the Years and Days boxes become available. You can enter a number of years,
days, or a combination of both.

Note: The interval cannot exceed the maximum date, 01/17/2071. Archive checks the interval
when you save the Storage Profile and when you run the Archive Process.
Years The number of years to protect an Archive File from deletion. The default is zero (0).
Days The number of days (0 to 999) to protect an Archive File from deletion. The default is
zero (0).
Maximum
Use the maximum date, 01/17/2071.
None Do not use a minimum retention period; allow an Archive File to be deleted from the device at
any time.

Note: If Litigation Hold is set for an Archive File stored on a Hitachi Content Archive Platform (HCAP)
WORM device, you cannot delete the Archive File from storage, regardless of the file retention setting.
(See “Litigation Hold” on page 255 for information on this feature.)

Centera Tab, Storage Profile Definition


Use the Centera tab to identify the file recall path and the network addresses required to access the
Centera Server. (For complete details on using Centera, refer to your EMC Centera documentation.)

Note: This tab is displayed only if you select the Copy to Backup Device check box and choose Centera
from the corresponding drop-down list on the Primary Copy tab.

298 IBM Optim: Archive User Manual


File Recall Path

The complete path to the default directory for Archive Files recalled from Centera. Click the arrow to
select from the drop-down list, or click the browse button to select from your system directories. The
Archive File is recalled as follows:
v If you use the Recall Complete File shortcut command in the Archive Maintenance Utility, and do not
specify a recall path, the file is recalled to its original path.
v If you do not use the Recall Complete File shortcut command, Optim creates a subdirectory with a
unique name, consisting of the prefix PID_ and the user's process ID. For example, for a user with
process ID 13542 Optim creates a subdirectory named PID_13542.
If you specify a recall path, this subdirectory is appended to it. If you do not specify a recall path, the
subdirectory is appended to the original path.
v Use the File Retention tab to specify the period of time for which a recalled Archive File is retained on
disk. (Refer to “File Retention Tab, Storage Profile Definition” on page 304.)

Chapter 10. Manage Archive Media 299


Authorization File Name

Enter a Pool Entry Authorization (PEA) file name, used to secure access to the Archive File on a Centera
Cluster. Click the arrow to select from the drop-down list, or click the browse button to select from your
system directories.

You must have read access to the PEA file to use it with Optim or Centera. To create or recall an Archive
File secured with a PEA file, the PEA file must exist in the location specified in the Storage Profile.

Minimum File Retention

The minimum period for retaining Archive Files on Centera. The minimum retention period is measured
from the time the Archive Process copies the Archive File to Centera. After the minimum retention period
expires, the file can be deleted.

Note: This setting is available only if the Allow User to alter Minimum Retention check box in Product
Options is selected.
Centera Default
Use the Centera default minimum retention period, based on your Centera configuration.
Infinite
Keep an Archive File on Centera indefinitely; the file cannot be deleted.
Interval
Protect an Archive File from deletion for a specified period. When you select Interval, the Years
and Days boxes are enabled. You can enter a number of years, days, or a combination of both.
Years The number of years (0 to 100) to protect an Archive File from deletion. The default is
zero (0).
Days The number of days (0 to 18300) to protect an Archive File from deletion. The default is
zero (0). (18300 days equals 50 years.)
None Do not use a minimum retention period; allow an Archive File to be deleted from Centera at any
time.

Note: If Litigation Hold is set for an Archive File stored on a Centera backup device, you cannot delete
the Archive File from storage, regardless of the file retention setting. (See “Litigation Hold” on page 255
for information on this feature.)

Network Address

The DNS names or IP addresses required to access the Centera Server.

NetWorker Tab, Storage Profile Definition


Use the NetWorker tab to identify the file recall path and other parameters for the NetWorker backup
device. (For complete details on using NetWorker, refer to your EMC NetWorker documentation.)

Note: This tab is displayed only if you select the Copy to Backup Device check box and choose
NetWorker from the corresponding drop-down list on the Primary Copy tab.

300 IBM Optim: Archive User Manual


File Recall Path

The complete path to the default directory for Archive Files recalled from NetWorker. Click the arrow to
select from the drop-down list, or click the browse button to select from your system directories. If you
do not specify a recall path, the Archive File is recalled to the original path.

Note: Use the File Retention tab to specify the period of time for which a recalled Archive File is
retained on disk. (Refer to “File Retention Tab, Storage Profile Definition” on page 304.)

Backup Type

Select the NetWorker backup type to use during processing:


Save NetWorker retains the Archive File temporarily, based on your NetWorker configuration.
Archive
NetWorker retains the Archive File forever.

Chapter 10. Manage Archive Media 301


Verify after Archive
Select to verify the Archive File after copying to the NetWorker backup device. (This
check box is available only if you select Archive as the backup type.)

User ID

Enter the User ID under which NetWorker commands are run, or click the arrow to select from the
drop-down list.

Password

Enter the password that corresponds with the specified User ID under which NetWorker commands are
run.

Authority (Domain)

Enter the name of the Domain under which NetWorker commands are run, or click the arrow to select
from the drop-down list.

NetWorker Server

Enter the name of the network computer that runs the NetWorker server software, or click the arrow to
select from the drop-down list.

Pool Name

Enter the name of the NetWorker pool in which the Archive File is stored, or click the arrow to select
from the drop-down list (optional).

Clone Pool Name

Enter the name of the NetWorker clone pool in which an exact copy of the Archive File is stored, or click
the arrow to select from the dropdown list (optional).

Note: This option is available only if you select Archive as the backup type.

Group Name

Enter the name of the NetWorker group that determines the policy for backup device operations, or click
the arrow to select from the dropdown list (optional).

Note: This option is available only if you select Save as the backup type.

Tivoli Tab, Storage Profile Definition


Use the Tivoli tab to identify the file recall path and other parameters for the Tivoli backup device.

To access the Tivoli backup device, you must specify a Node Name and Password in Product Options.
(Refer to the Installation and Configuration Guide .)

(For complete details on using Tivoli, refer to your IBM Tivoli documentation.)

302 IBM Optim: Archive User Manual


Note: This tab is displayed only if you select the Copy to Backup Device check box and choose Tivoli
from the corresponding drop-down list on the Primary Copy tab.

File Recall Path

The complete path to the default directory for Archive Files recalled from Tivoli. Click the arrow to select
from the drop-down list, or click the browse button to select from your system directories. If you do not
specify a recall path, the Archive File is recalled to the original path.

Note: Use the File Retention tab to specify the period of time for which a recalled Archive File is
retained on disk. (Refer to “File Retention Tab, Storage Profile Definition” on page 304.)

Tivoli Options File

The complete path to the Tivoli options file (dsm.opt) that contains a set of processing options. Click the
arrow to select from the drop-down list, or click the browse button to select from your system directories.
If you do not specify a path, Tivoli looks in the directory from which Archive is executing.

Chapter 10. Manage Archive Media 303


Note: If using IBM TotalStorage® DR550, you must include
ENABLEARCHIVERETENTIONPROTECTION Yes in dsm.opt.

Filespace Prefix

Enter the name of the filespace prefix that identifies a group of Archive Files in Tivoli, or click the arrow
to select from the drop-down list. If you do not specify a filespace prefix, Archive uses the default prefix,
PSTA4S.

Management Class

Enter the name of a valid Tivoli management class that defines the policy for backup device operations,
or click the arrow to select from the drop-down list. If you do not specify a management class, Tivoli uses
the default management class.

File Retention Tab, Storage Profile Definition


Use the File Retention tab to provide parameters for retaining an Archive File on disk after copying to or
recalling from a backup device.

Note: This tab is displayed only if you select the Copy to Backup Device check box and choose a backup
device on the Primary Copy tab.

304 IBM Optim: Archive User Manual


Retention after Archive

The Archive Process creates an Archive File on disk and, if required by the Storage Profile, copies it to a
backup device. You can select an option to delete the Archive File from disk immediately after the
Archive Process is complete or after a specified period, measured from the time the Archive File was last
accessed (whether by Optim or other software). Once deleted, the Archive File is no longer in the disk file
system. You can also choose to retain the Archive File on disk as well as on the backup device.

Note: Retention after Archive settings do not apply to a primary Archive File that has also been copied
to a WORM device.
Delete Immediately after Archive Process
Delete the Archive File from disk immediately after the Archive Process is complete. A deleted
Archive File is recalled by a deferred Delete Process.

Note: This option is not recommended if you plan to access the Archive File frequently.
Delete after:
Delete the Archive File from disk after the specified period, measured from the time the Archive

Chapter 10. Manage Archive Media 305


File was last accessed. You can specify a number of days, hours, or a combination of both.
(Storage space limitations should be considered when specifying how long to retain Archive
Files.)
Days Number of days (0 to 999) to keep the Archive File on disk (since the file was last
accessed).
Hours Number of hours (0 to 23) to keep the Archive File on disk (since the file was last
accessed).
Keep Do not delete the Archive File from disk.

Note: Use caution when creating and deleting Archive Files from disk after copying to a backup device.
If you delete an Archive File from disk and later reuse the Archive File name, you will not be prompted
to confirm the overwrite. At runtime, the new Archive File will overwrite the original Archive File copied
to the backup device.

Retention after Recall


When you process or browse an Archive File that was copied to a backup device and removed from disk,
Optim references the Storage Profile that was used to create the Archive File to copy the Archive File
from the backup device to the recall path. You can choose to delete the Archive File from disk
immediately after the recall or after a specified period of time.

To specify an Archive File that was copied to a backup device and removed from disk, you can:
v Enter the Archive File name, if known, for an action request.
v Click the Retrieve button, if available, to select the last created Archive File.
v Select the Archive File from the Archive Directory, for browsing or a Restore Request.

Specify the period of time for which the recalled Archive File is retained on disk after the recall is
complete:
Delete Immediately after Recall
Delete the Archive File from disk immediately after the recall is complete.
Delete after:
Delete the Archive File from disk after the specified period, measured from the time the recall is
complete. You can specify a number of days, hours, or a combination of both. (Storage space
limitations should be considered when specifying how long to retain Archive Files.)
Days Number of days (0 to 999) to keep the recalled Archive File on disk after the recall is
complete.
Hours Number of hours (0 to 23) to keep the recalled Archive File on disk after the recall is
complete.

Note: You can specify 0 for either Days or Hours, but not for both.

Retention Policy Tab, Storage Profile Definition


Use the Retention Policy tab to provide parameters for automatic deletion of the primary copy of the
Archive File. A retention policy is effective only for Archive Files that reside on an Optim Server.

A retention policy does not protect Archive Files from manual deletion (for example, by using Windows
Explorer or Archive Directory Maintenance).

After creating an Archive File, you can postpone or cancel the automatic deletion using the Archive
Directory Information dialog. For more information, see“Update Directory Entry” on page 254.

306 IBM Optim: Archive User Manual


Automatically Delete File

Options to automatically delete the primary copy of the Archive File.

Note: Options to delete the primary Archive File do not affect the management of duplicate Archive
Files.
Delete After
Select this check box to automatically delete Archive Files created using the Storage Profile.
Days The number of days (1 to 9132) to retain the primary copy of the Archive File.

Chapter 10. Manage Archive Media 307


308 IBM Optim: Archive User Manual
Chapter 11. Archive Performance
Use the following strategies to configure Archive and your database so that Archive and Delete
Processing are as efficient as possible.

The configuration strategy you choose depends on your needs and the constraints of your database
processing. These strategies are not intended to solve specific performance problems but are simply
suggestions to aid you in developing an archive strategy for your database, and can be tailored or even
combined to fit your particular needs.

Note: Changes to your database that provide maximum optimization for Archive Processing may have
negative implications for your database application processing. You must determine for yourself the
combination of solutions that best suits the demands upon your particular database. In doing this, you
should consider Archive an important database application, and configure your database accordingly.

Processing Strategies
To gauge processing speed under different Archive, Extract, and Delete processing strategies, you can use
the Statistical Report feature. Once you decide on a strategy, you can fine-tune Archive and your database
to achieve the best results. The following strategies and tips may help you optimize your Archive,
Extract, and Delete Processing.

For more information on the Statistical Report feature, see “Statistical Reports” on page 311.

Speed Processing

The most basic archiving strategy uses a single Archive Request to process as many rows as possible in
the shortest period of time. Speed processing is typically performed during off-peak or maintenance
hours to reduce (or eliminate) competition from normal application processing. You can further speed
Archive and Delete processing by increasing the number of database connections. In cases of no
competition for the database, you can remove any unnecessary constraints from the database and from
Archive. Another way to enhance efficiency is to design the partitioning of your database tables so that
you can process the rows more easily. (For more information, see “Partitioned Tables” on page 310.)

To improve delete performance, you might remove any unnecessary indexes from database tables and,
within Archive, disable row comparison and increase the commit frequency. You can also increase the
number of database connections for Delete processing, which requires that you disable table locking. If
you disable table locking, you must ensure that no modification to rows or tables occurs during
processing.

Ignore Empty Relationship

Archive performance may be improved using the Ignore Empty Relationship option. This option enables
you to exclude any rows from processing if their relationship has a value equal to null, blank, zero
length, or a specified numeric value. For information, see the Common Elements Manual.

Running Multiple Process Requests

A more intricate strategy for processing rows during off-peak hours is to process a single group of rows
using multiple requests. Since Archive and Delete processing is light on CPU usage, creating multiple
requests to process data at one time may significantly increase processing throughput. This strategy may
be most beneficial for databases that cannot be modified for Archive processing (for example, by
partitioning the database and removing unnecessary indexes).

© Copyright IBM Corp. 1994, 2010 309


The recommendations for this strategy are similar to those for the Speed Processing strategy. Within
Archive, you can increase the number of database connections for Archive and Delete Processing.
Additionally, for the Delete Process, you can disable row comparison and table locking and maximize the
commit frequency.

Data Integrity Processing

The Speed Processing and Parallel Processing strategies are designed to process rows during off-peak
hours. However, if you must process a significant number of rows, your off-peak window may be
inadequate. Additionally, your database tables may be continuously updated and a significant shut down
of database access difficult to accommodate.

In this case, you can adopt a strategy in which a small number of rows are processed regularly during
normal operating hours. The archiving and deleting of such a small number of rows should not affect
normal application processing. However, to ensure database integrity during the Delete Process you must
ensure that table locking and compare row contents are enabled.

Partitioned Tables
An additional way to increase the speed of Archive and Delete processing is to divide your database
tables into partitions. Depending on the type of data in the tables, rows are sorted by frequency of access
and age into the partitions. Since there is less I/O traffic to an infrequently used partition, the speed of
processing rows is increased. Additionally, you could more easily disable unnecessary database indexes
for a partition that is used infrequently.

Performance Tools
Archive provides various features and tools to complement the processing strategies that you establish to
best enhance performance at your site. Using these features you can better diagnose and configure
Archive to more successfully process your database tables.
“Statistical Reports” on page 311
Add performance information to the Archive, Extract, or Delete Process Report to analyze the
best method to improve performance. For example, based on information in these reports, you
may decide to change the method used to access a database table, increase the number of keys
looked up at one time, or create an index for a key column.
“Table Access Strategy” on page 319
Archive generally uses a key lookup when a DBMS index is available and a scan when an index
is not available. If accessing a significant portion of the table, however, Archive will use a scan,
even if an index is available.
You can override the default strategy:
v For an Archive (or Extract) Process you can override the default method of accessing the parent
or child table for each relationship and limit the number of key lookups performed at one time
for the parent or child table in each relationship.
v For a Delete Process, you can override the default method used to delete rows from the
database and limit the number of key lookups performed for each table.
“Index Analysis” on page 321
For an Archive (or Extract) Process, analyze DBMS indexes for relationships, if needed to Archive
(or Extract) rows in the Access Definition. Additionally, create new indexes for the relationship, if
needed.
For a Delete Process, analyze DBMS indexes for tables in the Source File, and create new indexes,
if needed.

310 IBM Optim: Archive User Manual


“Multiple Database Connections” on page 324
Increase the number of connections to the database for the Archive or Delete Process to process
rows concurrently.
“Buffer Size Limit” on page 324
Set the buffer size to use when fetching or deleting rows from the database.
Ignore Empty Relationships
For an Archive (or Extract) Process, exclude any rows with a relationship value equal to empty,
null, zero-length or a specified numeric. See the Common Elements Manual section on Access
Definitions for details.

Statistical Reports
A Statistical Report provides detailed performance information about an Archive, Extract, or Delete
Process.

Extract and Archive Process Statistics


The Statistical Report for an Archive or Extract Process is organized according to the steps in the process,
as it proceeds from table to table. These steps coincide with the Show Steps report obtained from the
Access Definition Editor. You cannot obtain a Show Steps report for a Delete Process and the Statistical
Report for a Delete Process is organized by table.

For each Archive or Extract step, the Statistical Report provides basic information about the table that is
processed and the number of key values used to retrieve rows in the table. The report also includes
information regarding Relationships with previously processed parent tables and Primary Keys for the
Start Table or previously processed child tables. Finally, DBMS Access statistics provide information about
the actual database access to the table.

The Table and Selection Criteria, Key, and DBMS Access information in the Statistical Report, together
with DBMS tools and statistics, allow you to tune your Archive or Extract Processes to more nearly meet
your performance or the requirements within the context of your processing strategy. You may need to
run a sample process several times, adjusting the selection strategy, analyzing and adding DBMS indexes,
and experimenting with the number of keys per cursor to find the optimal combination for your database
and performance needs.

For each table in a Delete Process, the Statistical Report provides detailed processing information as well
as basic information about the table that is processed.

A bold header indicates the Step number and the Table name. A separate step is shown for each instance
in which a table is accessed in a processing cycle. (Ref Table), instead of the step number, is shown for a
Reference Table.

Chapter 11. Archive Performance 311


Settings During Extract

Indicates if file system compression is used on the directory containing the Archive File.

Table and Selection Strategy Information

The statistical information for a Step includes:

DBMS Name of the DBMS for the processed table.


Version DBMS version number.

312 IBM Optim: Archive User Manual


Columns Number of columns in the table.
Cycle Yes/No indicator that the table is in a traversal cycle.
LOBs Yes/No indicator that the table contains LOB columns.
Rows An estimate, based on DBMS statistics, of the number of rows in the table.
(Value is N/A if DBMS statistics are not available.)
Row Length Number of bytes per row.
DB Connections Number of database connections used to process rows in the table.
Fetch Buffer Size per Connection The buffer size allocated for each database connection.

For each table, one of the following statistics is provided, according to the relationship with the table
processed in a previous step. For example, if the step processes the Start Table or the traversal is from
child to parent table, a PK value is shown. If the traversal is from parent table to child table, an FK value
is shown.

PK W/Index Number of DBMS-indexed Primary Key values looked up during processing


or N/A, for the Start Table.
PK WO/Index Number of unindexed Primary Key values looked up during processing or
N/A, for the Start Table.
FK W/Index Number of DBMS-indexed Foreign Key values looked up during processing.
FK WO/Index Number of unindexed Foreign Key values looked up during processing.

Finally, the strategy and any user-provided criteria used to select rows is identified. For the Start Table or
a traversal from child table to parent table, a Parent Strategy is shown. If traversal is from parent table to
child table, a Dependant Strategy is shown. In either case, the strategy used for selecting rows by key
value is one of the following:
No Keys
Any needed key values were looked up in a previous step.
Only One Key
The process defaulted to the Key Lookup method because there is only one value for selecting
rows.
Key Lookup
The process defaulted to the Key Lookup method because all keys have DBMS indexes.
Scan - No Index
The process defaulted to the Scan method because all keys do not have DBMS indexes.
Scanning due to large number of keys
The process defaulted to the Scan method because a significant portion of the table must be
accessed.
User Forced Scan
The process executed a forced Scan method.
User Forced Key Lookup
The process executed a forced Key Lookup method.
Where Clause
Any user-specified condition.

When evaluating this information, note that the process will generally use a key lookup if a DBMS index
is available and a scan, if one is not. If a significant portion of the table must be accessed or generalized
selection criteria is used (for example, ORDER_ID < '100'), the process defaults to a scan, even if an index

Chapter 11. Archive Performance 313


is available. If the default method is undesirable from the standpoint of your database needs and
configuration, you can override it from the Relationships tab on the Access Definition Editor, or force the
process to default to a scan by using the Primary Key or Relationship Index Analysis feature to establish
needed indexes.

Key Information

Information about keys used to select rows in the table is also provided. This information indicates the
number of key values for which the table was searched. For the Start Table or a traversal from child table
to parent table, Primary Key information is shown. If traversal is from parent table to child table,
Relationship information, with the name of the relationship, is shown. The key information includes:
Lookup Keys
Number of key values used to select rows.
Direction
Direction of traversal as:
dependent
From parent to child.
parent From child to parent.
Indexed
Yes/No indicator for DBMS index.
Keys Per Cursor
User-specified number of key values included in the WHERE clause for each key lookup.
DB2 Lookup Cost
Estimated cost, in floating point format, of the Key Lookup method for the traversal, based on
existing RUNSTATS for the table. Only available for DB2/UDB database management systems.
DB2 Scan Cost
Estimated cost, in floating point format, of Scan method for the traversal, based on existing
RUNSTATS for the table. Only available for DB2/UDB database management systems.
Key Length
Number of bytes per key.
Access
The access method used to select rows in the table as:
Not Forcing
Default Key Lookup or Scan method was used.
User Forced Scan
Scan method selected in Access Definition.
User Forced Key Lookup
Lookup method selected in Access Definition.
Lookup SQL
The key lookup portion of the WHERE clause used to select rows in the table, in the form
columnname = hostvariable.

If indexes are not present, you may want to use the Relationship Index Analysis feature to establish them.
(See “Index Analysis” on page 321 for a description of the Relationship Index Analysis function.)

You might also want to modify the Keys Per Cursor value. The Key Lookup method uses an SQL
WHERE clause to select rows. For example, if 100 rows with unique customer IDs are processed, the
WHERE clause in the SELECT statement includes CUST_ID = hostvar. By default, a cursor/fetchloop is
opened once per key or 100 times, in the example, with a single key value as the host variable for each.

314 IBM Optim: Archive User Manual


However, you can change the Key Lookup Limit to override the default Keys Per Cursor setting. (For
more information, see “Key Lookup Limit” on page 321). If this setting is 5, the host variable includes
five key values for each lookup and a cursor/fetchloop is opened for every five keys. For example, in the
above example, the cursor/fetchloop is opened 20 times.

Note: The default for Key Lookup Limit is 1. However, you can increase the Key Lookup Limit up to
100 to decrease the number of keys per cursor.

DBMS Access Information

Information regarding database access is provided for each SELECT request to the DBMS that is executed
during the processing step. For example, if you use both generalized criteria such as ORDER_ID < '100'
and Point and Shoot to select Start Table rows for an Extract Process, the Statistical Report for the
processing step will include two DBMS Access entries, one for the key lookup to select the
Point-and-Shoot rows and one for the scan needed to select rows that match the generalized criteria.

DBMS Access Information includes:


Access Type
Method used to select rows:
Cursor Scan
A single cursor was used to read all rows in the table. Any user-specified Selection
Criteria was included in the WHERE clause for the SELECT statement.
PK Lookup
Traversal was from child to parent and the Key Lookup method was used.
FK Lookup
Traversal was from parent to child and the Key Lookup method was used.
Keys Per Cursor
Number of key values included in the WHERE clause for each key lookup.
Open Cursor
Number of times a cursor was opened for the SELECT statement.
Rows Fetched
Number of rows fetched for the SELECT statement.
Rows Written
Number of rows written to the Archive or Extract File.
Process Time
Time elapsed from the first OPEN CURSOR to the last CLOSE CURSOR in the Step.
Time in DBMS
Percentage of Process Time spent in DBMS calls for the Step.
Time in DBMS Archive Actions
Percentage of Process Time spent processing Archive Actions defined for the Archive Process for
the Step.
Rows Per Sec
Number of rows extracted per second of Process Time.

Delete Process Statistics


Statistical information for a Delete Process can be included in the Delete Process Report or in the Archive
Process Report, if specified.

For each table in a Delete Process, the Statistical Report provides detailed processing information as well
as basic information about the table that is processed. The Delete Impact Analysis section shows the

Chapter 11. Archive Performance 315


estimate amount of storage saved as a result of the deletion. This estimate does not account for any
additional DBMS storage being used to manage the row data.

A bold header indicates the table from which rows are deleted. At the end of the report the totals for the
process are displayed. This statistical information can indicate whether you can improve performance by
overriding the default method (scan or key lookup) of accessing a table. (For details on overriding the
default method, see “Table Access Strategy” on page 319.)

DBMS Name of the DBMS for the processed table.


Version DBMS version number.
Columns Number of columns in the table.
Cycle Yes/No indicator that the table is in a database management system (DBMS) relational
integrity (RI) cycle.
LOBs Yes/No indicator that the table contains LOB columns.
Rows to Delete Number of rows to be deleted in the table.
Row Length Number of bytes per row.
Array Deletes Yes/No indicator that Array Deletes are supported for this table.
Row Archive Actions Yes/No indicator that row level Archive Actions are defined for the Delete Process (for
example, Before Delete of Row).
Locked Table Yes/No indicator that the database table is locked until all rows in the Source File for that
table are processed.
Compare Row Yes/No indicator that the rows of data in the Source File were compared with rows in the
Contents database prior to deletion.
Include LOBs in Yes/No indicator that LOB columns are included in row comparison.
Compare
Commit Frequency Number of rows to be deleted before the changes are committed to the database.
Table Indexes Number of indexes for the table.

316 IBM Optim: Archive User Manual


Keys Per Delete Number of keys in the tables. (N/A is displayed if the Access Method for the table is User
Statement Forced Scan.)
Strategy The access method used to select rows in the table as:
No rows to Delete The table contains no rows to be deleted.
User Forced Scan User selected Scan method in Table Access Strategy dialog.
User Forced Key User selected Key Lookup method in the Table Access Strategy
Lookup dialog.
KeyLookup - All Keys The process defaulted to Key Lookup method because all keys
indexed have DBMS indexes.
Scan - No Index The process defaulted to Scan method because all keys do not
have DBMS indexes.
Open Cursor Number of times a cursor was opened for the Delete Process.
Rows Fetched Number of rows fetched for the Delete statement.
Delete Statements Number of Delete statements in the process.
Time in DBMS Reads Percentage of Elapsed Time spent in DBMS reads for the table.
Time in DBMS Deletes Percentage of Elapsed Time spent in DBMS deletes for the table.
Time in DBMS Percentage of Elapsed Time spent processing Archive Actions defined for the Delete
Archive Actions Process for the table.
Elapsed Time Total amount of elapsed time for the entire Delete Process.
Rows Per Sec Average number of rows deleted per second.

Delete Impact Analysis

This section of the Delete report provides estimates of storage saved as a result of the Optim deletion
process. This information is available when Optim is run in a DB2 LUW environment and an Oracle or
DB2 database and having valid and current statistics. If DBMS statistics are enabled at the database level,
Optim calculates the savings for each deleted object. These statistics are included in the Delete report,
regardless of the setting for statistics in the Delete Request. Statistics for each table and index are shown.
Index and table statistics for LOB data are not included in the estimate. A sample Delete report including
these statistics is shown below:

Chapter 11. Archive Performance 317


Status Status of indexes for each relationship:
Full An index exists with the complete set of required columns.
None No index exists with the required columns.
Partial One or more indexes exist with only a partial set of the required columns.
Estimated Storage Savings
Storage saved as a result of deleting the table or index. Savings for a deleted table is calculated
by obtaining the average row length for this table from the database catalog and multiplying it
by the number of rows deleted. For a deleted index, Optim computes the sum of columns in the
index and multiplies that value by the total number of rows being deleted.

Compression Statistics

When compression options are used in an Archive process, those statistics are included the Statistical
Information. Archive File and individual table compression values are shown as described below.

318 IBM Optim: Archive User Manual


The section for Table Compression Impact includes the following:
Compression Ratio
Fully qualified table name and compression status. Possible values are:
n Percentage of compression achieved for this table. This value is in the range 1 to 99.
Not-Compressed
User disabled compression for this table.
Auto-disabled
This table was not compressed because it did not meet the compression threshold.
File Compression Impact
When Archive File compression is used, this section of the report shows these details:
Compressed:
Size of the Archive File in GB or MB after compression.
Uncompressed:
Size of the Archive File in GB or MB before compression.
Compression Ratio:
Percentage that the Archive File has been compressed.

Table Access Strategy


Archive allows you to override the default method used to access tables for processing (that is, scan or
key lookup). Additionally, if Key Lookup is the method used, you can specify the maximum number of
key lookups performed at one time. Override the default method only if the statistical information in the
process report indicates the default method is less efficient.

Access Definition Editor

Use the Table Access and Key Lookup Limit grid columns on the Relationships tab of the Access
Definition Editor to modify the default access method for an Archive or Extract process. These grid
columns are displayed automatically if at least either contains a value other than the default. If the
columns are not displayed, click Options → Advanced Options to display the Table Access and Key
Lookup Limit grid columns on the Relationships tab.

Chapter 11. Archive Performance 319


Table Access Strategy Dialog

In the Delete Request Editor, click Tools → Edit Strategy to display the Table Access Strategy dialog with
the Access Method and Key Lookup Limit grid columns.

320 IBM Optim: Archive User Manual


Table Access/ Access Method

In an Access Definition, you can override the default method for accessing the parent or child table for
each relationship (that is, scan or key lookup). For a Delete Process, you can override the default method
for deleting rows from each table.
Default
Archive determines whether to use scan or key lookup.

Note: In general, Archive uses a key lookup when a DBMS index is available, and a scan when
no index is available. However, to access a significant portion of the table, a scan may be used,
even if an index exists.
Force Key Lookup
Force a key lookup for rows by using a WHERE clause to search for primary or foreign key
values.

Note: To verify that a DBMS index exists, click Tools → Relationship Index Analysis on the
Access Definition Editor. In the Delete Request Editor, right-click a table name in the grid and
click Analyze Primary Key Index for this table to open the Primary Key Index Analysis dialog.
For more information see “Index Analysis.”
Force Scan
Force Archive to read all rows in a table at one time.

Key Lookup Limit

The maximum number of key lookups performed at one time for a table. Valid values are 1 through 100.
By default, Archive looks up one key at a time.

Increasing the Key Lookup Limit might significantly improve performance. For example, if you enter 5
as the Key Lookup Limit and the key has a single column, 5 key values are searched in a single request
to the DBMS. For most sites, increasing the Key Lookup Limit to the maximum (100) is most effective.

Editing the Key Lookup Limit column for a table in a Delete Process requires the following:
v A Sybase ASE, Informix, or SQL Server database for the table.
v An index on the primary key.
v Compare Row Contents is not selected.
v No row level Archive Actions for the Delete Process (for example, Before Delete of Row).
v The table is not a parent table in a DBMS relationship.

Index Analysis
Missing DBMS indexes are the most frequent cause of performance problems in an Archive, Extract, or
Delete Process. Use the index analysis tools that are provided with Archive to analyze DBMS indexes for
relationships and primary keys and to create any needed indexes.

If the status of an index is shown as Partial, or None, you can create any needed indexes from a shortcut
menu option.

Relationship Index Analysis

Use the Relationship Index Analysis dialog to analyze DBMS indexes for relationships used with the
Access Definition and to create any needed indexes. The Relationship Index Analysis dialog lists each
selected relationship in the Access Definition, with an analysis of DBMS indexes for the corresponding
parent and child tables.

Chapter 11. Archive Performance 321


Note: Only indexes required for Archive (or an Extract) processing are analyzed.

Click Tools → Relationship Index Analysis in the Access Definition Editor to display the Relationship
Index Analysis dialog.

The relationship name and the name of the parent table are shown on the right side of the grid. The
analysis is presented on the left.

Primary Key Index Analysis

Use the Primary Key Index Analysis dialog to determine the tables in an Archive File that have an index
on the primary key, and to create any needed indexes. The Primary Key Index Analysis dialog lists each
table in the Source File, with an analysis of DBMS indexes for each table.

Right-click a table name in the Table Access Strategy dialog and click Analyze Primary Key Index for
this table or Analyze Primary Key Index for all tables to open the Primary Key Index Analysis dialog.

322 IBM Optim: Archive User Manual


The name of the table(s) is shown on the left side of the grid, and the status is presented on the right.

Status

The possible status of the indexes for the Relationship Index Analysis and Primary Key Index Analysis
dialogs are:
DBPK An index on the database primary key is defined for the table and is used to access the table.
(Primary Key Index Analysis only)
Unique
A unique index on an Optim primary key is defined for the table. The primary key columns may
be indexed in any order. (Primary Key Index Analysis only)
Full An index on an Optim primary key is defined for the table. The index includes all primary key
columns at the beginning of the index, in any order, but may include additional columns.
On the Relationship Index Analysis dialog, the Full status describes any DBPK, Unique, or Full
index on the primary key.
Partial An index on an Optim primary key is defined for the table. The index includes at least one
primary key column at the beginning of the index, but may include additional columns.
None No index exists with the necessary columns.
Indeterminate
Archive attempted to create DBMS indexes. Click Refresh to analyze the new data.
Not Analyzed
No indexes are needed. (Relationship Index Analysis only)
No PK
No primary key is defined for the table. (Primary Key Index Analysis only)
Table Not Found
The DB Alias referencing the database tables does not exist in the current Optim Directory.
(Primary Key Index Analysis only)

Chapter 11. Archive Performance 323


Multiple Database Connections
If the Maximum Database Connections setting in Product Options is greater than one, you can increase
the number of concurrent database connections for an Archive, Extract, or Delete Process. Increasing
database connections improves performance when processing large quantities of data by allowing
multiple threads to process rows in parallel.

Only tables with unique indexes are processed in parallel. Increasing the number of database connections
to process small amounts of data may decrease Archive and Extract performance rather than increase it,
however.
v In an Archive or Extract Process, the Start Table is processed in parallel only if a Point-and-Shoot list
has been specified. Multiple threads process (extract) rows concurrently from a single table in the
database (for example, threads extract data from the CUSTOMERS table at the same time). Data is not
extracted from multiple tables simultaneously.
v In a Delete Process, only requests with 1000 or more rows are processed in parallel and some tables
may not be processed in parallel due to database RI constraints. Multiple threads delete rows
concurrently from multiple tables in the database, using a single thread per table (for example, threads
delete rows from the CUSTOMERS and ORDERS tables at one time). If Lock Tables is selected, tables
are not processed in parallel.

You can use up to four database connections for each processor on your Optim Server. For example, if
your Server has two processors, then you can use as many as eight database connections for each process.
For performance reasons, you must select an even number of database connections.

Archive and Extract Processing

Click Database Connections on the General tab of the Archive Request Editor or Extract Request Editor
to increase the maximum number of connections and select an even number, up to the site maximum.

Delete Processing

Click Database Connections on the General tab of the Delete Request Editor, or the Delete tab of the
Archive Request Editor, to increase the maximum number of connections. Select an even number up to
the site maximum.

Note: A table is not processed in parallel from an Oracle or Sybase ASE database, when the Access
Method is User Forced Scan.

Buffer Size Limit


Archive uses a buffer that stores extracted rows during a fetch process and primary keys during a delete
process. When the buffer size is increased, the number of rows processed per second is also increased.
However, since an increased buffer size can also hinder performance by affecting memory usage, the
buffer should be set to the lowest value that also provides maximum performance.

When multiple database connections are used, Archive allocates the buffer size equally across the
connections. If the number of database connections is increased, Archive multiplies the buffer size by the
number of connections.

You can set a buffer size from 64K to 1024K and increase the value by 32K increments. The default buffer
size is 512K. The default value is recomended unless you are processing tables larger than 10 000 rows.

Archive and Extract Processing

To set the buffer size for an Extract or Archive Process, select a Fetch Buffer Size in the Database tab of
Product Options.

324 IBM Optim: Archive User Manual


Delete Processing

To set the buffer size for a Delete Process, select a Delete Buffer Size in the Database tab of Product
Options.

Chapter 11. Archive Performance 325


326 IBM Optim: Archive User Manual
Chapter 12. Command Line Interface — Processing Utilities
The Archive command line interface allows you to perform Archive tasks without using the graphical
user interface for Archive. You can use the command line interface to archive or restore archived data
programmatically.

You can use the command line to run one or more Archive, Restore, Delete, or Report Processes, or you
can use the command line to schedule a job. The command line interface can be run from the command
line, or automatically—in a batch file, or from another program.

You can also search and restore data in one process from the command line. The Search and Restore
Process is useful for restoring archived data programmatically, when you are unsure of the exact Archive
File that contains the archived data. Refer to “Search and Restore Process” on page 346 for complete
information.

Although you can execute these functions using the graphical user interface, it may be more convenient
to create one or more basic Action Requests (for example, Archive Request or Restore Request), which can
be run from the command line using parameters in a parameter file or in an override file. The file can be
generated by an external application.

Preparation

In preparation for command line processing, at least one typical, or “model” Action Request must be
prepared and saved. For example, a model Restore Request might reference Archive Files that represent
the data model (tables, relationships), and an Insert or Load Request that similarly matches the data
model. This model Restore Request provides the Request Selection Mode, and the Insert or Load Request
information for Restore processing. The Restore Request can also provide global selection criteria.

Command Line Tasks

Use the command line interface to automate:


v Archive, Delete, Restore, or Report Processes, providing relevant overriding specifications for a
previously created Action request in an application-generated parameter file.
v Multiple processes using a parameter file.
v Scheduled jobs that include several action requests.
v Searches and restorations of archived data.
v Restarting or retrying a Delete or Insert Process.

Note: You may also use the command line interface to automate Archive Directory Maintenance
functions. See Chapter 13, “Command Line Interface — Maintenance Utilities,” on page 367 for details.

Guidelines

A typical command begins with PR0CMND, followed by an operation argument, commandline keywords
and associated arguments. The following guidelines apply:
v The first operation argument must be prefixed with a forward slash (/) or dash (). To run a process,
for example, use /R or -R.
v A command-line keyword may be prefixed by a forward slash (/) or dash (), but it is not required.
Example: PST, /PST, and -PST are equal and valid keywords.
v Generally, command-line keywords can be specified in any order, separated by one or more spaces
without commas. When overrides are specified for a process defined in a parameter file, the OV

© Copyright IBM Corp. 1994, 2010 327


keyword must follow other command-line keywords and precede the override parameters. The first
override keyword and associated argument must begin on the following line, and each additional
override must be on a separate line. The END keyword must follow the last override, and must also be
on a separate line.
v A command-line keyword and associated argument are separated by an equals sign (=) or a colon (:),
with no intervening spaces.
v An override keyword and associated argument are separated by a blank space.
v Keywords are recognized without regard to case. (Most keywords are shown in this chapter using bold
and uppercase for emphasis.)
v Use double quotes to enclose a command-line keyword argument that includes a macro.
v An argument associated with a keyword that includes spaces must be enclosed in single or double
quotes.
v You can include all keywords and arguments in a parameter file and reference the parameter file on
the command line.
v In a parameter file, command-line keywords corresponding to a process request can be entered on one
or multiple lines. You can include several process requests in the file; each must begin with the TYPE
parameter.
v Use override keywords and arguments to override specifications in an action request.
v A keyword that is inappropriate for the type of processing requested may cause a fatal
conflicting-parameter error.
v The following relational operator symbols and mnemonics are acceptable for use in selection criteria
overrides: =, <, >, <=, >=, !=, !<, !>, <>, ^=, ^<, ^>, EQ, NE, LT, GT, LE, GE, BETWEEN, LIKE, IN, IS, NOT, NULL.
v Comments in a parameter or override file must begin on a separate line and start with two forward
slashes (//). Blank lines may also be included in the parameter stream.

Syntax Conventions

The syntax conventions used to describe these statements are:


KEYWORD
Keywords are shown in uppercase for emphasis, but can be specified in lower or mixed case.
text Variable text is shown in lowercase italics.
( ) Statement delimiter to group a series of qualifiers for a parameter.
[ ] Indicates an optional parameter. (Square brackets are not actually used in the command line.)
{ } Indicates a choice of two or more settings from which one (and only one) must be selected.
(Brackets are not actually used in the command line.)
| Separates options. (The pipe symbol is not actually used in the command line.)

Archive, Delete, Restore, and Report Processes


Use the following syntax, keywords, and overrides for Archive, Delete, Restore, and Report processes.

Syntax For Command Line Processing of Archive, Delete, Report, and


Restore Requests
Use the syntax in this topic when entering commands for command line processing of Archive, Delete,
Report, and Restore Requests.

Command Line
Commands use the following structure. Enter the command and all parameters on a single line.
PR0CMND /R { JOB=jobname | @path.paramfilename.txt | parameters

328 IBM Optim: Archive User Manual


Parameters
You can enter parameters with the command on the command line, or you can enter these parameters
into a text file (called a parameter file).

A parameter file can be reused whenever you need to run a task. You can also generate a parameter file
programmatically, which allows you to automate processes.

You can enter parameters for more than one process into a parameter file. This allows you to run
multiple processes by entering a single command on the command line. Enter the parameters for each
process on a separate line of the parameter file.
TYPE={ ARCHIVE | DELETE | REPORT | RESTORE }
REQUEST=identifier.name
[ STOP={ N | I | W | F } ]
[ OUTPUT=filename[ + ] ]
[ QUIET{ + | - } ]
[ MONITOR{ + | - } ]
[ SERVER={ arcservername | (local) } ]
[ PST=pstdirectory ]
[ OV={ [ “ ]override file name.txt[ ” ] | * } ] }

Overrides
Overrides allow you to override settings in a request when you use the request in command line
processing.

You can enter overrides into a parameter file after the parameters, or you can enter overrides into a
separate text file (called an override file) and designate the override file in a parameter.

The exact overrides that you use depend upon the type of process. Enter each override on a separate line.
Use the END override to mark the end of any overrides that you use.

Archive Process
[ SERVER { arcservername | (local) }]
[ AFFILE [ “ ]arc file name.af[ ” ] ]
[ AFXFILE [ “ ]idx file name.afx[ ” ] ]
[ GROUP groupidentifier ]
[ ADNAME identifier.name ]
[ DEFQUAL dbalias[ .cid ] ]
[ PNSFILE [ “ ]pns file name.pns[ ” ] ]
[ STARTTAB [ [ dbalias. ]cid. ]tablename ]
[ ROWLIMIT n ]
[ TABROWLIM [ [ dbalias. ]cid. ]tablename n ]
[ DEFERDAA { Y | N } ]
[ SEL [ [ dbalias. ]cid. ]tablename columnname operator value ]
...
[ SEL [ [ dbalias. ]cid. ]tablename columnname operator value ]
[ SQL [ [ dbalias. ]cid. ]tablename sqlwhereclause ]
...
[ SQL [ [ dbalias. ]cid. ]tablename sqlwhereclause ]
[ VAR variablename value ]

Delete Process
[ AFFILE [ “ ]arc file name.af[ ” ] ]
[ CFFILE [ “ ]con file name.cf[ ” ] ]
[ COMMFREQ n ]
[ LOCKTABS { Y | N } ]
[ DISROWLIM n ]

Chapter 12. Command Line Interface — Processing Utilities 329


Report Process
[ REPORTNAME identifier.name ]
[ SOURCEFILE [ “ ]arc file name.af[ ” ] ]
[ TITLE string ]
[ AUTOREPNEWTABLES{ Y | N }]
[ ARCHCRITDELIMITER { , | ; | : | >| }
[ ARCHCRITVALUE
( [ SERVER { { blank | (local) | (none) } | name } ] |
[ GROUP { { blank | (none) } | name } ] |
[ FILENAME name ] |
[ CREATOR cid ] |
[ CREATIONRANGE ( mm/dd/yyyy , mm/dd/yyyy ) ] |
[ RETENTIONRANGE ( { mm/dd/yyyy | days } , { mm/dd/yyyy | days } ) ] |
[ STORAGEPROFILE { { blank | (none) } | name } ] |
[ BACKUPDEVICE { { blank | (NO DEVICE ) } | CENTERA | NETWORKER | TIVOLI } ] |
[ DESC { { blank | (none) } | desc } ] |
[ TABLENAME name ]
[LITIGATIONHOLD { YES | NO | % } ])
[ ARCHCRITSORT { SERVER | GROUP | FILENAME | CREATOR | CREATIONRANGE | RETENTIONRANGE
| STORAGEPROFILE | BACKUPDEVICE | DESC | TABLENAME |LITIGATIONHOLD } {ASCENDING | DESCENDING }]
[ ARCHCRITCOMBINE { AND | OR } ]

Restore Process – General


[ DELARES {Y | N } ]
[ CONONERR {Y | N } ]
[ GLOCONN { AND | OR } ]
[ GLOSELCRIT [ [ dbalias. ]cid. ]tablename columnname operator value
...
[ GLOSELCRIT [ [ dbalias. ]cid. ]tablename columnname operator value
[ GLOCOLCONN [ [ dbalias. ]cid. ]tablename { AND | OR } ]
[ GLOSQLTEXT [ [ dbalias. ]cid. ]tablename sqlwhereclause ]
[ AUTOGENSUBXF { Y | N } ]

Restore Process – Archive File


[ [AFn]
{ [ SERVER { arcservername | (local) } ] AFFILE
[ “ ]arc file name.af[ ” ] | AFID n | GUID string }
[ STARTTAB [ [ dbalias. ]cid. ]tablename ]
[ ROWLIM n ]
[ REF [ [ dbalias. ]cid. ]tablename { Y | N } ]
[ GLOSELSQL { Y | N } ]
[ LOCSELCRIT [ [ dbalias. ]cid. ]tablename columnname operator value
...
[ LOCSELCRIT [ [ dbalias. ]cid. ]tablename columnname operator value
[ LOCCOLCONN [ [ dbalias. ]cid. ]tablename {AND | OR } ]
[ LOCSQLTEXT [ [ dbalias. ]cid. ]tablename sqlwhereclause ]
[ SUBXFFILE [ “ ]ext file name.xf[ ” ] ]
[ VAR variablename value ]

Restore Process – Insert or Load


[ [ CFFILE [ “ ]con file name.cf[ ” ] ]
[ TMNAME identifier.name ]
[ COLMAPID identifier ]
[ COLMAP [ [ dbalias. ]cid. ]tablename [identifier. ] name]
[ DESTQUAL dbalias[ .cid ] ]
[ DESTTABNAME [ [ dbalias. ]cid. ]srctablename [ [ dbalias. ]cid. ]desttablename ] ]

Restore Process – Insert


[ [ COMMFREQ n ]
[ PROCTYPE { INS | UPDINS | UPDATE/INSERT | UPDATE ONLY } ]
[ LOCKTABS { Y | N }]
[ DISROWLIM n ] |

330 IBM Optim: Archive User Manual


Restore Process – Load
[ MODE dbalias { INSERT | REPLACE | APPEND | TRUNCATE } ]
[ PERFLOAD dbalias { Y | N } ]
[ DELONSUCCESS dbalias { Y | N } ]
[ DELONFAILURE dbalias { Y | N } ]
[ WORKPATH dbalias path ]
[ SERVPATH dbalias path ] ] ]
[ END ]

Command-line Keywords For Archive, Delete, Report, and Restore


Requests
Use the following commands and parameters on the command line for Archive, Delete, Report, and
Restore Requests.

General
PR0CMND
The command to initiate command line processing. The character following PR is the number 0
(zero).
/R Command to run the specified job, action request(s) specified in a parameter file, or action
request specified on the command line. Use /R or -R.
JOB= Command to run a scheduled job from the command line. A scheduled job can include one or
more action requests and corresponding overrides. Use the Scheduling Editor to define the
parameters for a scheduled job. Refer to the Common Elements Manual for additional information.
The JOB keyword does not apply in a UNIX or Linux environment and is ignored.
jobname
Name or description of the job (30 character maximum).
@path.paramfilename.txt
@ followed by the full path and name of a text file of parameters for the process(es) to run. Enter
all parameters for each request on a single line of the file.
parameters
You can provide parameters for the process on the command line. Enter all parameters on the
same line as the rest of the command.

Parameters

Use the following parameters, whether in a parameter file or specified on the command line, as needed:
TYPE= Type of process as one of the following:
ARCHIVE
Archive data.
DELETE Delete archived data from the database.
REPORT Create a report from data in an Archive File.
RESTORE
Place archived data into the original or other database.
REQUEST=
The action request to be processed.
identifier.name
Two-part name of the action request.

Chapter 12. Command Line Interface — Processing Utilities 331


STOP= Error processing indicator. Can be used only in a parameter file, not on the command line or for
scheduled jobs. The error code is applied for the action request identified by preceding REQUEST
parameter before the next process, if any, begins.
Indicate the level of error for which processing must stop as one of the following:
N None; continue processing, regardless of errors (default).
I Stop processing if an informational, warning, or fatal error occurs (return code of 4 or
greater).
W Stop processing if a warning or fatal error occurs (return code of 8 or greater).
F Stop processing if a fatal error occurs (return code 12).
OUTPUT=
File for process reports for all processes in a parameter file. If you use the OUTPUT keyword more
than once, the last file specified is used for all processes.
If you do not use this keyword, the report is displayed after each process and you must close the
report dialog to execute the next process. In a UNIX or Linux environment, the report is
displayed to the console.
filename
The name of the file. If you do not provide the full path, the file is saved in the default
Data Directory, identified in Personal Options.
+ Append the report to an existing file.
QUIET Indicator for displaying prompts or error dialogs during all processes in a parameter file. If you
use the QUIET keyword more than once, the last specification is used for all processes.
In a UNIX or Linux environment, prompts and error dialogs are unavailable and the QUIET
setting is ignored.
+ Do not display prompts or error dialogs (default).
– Display prompts and error dialogs. If functional security is enabled, Invoke privilege is
required to run a process that displays editor interfaces. For example, the Invoke Archive
Request and the Invoke Insert Request privileges are required to run an Archive Process
that uses a named Insert Process when QUIET– is used.
MONITOR
Indicator for displaying progress dialogs during all processes in a parameter file. If you use the
MONITOR keyword more than once, the last specification is used for all processes.
In a UNIX or Linux environment, progress dialogs are unavailable and the MONITOR setting is
ignored.
+ Display progress dialogs.
– Do not display progress dialogs (default).
SERVER=
The server on which to process. Overrides any server specification in the action requests
processed from the command line.
Using this keyword when running a Restore Request, or in conjunction with the SERVER override
causes an error.
servername
The name of an Optim Server that is referenced in the Product Configuration File.
(local)
Process on the local Server. (Default)

332 IBM Optim: Archive User Manual


PST= The Optim Directory for processing. If processing uses the current (default) Optim Directory, this
keyword is not needed.
pstdirectory
Optim Directory name.
OV= Source of process overrides. The OV keyword must follow all other command line keywords.
overridefilename.txt
The name of a text file containing process overrides only, with each override on a
separate line.
* If you use a parameter file, overrides follow on successive lines of the parameter file. The
first override (keyword and associated argument) must begin on the following line, and
each additional override must be on a separate line.

An override file is the only method available to provide overrides unless you use a parameter
file. If using a parameter file, however, you can provide overrides in a text file or in the
parameter file with the END keyword following the last override.

Overrides For Archive, Delete, Report, and Restore Requests


Overrides allow you to override certain parameters in the Action Requests you run from the command
line, and in the objects referenced by them.

Archive Process
The following overrides are available for the Archive Process.
SERVER Override for the Optim Server specified in the Archive Request.
Using the SERVER override in conjunction with the SERVER keyword causes a fatal error.
servername
The name of an Optim Server that is referenced in the Product Configuration File.
(local)
Process on the local Server. (Default)
AFFILE Override for the Archive File name in the Archive Request.
arcfilename.af
The name of the Archive File. Provide the full path if the file is not in the default Archive
File Directory.
AFXFILE
Override for the Archive Index File name in the Archive Request.
idxfilename.afx
The name of the Archive Index File. Provide the full path if the file is not in the default
Archive Index File Directory.
GROUP Override for the group designation in the Archive Request.
groupidentifier
1- to 8-character name of the group for the Archive File. Group names can help qualify
and categorize Archive Files and the corresponding archived data and can be referenced
to locate one or more Archive Files for browsing or restoring data.
ADNAME Override for the local or named Access Definition referenced in the Archive Request.
identifier.name
Two-part name of an existing Access Definition.
DEFQUAL
Override for the Default Qualifier in the Access Definition used for processing.

Chapter 12. Command Line Interface — Processing Utilities 333


dbalias[.cid ]
One or two-part default qualifier for tables referenced in Access Definition.
PNSFILE
Override for Point and Shoot designation for the process.
pnsfilename.pns
The name of the Point and Shoot File. Provide the full path if the file is not in the default
Archive File Directory.
STARTTAB
Override for the Start Table specification in the Access Definition used in the process.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part Start Table name. If tablename is not fully qualified, the default
qualifier is used.
ROWLIMIT
Override for maximum number of rows setting in the Archive Request.
n 0 (to use the maximum limit) or a number from 1 to the maximum limit specified in
Product Options. If the row limit is reached, the Archive File is valid, but a Directory
entry is not created.
TABROWLIM
Override for Start Table row limit setting in the Archive Request.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part Start Table name. If tablename is not fully qualified, the default
qualifier is used.
n A number from 1 to 99999999 as the maximum number of rows to be extracted from the
Start Table.
DEFERDAA
Override for Defer Delete after Archive setting in the Archive Request.
Y Rows are not deleted in the Archive Process and must be deleted in a separate Delete
Process.
N Rows are deleted in the Archive Process
SEL Override for, or addition to, selection criteria specification for Archive Process. Selection criteria
must conform to SQL syntax. You can enter multiple SEL overrides in a command, but each SEL
override must be on a separate line.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
columnname
Name of column to which criteria applies.
operator
Logical operator appropriate for your DBMS.
value Value or list of values appropriate for the operator, expressed as literals or substitution
variables (:variablename)
SQL Override for SQL WHERE specification. You can enter multiple SQL overrides in a command, but
each SQL override must be on a separate line.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.

334 IBM Optim: Archive User Manual


sqlwhereclause
The SQL WHERE clause.
VAR Override for value in substitution variable used in the process.
variablename
Name of the substitution variable.
value The corresponding value for the variable.

Delete Process
For a Delete Process, or Archive Process that includes an undeferred Delete Process, the following
override parameters are available:
AFFILE Override for the Archive File name in the Delete Request.
arcfilename.af
The name of the Archive File. Provide the full path if the file is not in the default Archive
File Directory.
CFFILE Override for the Control File name in the Archive or Delete Request.
confilename.cf
The name of the Control File. Provide the full path if the file is not in the default Data
Directory.
COMMFREQ
Override for Commit Frequency setting for Delete processing.
n Specify any number between 1 and the maximum set in Product Options.
LOCKTABS
Override for Lock Tables option for Delete processing.
Y Lock tables during delete processing.
N Do not lock tables.
DISROWLIM
Override for Discard Row Limit setting in the Archive or Delete Request.
n 0 (to impose no limit) or a number from 1 to 99999999 to stop processing after the
specified number of rows are discarded and all rows in the array processed. You can
Restart or Retry a process that stops because the limit is reached.

Report Processing
The following overrides are available for processes that include a Report Process.

General

For a Report Process or Archive Process that includes a Report Process, the following override parameters
are available:
REPORTNAME
Override for the local or named Report Request referenced in an Archive Request. Do not use this
keyword if running a standalone Report Request.
identifier.name
Two-part name of the Report Request.

Source File

For a Report Process for a Source File (for example, an Archive File), the following override parameters
are available:

Chapter 12. Command Line Interface — Processing Utilities 335


SOURCEFILE
Override for the Source File name in the standalone Report Request to be processed.
arcfilename.af
The name of an Archive File for the report. Provide the full path if the file is not in the
default Archive File Directory.
TITLE Override for report title.
string Up to 40 characters to appear on each page of the report.
AUTOREPNEWTABLES
Override for the Automatically Report New Tables setting in the Report Request used for
processing.
Y Include all Source File tables in the report.
N Include only tables in the original Source File in the report.

Archive Directory

For a Report Process for an Archive Directory, the following override parameters are available:

ARCHCRITDELIMITER Override for the character used to separate criteria values. Recognized values are:
, ;
: |
ARCHCRITVALUE Override or addition to criteria in the Report Request. Criteria of the same type is overridden
in the Report Request while criteria of a type that is not in the Report Request is appended to
the end of the sort order. You can use one or more of the following:
SERVER Optim Server(s) for Directory entries to be listed.
blank, (Local), or (None) The local Server.
name 1 to 15 character name or
pattern for the Server.
GROUP Group(s) for Directory entries to be listed.
blank or (None) Entries with no specified
group name.
name 1 to 8-character name or
pattern.
FILENAME Name(s) of Archive File(s) for Directory entries to be listed.
name Name or pattern for Archive
File. (Required)
CREATOR Creator ID(s) for Directory entries to be listed.
cid 1 to 26-character name or
pattern. (Required)
CREATIONRANGE Range of creation dates for Directory entries to be listed.
mm/dd/yyyy Date after which Directory
entry was created. (Required)
mm/dd/yyyy Date before which Directory
entry was created. (Required)

336 IBM Optim: Archive User Manual


RETENTIONRANGE Retention range for Directory entries to be listed.

A valid retention range of dates (for example, 01/01/2010 ,


12/31/2010 to list entries for all files with retention period
ending in 2010.) or number of days (for example, 1 , 365 to
list all entries with retention period ending in next year.).
mm/dd/yyyy or days Date after which the Archive
File is to be deleted.
mm/dd/yyyy or days Date before which the
Archive File is to be deleted.
blank Entries with no retention
policy.
STORAGEPROFILE Name(s) of the Storage Profile(s) associated with Directory
entries to be listed.
blank or (None) Entries with no specified
Storage Profile.
name Name or pattern for Storage
Profile.
BACKUPDEVICE Name(s) of the backup device(s) type for Directory entries to
be listed.
blank or (No Device) Archive Files that are not
saved to a backup device.
Centera Archive Files saved to
Centera.
NetWorker Archive Files saved to
NetWorker.
Tivoli Archive Files saved to Tivoli.
DESC Description for the Directory entries to be listed.
blank or (None) Entries that do not have a
description.
desc 1 to 40 character name or
pattern of the description.
TABLENAME Name(s) of table(s) referenced by the directory entries to be
listed.
name Name or pattern of the table.
(required)
LITIGATIONHOLD Litigation Hold status for Directory entries to be listed.
YES Entries with Litigation Hold
value of Yes on Centera..

Chapter 12. Command Line Interface — Processing Utilities 337


NO Entries with Litigation Hold
value of No on Centera.
% Entries with any value for
Litigation Hold:
Yes - value is Yes
No - value is No
Unavailable - attempt to
connect to Centera failed or
the Archive File entry is
invalid
(None) - Archive File is not
stored on Centera and the
archive criteria are combined
with OR
Centera Advanced Retention
Management is not licensed -
Centera is not licensed for
Advanced Retention
Management and archive
criteria are combined with
OR.
Separate multiple values using the delimiter specified in the Report Request or using the
delimiter specified using the override.
ARCHCRITSORT Override that determines how Archive Directory Entries are listed in the Report.
criteria The type of criteria that determines the order. Recognized
criteria types are the same as that as the override:
ARCHCRITVALUE.
ASCENDING Arrange the criteria in ascending order.
DESCENDING Arrange the criteria in descending order.
ARCHCRITCOMBINE Override that determines how multiple criteria are combined for processing.
AND An Archive Directory Entry must match all criteria.
OR An Archive Directory Entry must match any criteria.

Restore Process
The Restore Process setting in the Restore Request determines whether archived data is restored using an
Insert Process or a Load Process. Archived data is restored by matching the Archive File to the
appropriate Insert or Load Request (from a list of requests referenced in the Restore Request) on the basis
of the setting for Insert (or Load) Request Selection Mode. If desired, you can provide overrides for one
or more settings in the Insert or Load Request selected at run time, using the following keywords.

General
DELARES
Override for Delete Subset Extract setting in the Restore Request used for processing.
Y Delete Subset Extract Files at the successful conclusion of the Restore Process.
N Retain Subset Extract Files.
CONONERR
Override for Continue Processing if Errors setting in the Restore Request used for processing.
Y Continue the processing any unprocessed Archive File if an error occurs.
N Stop the process on an error.

338 IBM Optim: Archive User Manual


GLOCONN
Override for multiple table criteria connector.
AND Data must match criteria for all tables.
OR Data must match criteria for any table.
GLOSELCRIT
Override for all global selection criteria specifications for a table in a Restore Process. Criteria
must conform to requirements described in Appendix A, “SQL Grammar for Search and Restore,”
on page 387, with global criteria overrides for each table and column in a separate statement.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
columnname
Name of column to which criteria applies.
operator
Logical operator.
value Value or list of values appropriate for the operator, expressed as literals or substitution
variables (:variablename)
GLOCOLCONN
Override for connector for all global selection criteria applied to a table.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
AND Restore data that meets criteria for all columns in the table.
OR Restore data that meets criteria for any columns in the table.
GLOSQLTEXT
Override for global SQL WHERE clause specifications for a table in a Restore Process. The
WHERE clause must conform to requirements described in Appendix A, “SQL Grammar for
Search and Restore,” on page 387, with overrides for each table in a separate statement.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
sqlwhereclause
The SQL WHERE clause.
AUTOGENSUBXF
Override for Automatically Generate Subset Extract Files setting in the Restore Request used for
processing.
Y Generate a name in the form PSTnnn.xf for each Subset Extract File as needed.
N Use the name provided in the Restore Request used for processing or with the override
keyword SUBXFFILE.

Archive File
[AFn] Override for Archive Files referenced in the Restore Request. You must use the AFFILE, AFID, or
GUID keywords to identify the Archive File to be processed.
n Sequential identifier, beginning with 1, for Archive File and any accompanying Insert or
Load overrides that follow.

Chapter 12. Command Line Interface — Processing Utilities 339


SERVER The Server, if any, for the Archive File designated by the accompanying AFFILE override. If used,
the SERVER override must be on the first line following the [AFn] keyword. If not, an error
condition results.
servername
Name of the Server on which the Archive File resides.
(local)
The Archive File resides on the local Server. (Default)
AFFILE The Archive File to be restored. The AFFILE override must be on the first line following the [AFn]
or, if applicable, the SERVER keyword. If not, an error condition results.
arcfilename.af
The name of the Archive File. Provide the full path if the file is not in the default Archive
File Directory.
AFID The identifier for the Archive File to be restored. The AFID override must be on the first line
following the [AFn] keyword. If not, an error condition results.
n An integer that identifies the Archive File.
GUID The Globally Unique Identifier (GUID) for an Archive File to be restored. The GUID override must
be on the first line following the [AFn] keyword. If not, an error condition results.
string A 38-character string that identifies the Archive File.

Note: At the time an Archive File is created, you can use a built-in variable with an Archive Action to
obtain and record the Archive File identifier or the GUID. The recorded identifier is then available to an
external application that builds a command line parameter file for restoring data. Refer to the Common
Elements Manual for additional information about using built-in variables with Archive Actions.
STARTTAB
Override for the Start Table specification in the Access Definition used to create the Archive File.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part Start Table name. If tablename is not fully qualified, the default
qualifier is used.
ROWLIM Maximum number of rows in the Archive File to process.
n 0 (to use the maximum limit) or a number from 1 to 99,999,999. Processing is terminated
when this limit is reached
REF Override for reference table designation in Archive File.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part name of any table other than the Start Table. If tablename is not
fully qualified, the default qualifier applies.
Y Process table as a Reference Table.
N Do not process the table as a Reference Table.
GLOSELSQL
Application of global criteria, defined in the Restore Request or with the GLOSELCRIT or
GLOSQLTEXT keywords, to Archive File.
Y Apply global selection criteria to Archive File.
N Do not apply global selection criteria to Archive File.
LOCSELCRIT
Local selection criteria for a table in a Restore Process. Criteria must conform to requirements
described in Appendix A, “SQL Grammar for Search and Restore,” on page 387, with local criteria
overrides for each table and column in a separate statement.

340 IBM Optim: Archive User Manual


[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
columnname
Name of column to which criteria applies.
operator
Logical operator.
value Value or list of values appropriate for the operator, expressed as literals or substitution
variables (:variablename)
LOCCOLCONN
Override for connector for all local selection criteria applied to a table.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
AND Restore data that meets criteria for all columns in the table.
OR Restore data that meets criteria for any columns in the table.
LOCSQLTEXT
Local SQL WHERE clause specifications for a table in the Archive File. The WHERE clause must
conform to requirements described in Appendix A, “SQL Grammar for Search and Restore,” on
page 387, with overrides for each table in a separate statement.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
sqlwhereclause
The SQL WHERE clause.
SUBXFFILE
The Subset Extract File generated if global or local selection criteria are applied to the Archive
File to be restored. This keyword is an alternative to generating the name automatically on the
basis of a setting in the Restore Request or an override for it.
extfilename.xf
The name of the Extract File. Provide the full path if the file is not in the default
Directory. The name is ignored if not needed.
VAR Value for substitution variable used to process the Archive File.
variablename
Name of the substitution variable.
value The corresponding value for the variable.

Insert or Load
CFFILE Override for the Control File name in the Insert or Load Request.
confilename.cf
The name of the Control File. Provide the full path if the file is not in the default Data
Directory.
TMNAME Override for the local or named Table Map referenced in the Insert or Load Request selected at
run time.
identifier.name
2-part name of an existing Table Map.

Chapter 12. Command Line Interface — Processing Utilities 341


COLMAPID
Override for default identifier for Column Maps referenced in the Table Map.
identifier
One to eight character identifier.
COLMAP Override for Column Map designation for a destination table referenced in the Table Map.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
[ identifier. ] name
One or two-part Column Map name. If name is not fully qualified, the Column Map ID is
used.
DESTQUAL
Override for Qualifier in the Table Map.
dbalias. [ cid]
One or two-part default qualifier for destination tables referenced in Table Map.
DESTTABNAME
Override for source to destination mapping in the Table Map.
[ [ dbalias. ] cid. ]
srctablename
One, two, or three-part name of a table in the Source File. If srctablename is not fully
qualified, the default Qualifier applies.
[ [ dbalias. ] cid. ]
desttablename
One, two, or three-part destination table name. If desttablename is not fully qualified, the
default Qualifier applies.

Insert

When the Restore Process mode is Insert, the following overrides pertain to the Insert Request that is
matched with the Archive File.
COMMFREQ
Override for Commit Frequency setting.
n Specify any number between 1 and the maximum set in Product Options.
PROCTYPE
Override for Process Option.
INS Insert data.
UPDINS Update and insert data.
UPDATE/INSERT
Update and insert data.
UPDATE ONLY
Update data only; do not insert.
LOCKTABS
Override for Lock Tables setting.
Y Lock tables during insert processing.
N Do not lock tables.

342 IBM Optim: Archive User Manual


DISROWLIM
Override for Discard Row Limit setting in the Insert Request.
n 0 (to impose no limit) or a number from 1 to 99999999 to stop processing after the
specified number of rows are discarded and all rows in the array processed. You can
Restart or Retry a process that stops because the limit is reached.

Load

When the Restore Process mode is Load, the following overrides pertain to the Load Request that is
matched with the Archive File.
MODE Loader processing mode for the database.
dbalias
The DB Alias for the database.
INSERT Insert rows into empty destination tables.
REPLACE
Delete all rows from destination before loading.
APPEND Load rows into destination, discarding duplicate rows or inserting them into exception
tables. (Oracle only.)
TRUNCATE
Delete all rows from destination before loading. (RI constraints must be disabled. Oracle
only.)
PERFLOAD
Override for Perform Load setting in Load Request.
dbalias
The DB Alias for the database.
Y Run the loader immediately after file conversion.
N Do not run the loader.
DELONSUCCESS
Override for delete files option when the Load Process completes successfully.
dbalias
The DB Alias for the database.
Y Delete files for the database referenced by dbalias.
N Do not delete files.
DELONFAILURE
Override for delete files option when the Load Process fails.
dbalias
The DB Alias for the database.
Y Delete files for the database referenced by dbalias.
N Do not delete files.
WORKPATH
Override for temporary loader files directory path.
dbalias
The DB Alias for the database.
path Path to location for files. Dive must be accessible to DBMS server and client, workstation
and network server.

Chapter 12. Command Line Interface — Processing Utilities 343


SERVPATH
Override for temporary loader files Server path. (DB2 only.)
dbalias
The DB Alias for the database.
path Path to location for files. Drive must be accessible to DBMS server and client, workstation
and network server.
END End of overrides in parameter file.

Examples (Running Archive and Restore Processes From Command


Line)
The following examples show command line usage for Archive and Restore Processes.

Run a Single Process from the Command Line


The following examples show how to run a single process from the command line.

To run a process directly from the command line, enter:


PR0CMND /R TYPE=type REQUEST=identifier.name
v To run an Archive Request named MARKET.YTD and display results, use:
PR0CMND /R PST=PSTDEMO TYPE=ARCHIVE REQUEST=MARKET.YTD
v To run an Archive Request named SALES.MONTHLY and add the results to an existing output file named
PLAN.TXT, use:
PR0CMND /R TYPE=ARCHIVE REQUEST=SALES.MONTHLY OUTPUT=PLAN.TXT+
v To run a Restore Request named MARKET.REFRESH, display prompts and error dialogs during the
process, and write results to an output file named RESULTS.TXT, use:
PR0CMND /R TYPE=RESTORE REQUEST=MARKET.REFRESH OUTPUT=RESULTS.TXT QUIET

Run One or More Processes as a Scheduled Job from the Command Line
The following examples show how to run one or more processes as a scheduled job from the command
line.

You can create scheduled jobs using the Scheduling Editor. Refer to the Common Elements Manual for
details.

To run a scheduled job directly from the command line, use:


PR0CMND /R JOB='jobname'
v To run a job named CUSTDATA and write the results to an output file named CUSTOUT.TXT, specify:
PR0CMND /R JOB='CUSTDATA' OUTPUT=C:\CUSTOUT.TXT
v To run the same job and display prompts and error dialogs during the process, specify:
PR0CMND /R JOB='CUSTDATA' OUTPUT=C:\CUSTOUT.TXT QUIET-
v To run a job named PAYROLL and display information dialogs during the process, specify:
PR0CMND /R JOB='PAYROLL' OUTPUT=PAY.TXT MONITOR+

Run One or More Processes Using a Parameter File


The following examples show how to run one or more processes using a parameter file.

To run one or more processes from a file, use:


PR0CMND /R @filename

For example, to run processes in a parameter file named STATS.TXT, enter:


PR0CMND /R @C:\STATS.TXT

344 IBM Optim: Archive User Manual


Parameter File Format

In this example, STATS.TXT includes the following:


TYPE=ARCHIVE REQUEST=MONTHLY.SALES STOP=WARNING
TYPE=ARCHIVE REQUEST=MONTHLY.QUOTAS
TYPE=ARCHIVE REQUEST=SALES.YTD STOP=FATAL

Run a Process Using an Override File


The following examples show how to run a process using an override file.

To run an Archive Request named SALES.CUST from the command line, and apply overrides from a file
named CHANGES.TXT, enter:
PR0CMND /R TYPE=ARCHIVE REQUEST=SALES.CUST OV=CHANGES.TXT

In this example, CHANGES.TXT includes the following:


DEFQUAL ORACLE1.TELEM
STARTTAB CUSTOMERS
ROWLIMIT 600
SQL CUSTOMERS ST='NJ' AND ZIP='08540'

Run a Process Using a Parameter File with Overrides


The following examples show how to run a process using a parameter file with overrides.

Archive Parameter File Example A

To run an Archive Request named SALES.CUST using a parameter file named LEADS.TXT that supplies
command-line and override keywords, enter:
PR0CMND /R @C:\TEMP\LEADS.TXT

File Format

In this example, C:\TEMP\LEADS.TXT includes the following:


TYPE=ARCHIVE REQUEST=SALES.CUST OV=*
DEFQUAL ORACLE1.TELEM
STARTTAB CUSTOMERS
ROWLIMIT 600
SEL CUSTOMERS CUST_ID>'1234'
END

Archive Parameter File Example B

To run an Archive Request named MARKET.SALES and write the process report to an output file, using a
parameter file named STATS.TXT that supplies command-line and override keywords and stops processing
if a Warning message results, enter:
PR0CMND /R @C:\TEMP\STATS.TXT /OUTPUT=NEWSTATS.TXT

File Format

In this example, the parameter file C:\TEMP\STATS.TXT includes the following:


TYPE=ARCHIVE REQUEST=MARKET.SALES STOP=W OV=*
SERVER ARCHIVSERV
AFFILE Y:\ARCHV\APRLDATA.AF
AFXFILE Y:\ARCHV\APRLDATA.AFX
ADNAME LISTS.APR98
DEFQUAL UDB98.TELEM

Chapter 12. Command Line Interface — Processing Utilities 345


VAR STATE 'NJ'
//Other variables to use default values
ROWLIMIT 400
END

Restore Parameter File Example

To restore data from two Archive Files using a parameter file named ORDS.TXT that supplies
command-line and override keywords, enter:
PR0CMND /R @C:\TEMP\ORDS.TXT

File Format

In this example, the parameter file C:\TEMP\ORDS.TXT includes the following:


TYPE=RESTORE REQUEST=RESTR.ORDERS OV=*
DELARES YES
CONONERR YES
[AF1]
SERVER ARCHIVSERV
AFFILE Y:\ARCHV\APRLDATA.AF
GLOSELSQL NO
CFFILE APRIL.CF
PROCTYPE UPDINS
[AF2]
AFID 767
GLOSELSQL YES
SUBXFFILE GLOBNJ.XF
END

Search and Restore Process


Command line Search and Restore processing is useful for restoring archived data programmatically,
when you are unsure of the Archive File that contains the archived data.

Although you can search Archive Files using the graphical user interface (and then restore the desired
data), you cannot catalog or save a combined Search and Restore Process. You can, however, define
Search and Restore Process parameters and save them in a parameter file, or in an override file.

Preparation

In preparation for Search and Restore processing, you must prepare and save at least one typical, or
“model” Restore Request. The model Restore Request must reference one or more Archive Files, and an
Insert or Load Request that represents the data model (tables, relationships). The model Restore Request
provides the Request Selection Mode, and the Insert or Load Request information for the Restore portion
of the Search and Restore processing. The request can also provide global selection criteria.

Archive File Filters

Archive Files that match specific file filtering keywords and values are selected for Search and Restore
processing. The filter parameters are provided as override keywords in a parameter file or override file.

Search Criteria

You can also provide search criteria in the override file or parameter file. The search criteria are applied
against data in Archive Files that match the filter criteria. Thus, Archive Files that match the filter criteria
are selected for inclusion in the Search and Restore processing and, depending upon a Personal Options
setting or an override, either files or indexes are for data that matches the search criteria. Search criteria
syntax is identical to selection criteria syntax for a Restore Request.

346 IBM Optim: Archive User Manual


Archive Files

After Archive Files that match the filter criteria are selected, the model Restore Request is used to process
the files.

Selection Criteria

At runtime, selection criteria are used to determine the specific data to be restored. Global criteria
specified in the parameter file or the override file take the place of any global selection criteria in the
model Restore Request. Local selection criteria, if any, in the model Restore Request are ignored.

Restoration

Search and Restore processing uses the Restore Selection mode and Insert or Load Request information
from the model Restore Request. You can override Insert or Load parameters, with overrides applying to
all processing. You cannot provide separate overrides for each Archive File as in the [AFn] overrides for a
Restore Process.

Parameter File

You can run a Search and Restore Process from the command line by using a parameter file or an
override file. For example, to use a parameter file, enter:
PR0CMND /R @C:\TEMP\OVERARC.TXT

The parameter file must contain all required keywords and values for the Search and Restore Process. In
this example, C:\TEMP\OVERARC.TXT identifies the parameter file, which must include the
TYPE=SearchAndRestore keyword and value, and the name of the model Restore Request. The value for
the OV=* keyword indicates that Search and Restore overrides follow on subsequent lines.

Override File

To provide parameters on the command line and reference an override file, enter:
PR0CMND /R TYPE=SearchAndRestore REQUEST=L_DB250.CUST OV=C:\TEMP\SEARES.TXT

For this example, C:\TEMP\SEARES.TXT identifies the file containing the override keywords and values for
the Search and Restore Process.

Note: Whether in an override file or as part of a parameter file, each override keyword and value must
be on a separate line with an END statement to mark the last parameter or override.

Command Line Processing of Search and Restore Requests


Use the syntax in this topic when entering commands for command line processing of Search and Restore
requests.

Commands use the following structure. Enter the command and all parameters on a single line.
PR0CMND /R
{@path.paramfilename.txt|TYPE= SEARCHANDRESTORE
REQUEST= identifier.name}[OV={[“]overridefilename.txt[”]|*}]
PR0CMND
The command to initiate command line processing. The character following PR is the number 0
(zero).
/R Command to run the specified job, action request(s) specified in a parameter file, or action
request specified on the command line. Use /R or –R.
TYPE= Type of process as one of the following:

Chapter 12. Command Line Interface — Processing Utilities 347


SEARCHANDRESTORE
Search and Restore process.
REQUEST=
The Restore Request to be processed.
identifier.name
Two-part name of the action request.
OV= Source of process overrides. The OV keyword must follow all other command line keywords.
overridefilename.txt
The name of a text file containing process overrides only, with each override on a
separate line.
* If you use a parameter file, overrides follow on successive lines of the parameter file. The
first override (keyword and associated argument) must begin on the following line, and
each additional override must be on a separate line.
An override file is the only method available to provide overrides unless you use a parameter
file. If using a parameter file, however, you can provide overrides in a text file or in the
parameter file with the END keyword following the last override.

Search and Restore Overrides


Use the following overrides for search and restore requests.

You can enter overrides into a parameter file after the parameters, or you can enter overrides into a
separate text file (called an override file) and designate the override file in a parameter.

The exact overrides that you use depend upon the type of process. Enter each override on a separate line.
Use the END override to mark the end of any overrides that you use.
[ FILTER
{ [ FILENAME [ “ ]arcfilename.af[ ” ] ] |
[ SERVERNAME { arcservername | (local) } ] |
[ GROUP groupidentifier ] |
[ CREATOR cid ] |
[ TABLENAME dbalias.cid.tablename ] |
[ DESC description ] |
[ STARTDATE mm/dd/yyyy ] |
[ ENDDATE mm/dd/yyyy ] } ]

348 IBM Optim: Archive User Manual


FILTER Filtering overrides to describe the registered Archive File(s) to be searched for data to restore. Use
the FILTER keyword as many times as needed to select the files to search.

You can use the % (percent) symbol and the _ (underscore) as wildcard values. Use the % (percent)
symbol to represent any number of characters or the _ (underscore) to represent a single character.
If a specific filter is not used, the default wildcard value is assumed.

Valid filters and values are:


FILENAME The registered Archive File(s) to be searched.
arcfilename.af Archive File name or a pattern using
wildcards.
SERVERNAME Optim Server(s) on which Archive Files reside.
arcservername Name or pattern for Server(s).
(local) Archive Files reside on the local Server.
(Default)
GROUP Group identifier for Archive File(s).
groupidentifier 1- to 8-character identifier or pattern.
CREATOR Creator ID associated with Archive File(s).
cid Creator ID or pattern.
TABLENAME Table in Archive File(s).
dbalias.cid.tablename Fully qualified table name, or pattern.
DESC Description associated with Archive File(s).
description 1- to 8-character description or pattern.
STARTDATE Earliest creation date for Archive File(s).
mm/dd/yyyy Date or pattern.
ENDDATE Latest creation date for Archive File(s).
mm/dd/yyyy Date or pattern.

Search Overrides
You can use the following overrides for Search and Restore requests.
[ GLOCONN {AND | OR } ]
[ GLOSELCRIT [ [ dbalias. ]cid. ]tablename columnname operator value ]
...
[ GLOSELCRIT [ [ dbalias. ]cid. ]tablename columnname operator value ]
[ GLOCOLCONN [ [ dbalias. ]cid. ]tablename { AND | OR } ]
[ GLOSQLTEXT [ [ dbalias. ]cid. ]tablename sqlwhereclause ]
[ AUTOGENSUBXF { Y | N } ]
[ SORTORDER { A | D } ]
[ MAXFILES n ]
[ ONLYFIRST { Y | N } ]
[ IGNINACC { Y | N } ]
[ CONONERR { Y | N } ]
[ DELARES { Y | N } ]
[ SEASCOPE { P | A | I } ]
GLOCONN
Connector for criteria applied to more than one table.
AND Data in Archive File must match criteria for all tables.
OR Data in Archive File must match criteria for any table.
GLOSELCRIT
Global criteria specifications for data to be restored. Criteria must conform to requirements

Chapter 12. Command Line Interface — Processing Utilities 349


described in Appendix A, “SQL Grammar for Search and Restore,” on page 387, with global
criteria for each table and column in a separate statement. The criteria are applied to any Archive
File that meets the filtering criteria and override any global criteria specifications in the model
Restore Request.
[ [ dbalias. ]cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
columnname
Name of column to which criteria applies.
operator
Logical operator.
value Value or list of values appropriate for the operator, expressed as literals or substitution
variables (:variablename)
GLOCOLCONN
Connector for all global criteria applied to a table.
[ [ dbalias. ] cid. ] tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
AND Restore data that meets criteria for all columns in the table.
OR Restore data that meets criteria for any columns in the table.
GLOSQLTEXT
Global SQL WHERE clause criteria for data to be restored. The WHERE clause must conform to
requirements described in Appendix A, “SQL Grammar for Search and Restore,” on page 387,
with WHERE clauses for each table in a separate statement. The WHERE clause is applied to any
Archive File that meets the filtering criteria and overrides any global criteria specifications in the
model Restore Request.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
sqlwhereclause
The SQL WHERE clause.
AUTOGENSUBXF
Override for Automatically Generate Subset Extract Files setting in the Restore Request used for
processing.
Y Generate a name in the form PSTnnn.xf for each Subset Extract File as needed.
N Use the name provided in the Restore Request used for processing or with the override
keyword SUBXFFILE.
SORTORDER
Order in which Archive Files that meet Filter and selection criteria are processed.
A Process the oldest file first and the newest file last.
D Process the newest file first and the oldest file last.
MAXFILES
Maximum number of Archive Files that can be processed. Processing terminates if the number of
files that match Filter and selection criteria exceeds the limit.
n 0 (to impose no limit) or a number from 1 to 99999999 to stop processing after the

350 IBM Optim: Archive User Manual


specified number of files match the Filter and selection criteria. You can Restart or Retry a
process that stops because the limit is reached.
ONLYFIRST
Files from which to restore data.
Y Only restore data from the first file that matches the filter and search criteria. (Use the
SORTORDER option to establish the file that is first.)
N Restore data from all files that match the filter and search criteria. (You can use the
SORTORDER option to establish the order in which the data is restored.)
IGNINACC
Indicator for processing files located on inaccessible Servers.
Y Exclude inaccessible files from the subsequent Insert or Load phase of processing
(inaccessible files are noted in the information area of the processing report).
N Terminate Search and Restore processing when a file is inaccessible.
CONONERR
Indicator for processing when errors occur.
Y Insert or Load Processing errors are noted in the process report and processing continues
with the next Archive File.
N Insert or Load Processing errors are noted in the process report and further processing is
halted.
DELARES
Indicator for treatment of Subset Extract Files, if any, at the conclusion of the Restore Process.
Y Delete Subset Extract Files.
N Retain Subset Extract Files.
SEASCOPE
Indicator for scope of search.
P Search on the basis of the Only Use Index To Perform Search setting in Personal Options
(default).
A Search Archive Indexes and, if indexes are insufficient, search the native file system.
I Limit search to Archive Indexes.

Insert
[ CFFILE [ “ ]confilename.cf[ ” ] ]
[ TMNAME identifier.name ]
[ COLMAPID identifier ]
[ COLMAP [ [ dbalias. ]cid. ]tablename [identifier. ] name ]
[ DESTQUAL dbalias[ .cid ] ]
[ DESTTABNAME [ [ [ dbalias. ]cid. ]srctablename ] [ [ [ dbalias. ]cid. ]desttablename ] ]
[ COMMFREQ n ]
[ PROCTYPE { INS | UPDINS | UPDATE/INSERT | UPDATE ONLY } ]
[ LOCKTABS { Y | N }]
[ DISROWLIM n ]
END
CFFILE Override for the Control File name in the Insert or Load Request.
confilename.cf
The name of the Control File. Provide the full path if the file is not in the default Data
Directory.
TMNAME Override for the local or named Table Map referenced in the Insert or Load Request selected at
run time.

Chapter 12. Command Line Interface — Processing Utilities 351


identifier.name
Two-part name of an existing Table Map.
COLMAPID
Override for default identifier for Column Maps referenced in the Table Map.
identifier
One- to eight-character identifier.
COLMAP Override for Column Map designation for a destination table referenced in the Table Map.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
[ identifier. ] name
One or two-part Column Map name. If name is not fully qualified, the Column Map ID is
used.
DESTQUAL
Override for Qualifier in the Table Map.
dbalias. [ cid]
One or two-part default qualifier for destination tables referenced in Table Map.
DESTTABNAME
Override for source to destination mapping in the Table Map.
[ [ dbalias. ] cid. ] srctablename
One, two, or three-part name of a table in the Source File. If srctablename is not fully
qualified, the default Qualifier applies.
[ [ dbalias. ] cid. ] desttablename
One, two, or three-part destination table name. If desttablename is not fully qualified, the
default Qualifier applies.
COMMFREQ
Override for Commit Frequency setting.
n Specify any number between 1 and the maximum set in Product Options.
PROCTYPE
Override for Process Option.
INS Insert data.
UPDINS Update and insert data (same as UPDATE/INSERT).
UPDATE/INSERT
Update and insert data (same as UPDINS).
UPDATE ONLY
Update data only. Do not insert.
LOCKTABS
Override for Lock Tables setting.
Y Lock tables during insert processing.
N Do not lock tables.
DISROWLIM
Override for Discard Row Limit setting in the Insert Request.
n 0 (to impose no limit) or a number from 1 to 99999999 to stop processing after the
specified number of rows are discarded and all rows in the array processed. You can
Restart or Retry a process that stops because the limit is reached.

352 IBM Optim: Archive User Manual


END End of Search and Restore Process.

Load
[ CFFILE [ “ ]confilename.cf[ ” ] ]
[ TMNAME identifier.name ]
[ COLMAPID identifier ]
[ COLMAP [ [ dbalias. ]cid. ]tablename [identifier. ] name ]
[ DESTQUAL dbalias[ .cid ] ]
[ DESTTABNAME [ [ [ dbalias. ]cid. ]srctablename ] [ [ [ dbalias. ]cid. ]desttablename ] ]
[ MODE dbalias { INSERT | REPLACE | APPEND | TRUNCATE } ]
[ PERFLOAD dbalias { Y | N } ]
[ DELONSUCCESS dbalias { Y | N } ]
[ DELONFAILURE dbalias { Y | N } ]
[ WORKPATH dbalias path ]
[ SERVPATH dbalias path ] ] ]
END
CFFILE Override for the Control File name in the Insert or Load Request.
confilename.cf
The name of the Control File. Provide the full path if the file is not in the default Data
Directory.
TMNAME Override for the local or named Table Map referenced in the Insert or Load Request selected at
run time.
identifier.name
Two-part name of an existing Table Map.
COLMAPID
Override for default identifier for Column Maps referenced in the Table Map.
identifier
One- to eight-character identifier.
COLMAP Override for Column Map designation for a destination table referenced in the Table Map.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
[ identifier. ] name
One or two-part Column Map name. If name is not fully qualified, the Column Map ID is
used.
DESTQUAL
Override for Qualifier in the Table Map.
dbalias. [ cid]
One or two-part default qualifier for destination tables referenced in Table Map.
DESTTABNAME
Override for source to destination mapping in the Table Map.
[ [ dbalias. ] cid. ] srctablename
One, two, or three-part name of a table in the Source File. If srctablename is not fully
qualified, the default Qualifier applies.
[ [ dbalias. ] cid. ] desttablename
One, two, or three-part destination table name. If desttablename is not fully qualified, the
default Qualifier applies.
MODE Loader processing mode for the database.
dbalias
The DBAlias for the database.

Chapter 12. Command Line Interface — Processing Utilities 353


INSERT Insert rows into empty destination tables.
REPLACE
Delete all rows from destination before loading.
APPEND Load rows into destination, discarding duplicate rows or inserting them into exception
tables. (Oracle only.)
TRUNCATE
Delete all rows from destination before loading. (RI constraints must be disabled. Oracle
only.)
PERFLOAD
Override for Perform Load setting in Load Request.
dbalias
The DBAlias for the database.
Y Run the loader immediately after file conversion.
N Do not run the loader.
DELONSUCCESS
Override for delete files option when the Load Process completes successfully.
dbalias
The DBAlias for the database.
Y Delete files for the database referenced by dbalias.
N Do not delete files.
DELONFAILURE
Override for delete files option when the Load Process fails.
dbalias
The DBAlias for the database.
Y Delete files for the database referenced by dbalias.
N Do not delete files.
WORKPATH
Override for temporary loader files directory path.
dbalias
The DBAlias for the database.
path Path to location for files. Drive must be accessible to DBMS server and client, workstation
and network server.
SERVPATH
Override for temporary loader files Server path. (DB2 UDB only.)
dbalias
The DBAlias for the database.
path Path to location for files. drive must be accessible to DBMS server and client, workstation
and network server.
END End of Search and Restore Process.

Command-line Keywords For Search and Restore Processing


Use the following command line keywords for Search and Restore processing.

354 IBM Optim: Archive User Manual


PR0CMND
The command to initiate command line processing. The character following PR is the number 0
(zero).
/R Command to run the specified job, action request(s) specified in a parameter file, or action
request specified on the command line. Use /R or –R.
TYPE= Type of process as one of the following:
SEARCHANDRESTORE
Search and Restore process.
REQUEST=
The Restore Request to be processed.
identifier.name
Two-part name of the action request.
OV= Source of process overrides. The OV keyword must follow all other command line keywords.
overridefilename.txt
The name of a text file containing process overrides only, with each override on a
separate line.
* If you use a parameter file, overrides follow on successive lines of the parameter file. The
first override (keyword and associated argument) must begin on the following line, and
each additional override must be on a separate line.
An override file is the only method available to provide overrides unless you use a parameter
file. If using a parameter file, however, you can provide overrides in a text file or in the
parameter file with the END keyword following the last override.

Search and Restore Filters


Use the following filtering parameters to describe the registered Archive File(s) to be searched for data to
restore. Use the FILTER keyword as many times as needed to select the files to search.

Chapter 12. Command Line Interface — Processing Utilities 355


FILTER You can use the % (percent) symbol and the _ (underscore) as wildcard values. Use the % (percent)
symbol to represent any number of characters or the _ (underscore) to represent a single character.
If a specific filter is not used, the default wildcard value is assumed.

Valid filters and values are:


FILENAME The registered Archive File(s) to be searched.
arcfilename.af Archive File name or a pattern using
wildcards.
SERVERNAME Optim Server(s) on which Archive Files reside.
arcservername Name or pattern for Server(s).
(local) Archive Files reside on the local Server.
(Default)
GROUP Group identifier for Archive File(s).
groupidentifier 1- to 8-character identifier or pattern.
CREATOR Creator ID associated with Archive File(s).
cid Creator ID or pattern.
TABLENAME Table in Archive File(s).
dbalias.cid.tablename Fully qualified table name, or pattern.
DESC Description associated with Archive File(s).
description 1- to 8-character description or pattern.
STARTDATE Earliest creation date for Archive File(s).
mm/dd/yyyy Date or pattern.
ENDDATE Latest creation date for Archive File(s).
mm/dd/yyyy Date or pattern.

Search Criteria and Parameters


Use the following overrides to specify selection criteria for data to be restored.
GLOCONN
Connector for criteria applied to more than one table.
AND Data in Archive File must match criteria for all tables.
OR Data in Archive File must match criteria for any table.
GLOSELCRIT
Global criteria specifications for data to be restored. Criteria must conform to requirements
described in Appendix A, “SQL Grammar for Search and Restore,” on page 387, with global
criteria for each table and column in a separate statement. The criteria are applied to any Archive
File that meets the filtering criteria and override any global criteria specifications in the model
Restore Request.
[ [ dbalias. ]cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
columnname
Name of column to which criteria applies.
operator
Logical operator.
value Value or list of values appropriate for the operator, expressed as literals or substitution
variables (:variablename)

356 IBM Optim: Archive User Manual


GLOCOLCONN
Connector for all global criteria applied to a table.
[ [ dbalias. ] cid. ] tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
AND Restore data that meets criteria for all columns in the table.
OR Restore data that meets criteria for any columns in the table.
GLOSQLTEXT
Global SQL WHERE clause criteria for data to be restored. The WHERE clause must conform to
requirements described in Appendix A, “SQL Grammar for Search and Restore,” on page 387,
with WHERE clauses for each table in a separate statement. The WHERE clause is applied to any
Archive File that meets the filtering criteria and overrides any global criteria specifications in the
model Restore Request.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
sqlwhereclause
The SQL WHERE clause.
AUTOGENSUBXF
Override for Automatically Generate Subset Extract Files setting in the Restore Request used for
processing.
Y Generate a name in the form PSTnnn.xf for each Subset Extract File as needed.
N Use the name provided in the Restore Request used for processing or with the override
keyword SUBXFFILE.
SORTORDER
Order in which Archive Files that meet Filter and selection criteria are processed.
A Process the oldest file first and the newest file last.
D Process the newest file first and the oldest file last.
MAXFILES
Maximum number of Archive Files that can be processed. Processing terminates if the number of
files that match Filter and selection criteria exceeds the limit.
n 0 (to impose no limit) or a number from 1 to 99999999 to stop processing after the
specified number of files match the Filter and selection criteria. You can Restart or Retry a
process that stops because the limit is reached.
ONLYFIRST
Files from which to restore data.
Y Only restore data from the first file that matches the filter and search criteria. (Use the
SORTORDER option to establish the file that is first.)
N Restore data from all files that match the filter and search criteria. (You can use the
SORTORDER option to establish the order in which the data is restored.)
IGNINACC
Indicator for processing files located on inaccessible Servers.
Y Exclude inaccessible files from the subsequent Insert or Load phase of processing
(inaccessible files are noted in the information area of the processing report).
N Terminate Search and Restore processing when a file is inaccessible.

Chapter 12. Command Line Interface — Processing Utilities 357


CONONERR
Indicator for processing when errors occur.
Y Insert or Load Processing errors are noted in the process report and processing continues
with the next Archive File.
N Insert or Load Processing errors are noted in the process report and further processing is
halted.
DELARES
Indicator for treatment of Subset Extract Files, if any, at the conclusion of the Restore Process.
Y Delete Subset Extract Files.
N Retain Subset Extract Files.
SEASCOPE
Indicator for scope of search.
P Search on the basis of the Only Use Index To Perform Search setting in Personal Options
(default).
A Search Archive Indexes and, if indexes are insufficient, search the native file system.
I Limit search to Archive Indexes.

Restore Process
Use the following overrides to control how the Search and Restore Process restores data to your database.

Search and Restore processing uses the Restore Selection mode and Insert or Load Request information
from the model Restore Request and unless you override Insert or Load parameters, Insert or Load
Requests are matched with Archive files in the normal way. Overrides, however, apply to all processing.
You cannot provide separate overrides for each Archive File as in the [AFn] overrides for a Restore
Process.

Insert or Load
CFFILE Override for the Control File name in the Insert or Load Request.
confilename.cf
The name of the Control File. Provide the full path if the file is not in the default Data
Directory.
TMNAME Override for the local or named Table Map referenced in the Insert or Load Request selected at
run time.
identifier.name
Two-part name of an existing Table Map.
COLMAPID
Override for default identifier for Column Maps referenced in the Table Map.
identifier
One- to eight-character identifier.
COLMAP Override for Column Map designation for a destination table referenced in the Table Map.
[ [ dbalias. ] cid. ]tablename
One, two, or three-part table name. If tablename is not fully qualified, the default qualifier
is used.
[ identifier. ] name
One or two-part Column Map name. If name is not fully qualified, the Column Map ID is
used.

358 IBM Optim: Archive User Manual


DESTQUAL
Override for Qualifier in the Table Map.
dbalias. [ cid]
One or two-part default qualifier for destination tables referenced in Table Map.
DESTTABNAME
Override for source to destination mapping in the Table Map.
[ [ dbalias. ] cid. ] srctablename
One, two, or three-part name of a table in the Source File. If tablename is not fully
qualified, the default Qualifier applies.
[ [ dbalias. ] cid. ] desttablename
One, two, or three-part destination table name. If tablename is not fully qualified, the
default Qualifier applies.

Insert

When the model Restore Request Process mode is Insert, the following overrides can be used, and pertain
to the Insert Process for all Archive Files identified for Search and Restore processing.
COMMFREQ
Override for Commit Frequency setting.
n Specify any number between 1 and the maximum set in Product Options.
PROCTYPE
Override for Process Option.
INS Insert data.
UPDINS Update and insert data.
UPDATE/INSERT
Update and insert data.
UPDATE ONLY
Update data only. Do not insert.
LOCKTABS
Override for Lock Tables setting.
Y Lock tables during insert processing.
N Do not lock tables.
DISROWLIM
Override for Discard Row Limit setting in the Insert Request.
n 0 (to impose no limit) or a number from 1 to 99999999 to stop processing after the
specified number of rows are discarded and all rows in the array processed. You can
Restart or Retry a process that stops because the limit is reached.

Load

When the model Restore Request Process mode is Load, the following overrides can be used, and pertain
to the Load Process for all Archive Files identified for Search and Restore processing.
MODE Loader processing mode for the database.
dbalias
The DBAlias for the database.
INSERT Insert rows into empty destination tables.

Chapter 12. Command Line Interface — Processing Utilities 359


REPLACE
Delete all rows from destination before loading.
APPEND Load rows into destination, discarding duplicate rows or inserting them into exception
tables. (Oracle only.)
TRUNCATE
Delete all rows from destination before loading. (RI constraints must be disabled. Oracle
only.)
PERFLOAD
Override for Perform Load setting in Load Request.
dbalias
The DBAlias for the database.
Y Run the loader immediately after file conversion.
N Do not run the loader.
DELONSUCCESS
Override for delete files option when the Load Process completes successfully.
dbalias
The DBAlias for the database.
Y Delete files for the database referenced by dbalias.
N Do not delete files.
DELONFAILURE
Override for delete files option when the Load Process fails.
dbalias
The DBAlias for the database.
Y Delete files for the database referenced by dbalias.
N Do not delete files.
WORKPATH
Override for temporary loader files directory path.
dbalias
The DBAlias for the database.
path Path to location for files. Drive must be accessible to DBMS server and client, workstation
and network server.
SERVPATH
Override for temporary loader files Server path. (DB2 UDB only.)
dbalias
The DBAlias for the database.
path Path to location for files. drive must be accessible to DBMS server and client, workstation
and network server.
END End of Search and Restore Process.

Examples
Search and Restore Parameter File Example

To Search and Restore data using a parameter file named SNR.TXT that supplies command-line and
override keywords, enter:

360 IBM Optim: Archive User Manual


PR0CMND /R @C:\TEMP\SNR.TXT

File Format

In this example, the parameter file C:\TEMP\SNR.TXT includes the following:


TYPE=SEARCHANDRESTORE REQUEST=RESTR.MODEL1 OV=*
FILTER FILENAME C:\ACCTS\%.AF
FILTER SERVERNAME SYS_
FILTER GROUP ACCTS
FILTER CREATOR %
FILTER TABLENAME %.TEST.%
GLOCONN OR
GLOSELCRIT %.%.CUSTOMERS CUST_ID > '123'
GLOCOLCONN %.%.CUSTOMERS OR
GLOSQLTEXT %.%.CUSTOMERS CUST_ID< '10' and STATE = 'FL'
SORTORDER Ascending
MAXFILES 5
ONLYFIRST No
DELARES Yes
IGNINACC Yes
CONONERR Yes
CFFILE C:\TEMP\OverSeaInsert.cf
TMNAME pstdoc.PST
COMMFREQ 200
PROCTYPE UpdIns
LOCKTABS No
DISROWLIM 0
COLMAPID L_MSS70
COLMAP CUSTOMERS L_MSS70.CUST
DESTQUAL PSTDOC.PRODCTN
DESTTABNAME CUSTOMERS CUST_RES
END

Search and Restore Override File Example

To Search and Restore data using an override file named SNROVRDS.TXT that supplies overrides, enter:
PR0CMND /R TYPE=SEARCHANDRESTORE REQUEST=RESTR.MODEL2 /OV=SNROVRDS.TXT

File Format

In this example, the override file, SNROVRDS.TXT, includes the following:


FILTER TABLENAME ORA.%.%
FILTER STARTDATE 02/14/2001
FILTER ENDDATE 04/30/2001
SORTORDER Ascending
MAXFILES 100
ONLYFIRST No
IGNINACC Yes
CONONERR Yes
CFFILE C:\TEMP\Loadsear.cf
TMNAME pstdoc.PST
MODE Oracle Append
PERFLOAD Oracle Y
DELONSUCCESS Y
DELONFAILURE N
COLMAP CUSTOMERS L_MSS70.CUST
DESTQUAL PSTDOC.PRODCTN
DESTTABNAME CUSTOMERS CUST_RES
END

Chapter 12. Command Line Interface — Processing Utilities 361


Restart or Retry a Process
You can use the RESTARTRETRY command to restart or retry an Insert or Delete Process that did not
complete successfully.
v If an Insert or Delete Process ends abnormally, the command restarts the process from the last commit
point.
v If an Insert or Delete Process ends normally, but a number of rows could not be processed, the
command retries the process for those rows only.

Note: An Insert Process can be run as part of a Restore Process; a Delete Process can be run as part of an
Archive Process.

Syntax For Restarting or Retrying an Insert or Delete Process


Use the following command line syntax to restart or retry an Insert or Delete Process.

Commands use the following structure. Enter the command and all parameters on a single line.
PR0CMND
/RESTARTRETRY
CONTROL=[ “ ]confilename.cf[ ” ]
[ OUTPUT= filename[ + ] ]
[ DISCARD=n ]
[ COMMIT=n ]
[ QUIET{ + | - } ]
[ MONITOR{ + | - } ]
[ SERVER={ servername | (local) ]
[ PST=pstdirectory ]
PR0CMND
The command to initiate command line processing. The character following PR is the number 0
(zero).
/RESTARTRETRY
Command to restart or retry an Insert or Delete Process. Specify /RESTARTRETRY or –RESTARTRETRY.
CONTROL=
The Control File for the Insert or Delete Process to be retried or restarted.
confilename.cf
The name of the Control File. Provide the full path if the file is not in the default Data
Directory.
OUTPUT=
File for the process report. If you do not use this keyword, the report is displayed automatically
after the process and you must close the report dialog to execute the next process. In a UNIX or
Linux environment, the report is displayed to the console.
filename
The name of the file. If you do not provide the full path, the file is saved in the default
Data Directory, identified in Personal Options.
+ Append the report to an existing file.
DISCARD=
Override for Discard Row Limit setting in the Delete or Restore Request.
n 0 (to impose no limit) or a number from 1 to 99999999 to stop processing after the
specified number of rows are discarded and all rows in the array processed. You can
Restart or Retry a process that stops because the limit is reached.
COMMIT=
Override for Commit Frequency setting for Delete or Insert processing.

362 IBM Optim: Archive User Manual


n A number between 1 and the maximum set in Product Options.
QUIET Indicator for displaying prompts or error dialogs during all processes in a parameter file. If you
use the QUIET keyword more than once, the last specification is used for all processes.
In a UNIX or Linux environment, prompts and error dialogs are unavailable and the QUIET
setting is ignored.
+ Do not display prompts or error dialogs (default).
– Display prompts and error dialogs. If functional security is enabled, Invoke privilege is
required to run a process that displays editor interfaces. For example, the Invoke Archive
Request and the Invoke Insert Request privileges are required to run an Archive Process
that uses a named Insert Process when QUIET- is used.
MONITOR
Indicator for displaying progress dialogs during all processes in a parameter file. If you use the
MONITOR keyword more than once, the last specification is used for all processes.
In a UNIX or Linux environment, prompts and error dialogs are unavailable and MONITOR setting
is ignored.
+ Display progress dialogs.
– Do not display progress dialogs (default).
SERVER=
Server on which the process was executed.
servername
The name of an Optim Server that is referenced in the Product Configuration File.
(local)
Process was executed on the local Server.
PST= The Optim Directory for processing. If processing uses the current (default) Optim Directory, this
keyword is not needed.
pstdirectory
Optim Directory name.

Command-line Keywords
PR0CMND
The command to initiate command line processing. The character following PR is the number 0
(zero).
/RESTARTRETRY
Command to restart or retry an Insert or Delete Process. Specify /RESTARTRETRY or –RESTARTRETRY.
CONTROL=
The Control File for the Insert or Delete Process to be retried or restarted.
confilename.cf
The name of the Control File. Provide the full path if the file is not in the default Data
Directory.
OUTPUT=
File for the process report. If you do not use this keyword, the report is displayed automatically
after the process and you must close the report dialog to execute the next process. In a UNIX or
Linux environment, the report is displayed to the console.
filename
The name of the file. If you do not provide the full path, the file is saved in the default
Data Directory, identified in Personal Options.

Chapter 12. Command Line Interface — Processing Utilities 363


+ Append the report to an existing file.
DISCARD=
Override for Discard Row Limit setting in the Delete or Restore Request.
n 0 (to impose no limit) or a number from 1 to 99999999 to stop processing after the
specified number of rows are discarded and all rows in the array processed. You can
Restart or Retry a process that stops because the limit is reached.
COMMIT=
Override for Commit Frequency setting for Delete or Insert processing.
n A number between 1 and the maximum set in Product Options.
QUIET Indicator for displaying prompts or error dialogs during all processes in a parameter file. If you
use the QUIET keyword more than once, the last specification is used for all processes.
In a UNIX or Linux environment, prompts and error dialogs are unavailable and the QUIET
setting is ignored.
+ Do not display prompts or error dialogs (default).
– Display prompts and error dialogs. If functional security is enabled, Invoke privilege is
required to run a process that displays editor interfaces. For example, the Invoke Archive
Request and the Invoke Insert Request privileges are required to run an Archive Process
that uses a named Insert Process when QUIET- is used.
MONITOR
Indicator for displaying progress dialogs during all processes in a parameter file. If you use the
MONITOR keyword more than once, the last specification is used for all processes.
In a UNIX or Linux environment, prompts and error dialogs are unavailable and MONITOR setting
is ignored.
+ Display progress dialogs.
– Do not display progress dialogs (default).
SERVER =
Server on which the process was executed.
servername
The name of an Optim Server that is referenced in the Product Configuration File.
(local)
Process was executed on the local Server.
PST= The Optim Directory for processing. If processing uses the current (default) Optim Directory, this
keyword is not needed.
pstdirectory
Optim Directory name.

Example
Restart an Archive Process (which includes an undeferred Delete Process) that ended abnormally.

Use the following process parameters:


v Specify the Control File generated during Delete Processing. In this example, use UNDEFERRED.CF.
v Write results to an output file named RESTART.TXT.
v Assign a discard row limit of 100 rows.
v Assign a commit frequency of 2000 rows.
v Display prompts and error dialogs during the process.

364 IBM Optim: Archive User Manual


To restart the process from the command line, specify:
PR0CMND /RESTARTRETRY CONTROL=UNDEFERRED.CF OUTPUT=RESTART.TXT DISCARD=100
COMMIT=2000 QUIET-

Return Codes
The /OUTPUT function uses an argument to direct processing output to the specified file. In addition, it
returns a code, based on the success or failure of the process.

In a batch file, you can direct the processing that follows the PR0CMND processing, using the return code, in
the following statement:
IF ERRORLEVEL n GOTO x

Note: The return code is labeled ERRORLEVEL in the output report for a process run in a Windows
environment, and EXITCODE for a process run in a UNIX or Linux environment.

The following list explains the possible return codes:


0 No errors
4 In all of the requests, the highest return code was Informational.
8 In all of the requests, the highest return code was Warning.
12 In all of the requests, the highest return code was Fatal.
16 There was a syntax error on the command line. A pop-up window also displays, unless you
specified /Quiet+.
24 Cannot open the file specified in the Output= parameter.
28 Cannot load pstlocal.cfg. (See the Installation and Configuration Guide for more information.)

Since the return code value is evaluated as equal to or greater than, query each ERRORLEVEL in reverse
order:
PR0CMND /R TYPE=EXTRACT REQUEST=identifier.name
IF ERRORLEVEL 24 GOTO Badout
IF ERRORLEVEL 16 GOTO Syntax
IF ERRORLEVEL 12 GOTO Fatal
IF ERRORLEVEL 8 GOTO Warning
IF ERRORLEVEL 4 GOTO Info

For example:
Badout
echo The Output File could not be opened.
GOTO End
...
:End

Chapter 12. Command Line Interface — Processing Utilities 365


366 IBM Optim: Archive User Manual
Chapter 13. Command Line Interface — Maintenance Utilities
The command-line interface allows you to automate Archive Directory and File Maintenance functions
without using the graphical user interface. You can also use the command line to migrate Archive Files
from one storage device or platform to another, a process that is unavailable from the graphical user
interface.

Parameters for Archive Directory Maintenance and the Archive Migration functions must be entered on
the command line; you cannot use a parameter file as you can with the processing utilities described in
Chapter 12, “Command Line Interface — Processing Utilities,” on page 327.

Archive Directory Maintenance Command Line Tasks

Archive directory maintenance tasks allow you to use the command-line interface to:
v Register an Archive File in the Archive Directory by creating an Archive entry. The entry records the
database tables from which the data was archived, the date the data was archived, the Optim Server on
which the Archive File resides, and the name of any associated Archive Index File or Storage Profile.
The Directory entry includes a globally unique identifier (GUID) for the Archive File, which was
generated in the Archive Process, and also identifies each Archive File by Name, Group, and
Description. Although Archive Files are registered automatically when they are created, you may need
to register a file that was previously registered in a different Optim Directory or for which the original
entry has been deleted, in order to process it using Archive functions.
v Delete (unregister) an Archive entry for an Archive File. During the removal process, you may also
delete the associated Archive File from disk storage. This function is useful for managing Archive Files
that have outlived their usefulness or have been exported to another location.
v Update information in an Archive entry, such as:
– Group name or Description information.
– Name and location of the associated Archive Index File.
– Storage Profile name.
– Duplicate Archive File information.

Migration Process Tasks

Use the command-line interface to:


v Convert an Archive File created on a z/OS DB2 platform to one that can be processed by Archive. You
must provide an Access Definition name and DB Alias for the converted file.
v Migrate an Archive File from disk to backup storage.
v Replace an Archive Directory entry. You can copy an Archive File to replace another Archive Directory
entry only if the Archive File name and Server match.
v Copy an Archive File to add, change, or delete a File Access Definition.
v Copy an uncompressed Archive File to create a compressed Archive File.

File Maintenance Tasks

File Maintenance tasks allow you to use the command-line interface, based on selection criteria in a
command file, to
v Selectively remove rows from a registered Archive File
v Compress one or more Archive and/or Extract Files, based on user-specified compression ratio
thresholds

© Copyright IBM Corp. 1994, 2010 367


Guidelines

The following guidelines apply to command-line processing of maintenance utilities:


v command-line keywords can be specified in any order, separated by one or more spaces without
commas.
v Keywords can be specified in mixed case. (Most keywords are shown in this chapter using bold and
uppercase for emphasis.)
v command-line keywords and associated arguments must be separated with an equals sign (=) or a
colon (:).
v ARCMAINT, MIG, M, and FMF must be prefixed by a forward slash (/) or dash (-).
v An argument that includes spaces must be enclosed in single or double quotation marks.
v Use double quotation marks to enclose a command-line keyword argument that includes a macro.

Syntax Conventions

The syntax conventions used to describe the command-line import are:


KEYWORD
Keywords are shown in uppercase for emphasis, but can be specified in lower or mixed case.
text Variable text is shown in lower-case italics.
( ) Statement delimiter to group a series of qualifiers for a parameter.
[ ] Indicates an optional parameter. (Square brackets are not used in the command line.)
{ } Indicates a choice of two or more settings from which one (and only one) must be selected.
(Brackets are not used in the command line.)
| Separates options. (The pipe symbol is not used in the command line.)

Archive Directory Maintenance

Syntax for Archive Directory Maintenance


Use the following syntax for Archive Directory Maintenance.

Commands use the following structure. Enter the command and all parameters on a single line.
PR0CMND /ARCMAINT
OPERATION={ REGISTER | UNREGISTER | UPDATE | VALIDATE}
[ OUTPUT=filename[ + ] ] [ PST=optimdirectory]

Parameters
You can enter parameters with the command on the command line, or you can enter these parameters
into a text file (called a parameter file).

A parameter file can be reused whenever you need to run a task. You can also generate a parameter file
programmatically, which allows you to automate processes.

You can enter parameters for more than one process into a parameter file. This allows you to run
multiple processes by entering a single command on the command line. Enter the parameters for each
process on a separate line of the parameter file.

Registration Process
AFFILE=[ “ ]arc file name.af[ ” ]
[ SERVER={ arcservername | (local) } ]
[ GROUP={ groupidentifier | NONE } ]

368 IBM Optim: Archive User Manual


[ DESC={ description | NONE } ]
[ AFXFILE={ [ “ ]idx file name.afx[ ” ] | NONE } ]
[ PROFILE={ storeprofilename | NONE } ]
[ OVERWRITE{ + | – } ]

Remove Registration Process


{ AFFILE=[ “ ]arc file name.af[ ” ]
[ SERVER={ arcservername | (local) } ] |
n | GUID=n }
[ DELETEFILE { + | – } ]

Update Process
{ AFFILE=[ “ ]arc file name.af[ ” ]
[ SERVER={ arcservername | (local) } ] |
AFID=n | GUID=n }
[ GROUP={ groupidentifier | NONE }]
[ DESC={ description | NONE } ]
[ AFXFILE={ [ “ ]idx file name.afx[ ” ] | NONE } ]
[ PROFILE={ profilename | NONE } ]
[ DUPLICATE=[ “ ]arc file name.af[ ” ] |
REPLACEPRIMARY{ + | - } |
REMOVEDUPLICATE{ + | - } |
SWAP{ + | - } ]

Index Validation
{ AFFILE=[ “ ]arc file name.af[ ” ]
[ SERVER={ arcservername | (local) } ] |
[ GROUP={ groupidentifier | NONE } ]
[ AUTOFIX { + | – } ]

Command Line Keywords


General
PR0CMND
The command to initiate command line processing. The character following PR is the number 0
(zero).
/ARCMAINT
Command to run Archive Directory Maintenance. Use /ARCMAINT or –ARCMAINT.
OPERATION=
Type of maintenance as one of the following:
REGISTER
Creates a Directory entry for an Archive File.
UNREGISTER
Delete the Directory entry for an Archive File, with or without deleting the corresponding
Archive File (from disk).
UPDATE Update Directory information for an Archive File.
VALIDATE
Validate Archive Indexes for specified Archive Files, with or without automatically fixing
invalid indexes.

Note: The use of VALIDATE applies to only validation of Archive Indexes for Archive Files
larger than 4 gigabytes that were created with Archive v6.1 or earlier.

Chapter 13. Command Line Interface — Maintenance Utilities 369


OUTPUT=
File for the process report. If you do not use this keyword, the command echo and error
messages display automatically after the process completes. In a UNIX or Linux environment, the
report is displayed to the console.
filename
The name of the file. If you do not provide the full path, the file is saved in the default
Data Directory, identified in Personal Options.
+ Append the report to an existing file.
PST= The Optim Directory for maintenance. If maintenance is for the current (default) Optim Directory,
this keyword is not needed.
optimdirectory
Optim Directory name.

Registration Process
AFFILE=
The Archive File to be registered in the Directory.
arcfilename.af
The name of the Archive File. Provide the full path if the file is not in the default Archive
File Directory.
SERVER=
Server, if any, on which the Archive File resides.
arcservername
The name of an Optim Server that is referenced in the Product Configuration File.
(local)
The local server. (Default)
GROUP= Override for Group designation in the original Archive Request.
groupidentifier
1- to 8-character name of the group for the Archive File. Group names can help qualify
and categorize Archive Files and the corresponding archived data and can be referenced
to locate one or more Archive Files for browsing or restoring data.
NONE Register the Archive File with no Group designation.
DESC= Override for Archive File Description in the original Archive Request.
description
1- to 8-character description.
NONE Register the Archive File with no description.
AFXFILE=
Override for the Archive Index File name in the Archive Request.
idxfilename.afx
The name of the Archive Index File. Provide the full path if the file is not in the default
Archive Index File Directory.
NONE Register the Archive File with no Index File.
PROFILE=
Override for the Storage Profile referenced in the Archive Request.
profilename
The name of a Storage Profile in the current Optim Directory.

370 IBM Optim: Archive User Manual


NONE Register the Archive File with no associated Storage Profile.
OVERWRITE
Indicator for processing when Directory entry for the Archive File exists (i.e., the Archive File
name and Server name for the entry match those entered on the command line).
+ Overwrite Directory entry.
– Abort process (default).

Remove Registration Process


AFFILE=
The Archive File for which the Directory entry is removed.
arcfilename.af
The name of the Archive File. Provide the full path if the file is not in the default Archive
File Directory.
SERVER=
Server, if any, on which the Archive File resides.
servername
The name of an Optim Server that is referenced in the Product Configuration File.
(local)
The local server. (Default)
AFID= The identifier for the Archive File for which the directory entry is removed.

Note: You can obtain the Archive File identifier programmatically, using PST_ARCHIVE_ID, a
built-in variable, with an Archive Action. Refer to the Common Elements Manual for additional
information.
n An integer that identifies the Archive File.
GUID= The Globally Unique Identifier (GUID) for the Archive File for which the directory entry is
removed.

Note: You can obtain the GUID programmatically, using PST_ARCHIVE_GUID, a built-in
variable, with an Archive Action. Refer to the Common Elements Manual for additional
information.
string A 38-character string that identifies the Archive File.
DELETEFILE
Indicator for disposition of Archive File after the Directory entry has been removed.
+ Delete Archive File from disk storage after the Directory entry is removed.
– Retain Archive File after the Directory entry is removed (default).

Update Process
AFFILE=
The Archive File for which the Directory entry is updated.
arcfilename.af
The name of the Archive File. Provide the full path if the file is not in the default Archive
File Directory.
SERVER=
Server, if any, on which the Archive File resides.

Chapter 13. Command Line Interface — Maintenance Utilities 371


servername
The name of an Optim Server that is referenced in the Product Configuration File.
(local)
The local server. (Default)
AFID= The identifier for the Archive File for which the directory entry is updated.

Note: You can obtain the Archive File identifier programmatically, using PST_ARCHIVE_ID, a
built-in variable, with an Archive Action. Refer to the Common Elements Manual for additional
information.
n An integer that identifies the Archive File.
GUID= The Globally Unique Identifier (GUID) for the Archive File for which the directory entry is
updated.
string A 38-character string that identifies the Archive File.
GROUP= Override for Group designation in the original Archive Request.
groupidentifier
1- to 8-character name of the group for the Archive File. Group names can help qualify
and categorize Archive Files and the corresponding archived data and can be referenced
to locate one or more Archive Files for browsing or restoring data.
NONE Update the Archive entry with no Group designation.
DESC= Override for Archive File Description in the original Archive Request.
description
1- to 8-character description.
NONE Update the Archive entry with no description.
AFXFILE=
Override for the Archive Index File name in the Archive Request.
idxfilename.afx
The name of the Archive Index File. Provide the full path if the file is not in the default
Archive Index File Directory.
NONE Update the Archive entry with no Index File.
PROFILE=
Override for the Storage Profile referenced in the Archive Request.
profilename
The name of a Storage Profile in the current Optim Directory.
NONE Update the Archive entry with no associated Storage Profile.
DUPLICATE=
Duplicate Archive File to be registered.
(If the duplicate file is registered, an error occurs.)
arcfilename.af
The name of the Archive File. Provide the full path if the file is not in the default Archive
File Directory.
REPLACEPRIMARY
Option to register a duplicate Archive File as the primary Archive File.
(If a duplicate file is not registered in the Directory entry, an error occurs.)

372 IBM Optim: Archive User Manual


+ Designate the duplicate Archive File as the primary Archive File and remove the
duplicate designation from the Directory entry.
– Retain the primary Archive File registration.
REMOVEDUPLICATE
Option to de-register a duplicate Archive File.
(If a duplicate file is not registered in the Directory entry, an error occurs.)
+ Remove the duplicate Archive File designation from the Directory entry.
– Retain the duplicate Archive File designation.
SWAP Option to reverse primary and duplicate Archive File designations in a Directory entry.
(If a duplicate file is not registered in the Directory entry, an error occurs.)
+ Reverse primary and duplicate Archive File designations.
– Retain primary and duplicate Archive File designations.
AFFILE=
The registered Archive File(s) for which the Archive Index is validated.
arcfilename.af
Archive File name or a pattern using wildcards.
SERVER=
Optim Server(s) on which Archive Files reside.
arcservername
Name or pattern for Server(s).
(local)
Archive Files reside on the local Server. (Default)
GROUP= Group identifier for Archive File(s).
groupidentifier
1- to 8-character identifier or pattern.
NONE Only validate indexes for Archive Files with no Group designation.
AUTOFIX
Option to repair invalid Archive Indexes found by utility.
+ Repair Archive Index.
- Do not repair Archive Index.

Examples
The following examples show command line usage for Archive Directory Maintenance

Register an Archive File from the Command Line


To register an Archive File, specify:

PR0CMND /ARCMAINT OPERATION=REGISTER OUTPUT=X:\RESULTS.TXT


PSTDIRECTORY=NEWDIRECTORY
AFFILE=ARCHIVE153 SERVER=OPTIM

GROUP=ORDERS DESCRIPTION=APRIL

Chapter 13. Command Line Interface — Maintenance Utilities 373


The file ARCHIVE153 on Server OPTIM is registered in NEWDIRECTORY, changing the Group to
ORDERS and the Description to APRIL with the process report written to a file named X:\RESULTS.TXT.

Remove registration for an Archive File from the Command Line


To remove the entry for an Archive File, specify:
PR0CMND /ARCMAINT
OPERATION=UNREGISTER
OUTPUT=X:\RESULTS.TXT
PSTDIRECTORY=OLDDIRECTORY
GUID=4CABBD4E-4EAB-43B7-9211-D713B7CF21D5
DELETEFILE+

The Archive File identified by the GUID and its Archive Directory entry in OLDDIRECTORY are
removed and the process report written to a file named X:\RESULTS.TXT.

Update a Directory Entry


To update the entry for an archive file, specify:
PR0CMND /ARCMAINT
OPERATION=UPDATE
OUTPUT=X:\RESULTS.TXT
PSTDIRECTORY=NEWDIRECTORY
AFFILE=ARCHIVE565 PROFILE=BACKUP
SWAP+

The entry in PSTDIRECTORY NEWDIRECTORY for an Archive File named ARCHIVE565 is updated to
change the Storage Profile to BACKUP and swapping the primary Archive File with the duplicate. The
process report is written to a file named X:\RESULTS.TXT.

Archive File Migration


Use the Archive File Migration process to copy or convert an Archive File. By default, the output Archive
File is registered in the Archive Directory, but you can choose to not register the file. If a File Access
Definition is used, you must register the file.

Use the Archive File Migration process to


v Convert an Archive File created in the Optim z/OS Solution to an open-system Optim Archive File.
You must specify an Access Definition name and DB Alias for the converted file.
v Replace an Archive Directory entry. You can copy an Archive File to replace another Archive Directory
entry only if the Archive File name and Server match.
v Copy an Archive File to add, change, or delete a File Access Definition.
v Copy an uncompressed Archive File to create a compressed Archive File.

Any object names in the migrated file that exceed the maximum length for an Optim client/server object
of the same type are truncated. When this happens, the truncated name is suffixed with the code
“__TRUNC__”. A 128-character Creator ID, for example, might be truncated in Optim as follows:

PSTASLG_1234567890_xx__TRUNC__

The Archive Audit Trail dialog displays the migration history of an Archive File created by the Archive
File Migration process. For more information, see “Archive Audit Trail Dialog” on page 263.

Syntax For Archive File Migration


Use the following syntax for Archive File Migration.

374 IBM Optim: Archive User Manual


Process

Commands use the following structure. Enter the command and all parameters on a single line.
PR0CMND /MIGRATE
[ OUTPUT=filename[ + ] ]
[ MDESCRIPTION=processdescription | (NONE) ]
IAF=[ “ ]in arc file name.af[ ” ]

Migrated File
OAF={ [ “ ]out arc file name.af[ ” ] | * }
[ SERVER={ arcservername | (local) } ]
[ STORAGEPROFILE={ storeprofilename | (NONE) }
[ OVERWRITE{ + | – } ]
[ COMPRESS{ + | – } ]
[ AD=qualifier.name ]
[ DBALIAS=dbaliasname ]

Directory Entry
[ REGISTER{ + | - } ]
[ PST=optimdirectoryname ]
[ REPLACEDIR{ + | - } ]
[ ALLOWORPHAN{ + | - } ]
[ RETAINGUID{ + | - } ]
[ FAD=identifier.name | (NONE) ]
[ GROUP=groupname | (NONE) ]
[ DESCRIPTION=filedescription | (NONE) ]

Command Line Keywords For Archive File Migration


Use the following commands and parameters on the command line for Archive File Migration.

Process
PR0CMND
Type PR0CMND to initiate command line processing. Note that the character following PR is the
number 0 (zero).
/MIGRATE
Command to perform Archive File Migration. Specify /MIGRATE or –MIGRATE. The abbreviated
forms are /M and –M.
OUTPUT=
File for the process report. If you do not use this keyword, the command echo and error
messages display automatically after the process completes. In a UNIX or Linux environment, the
report is displayed to the console.
filename
The name of the file. If you do not provide the full path, the file is saved in the default
Data Directory, identified in Personal Options.
MDESCRIPTION=
Description for the Archive File Migration Process.
description
(NONE)
IAF= Name of the source or input Archive File to migrate. If a File Access Definition secures the file,
the file must be registered.
inarcfilename
The name of the Archive File. Provide the full path if the file is not in the default Archive
File Directory.

Chapter 13. Command Line Interface — Maintenance Utilities 375


Migrated File
OAF= Name of the output Archive File. Use one of the following options:
outarcfilename
The name of the migrated Archive File. This name must be different from the fully
qualified source file name. Provide the full path if the file is not in the default Archive
File Directory.
* Give the output Archive File the name of the source Archive File. The source file is
automatically de-registered and replaced by the output file, which is given a new
Directory entry.
SERVER=
Server, if any, on which the migrated Archive File resides.
servername
The name of an Optim Server that is referenced in the Product Configuration File.
(local)
The local server. (Default)
STORAGEPROFILE=
A Storage Profile is needed for a file that is migrated to a supported backup device (Centera,
Tivoli, etc.) or is segmented. If you do not use this keyword, the Storage Profile for the source file
is used.
storeprofilename
Name of a Storage Profile in the Optim Directory.
(NONE) Do not use a Storage Profile.
OVERWRITE
Indicator for file processing when the Archive File name and Server name for the migrated file
match those of an existing file.
+ Overwrite file.
– Do not overwrite file.
COMPRESS
Compression indicator for the migrated file.
+ Compress the file (default).
– Do not compress the file.
AD= An Access Definition name for the output file is required if the source file was created on a z/OS
platform. (z/OS only)
identifier
1- to 8-character qualifier.
name 1- to 12-character base name.
DBALIAS=
An Access Definition on a z/OS platform typically includes a Default Creator ID that is applied
to the names of DB2 tables that are referenced in the Table List without a specific Creator ID (in
other words, cid.tablename). The Access Definition for the migrated file must have a two-part
Default ID that includes the DBAlias needed for access to the data base (in other words,
dbalias.cid.tablename). When migrating a file from a z/OS platform, you must provide the
DBAlias for tables in the migrated file.
If you do not use this keyword, the default, DBZOS, is used. (z/OS only)

376 IBM Optim: Archive User Manual


dbaliasname
1- to 12-character DB Alias name. The DB Alias not need exist in the Optim Directory.
REGISTER
Registration indicator for the migrated file.

Note: If an FAD secures the file, the file must be registered.


+ Register the file (default).
– Do not register the file.
PST= The Optim Directory in which the migrated file is registered. If the file is registered in the current
(default) Optim Directory, this keyword is not needed.
optimdirectory
Optim Directory name.
REPLACEDIR
Indicator for Directory entry processing when the Archive File name and Server name for the
migrated file match those of a previously registered file.
+ Replace an Archive Directory entry.
– Do not replace an Archive Directory entry (default).
ALLOWORPHAN
If migrating and registering an Archive File stored on a backup device, the Directory entry for the
migrated file will not record the copy on the backup device. If the new Directory entry replaces
the previous entry for a source file on a backup device, the file is “orphaned.” In general, an
orphaned file is deleted from the backup device and, if not, it can be removed from the device
manually. However, you cannot delete a Centera file that is assigned a retention period.
Use ALLOWORPHAN to manage migration of a Centera file that has a retention period.
+ Replace the Directory entry for a Centera file with retention period. (The file cannot be
removed from the Centera device until the retention period has lapsed, but can be
registered.)
– Do not replace the entry for any Centera file with a retention period (default).
RETAINGUID
Indicator for Globally Unique Identifier (GUID) processing. If the source file was created on a
z/OS platform, this parameter is ignored and a warning given.
+ Retain the GUID (default). If registering the migrated file, you must replace any entry
with the same GUID or file name and server.
– Generate a new GUID for the migrated file (default).
FAD= The File Access Definition (FAD) for the migrated and registered file. User privilege for the
Secured Archive File Task to Modify Security is required. If you do not use this keyword, the
FAD for the source file is used.
identifier.name
If an FAD is specified, you must register the file.
(NONE) Do not secure the migrated file.
GROUP= The Group for the migrated and registered file. If the output file is not registered during Archive
File Migration, this parameter is ignored. If you do not use this keyword, the Group designation
for the source file is used.
groupname
1- to 8-character Group designation for the migrated file.

Chapter 13. Command Line Interface — Maintenance Utilities 377


(NONE) Do not use a Group designation for the migrated file.
DESCRIPTION=
The description for the migrated and registered file. If the output file is not registered during
Archive File Migration, this parameter is ignored. If you do not use this keyword, the description
for the source file is used.
description
1- to 40-character description for the migrated file.
(NONE) Do not use a description for the migrated file.

Example (Archive File Migration Using Command Line)


Use command line syntax to migrate an Archive File to Server ARCHSRV2, create a report file, and
secure the output file with a new FAD.
PR0CMND /MIGRATE
IAF=C:\RTDATA\arch1.af
OAF=D:\RTBACK\arch1bk.af
OUTPUT=C:\RTDATA\migrt.txt
SERVER=ARCHSRV2
FAD=MIGRATE

File Maintenance Facility


Use the File Maintenance Facility to remove rows from registered Archive Files and compress Archive
and Extract Files, using parameters you provide in a command file.

File Maintenance Facility Processing

The File Maintenance Facility reads the command file and generates “process objects” that correspond to
the process blocks in the command file. The File Maintenance Facility either updates the processed file or
creates a new copy of the file.

The File Maintenance Facility generates two types of output: progress messages that go to the console
and a report file (if the OUTPUT= command is specified). See the following examples.

Progress Messages
D:\RtWin\730\Source\DebugUni>pr0cmnd /fmf @FMFRef1.txt output=FMFout.txt
Reading command file C:\ExtractFiles\FMFRef1.txt...
Preparing processes...
1 of 1
Running process 1 of 1...
Process: remove rows from files
1 of 1: File C:\ExtractFiles\DDLtest640.AF on server (Local)
Start Time: 8/6/2010 17:09:46
Finding rows...
Removing rows...
No index file to update
Process completed successfully.
End Time: 8/6/2010 17:09:55

Output Report
File Maintenance Facility Process Report

Command Line Parameters @FMFRef1.txt output=FMFout.txt


Client User ID edg
Time Started 8/6/2010 17:09:46
Time Finished 8/6/2010 17:09:55
Elapsed Time 00:00:09
Process Status no errors, no warnings

378 IBM Optim: Archive User Manual


Process Summary:
Files processed 1
Index files processed 0

Process 1 of 1
------- - -- -

Process Commands:
1) PSTDIR UNI_ORA92
2) AF (local) %DDLtest640.AF
3) SELCRIT UNI_ORA_92.EDG.CUSTOMERS STATE='NY'
4) RETAINORIGINAL YES
5) RUN REMOVEROWS

File 1 of 1 for process 1 of 1


---- - -- - --- ------- - -- -

Server Name (Local)


Archive File C:\ExtractFiles\DDLtest640.AF
Subset Extract File C:\ExtractFiles\DDLtest640.AF.sub00002.xf
New Archive File C:\ExtractFiles\DDLtest640.AF.fmf_remove00001.af
Archive Index File (None)
New Archive Index File (None)
Time Started 8/6/2010 17:09:46
Time Finished 8/6/2010 17:09:55
Elapsed Time 00:00:09
Process Status no errors, no warnings

Process Summary:
Tables Processed 5
Archive File Rows 6133
New Archive File Rows 668

Row Details:
Archive File New Archive File Table Name
------- ---- --- ------- ---- ----- ----
22 0 UNI_ORA_92.EDG.SALES
704 668 UNI_ORA_92.EDG.CUSTOMERS
3596 0 UNI_ORA_92.EDG.DETAILS
1709 0 UNI_ORA_92.EDG.ORDERS
102 0 UNI_ORA_92.EDG.ITEMS

Syntax for File Maintenance Facility Processing


Use the syntax in this topic when entering commands for command line processing.

Use the following syntax for the File Maintenance Facility:


PR0CMND /FMF
[ OUTPUT=reportfilename.txt[ + ] ]
@[ “ ]commandfilename.txt [ ” ]
PR0CMND
Type PR0CMND to initiate command line processing. Note that the character following PR is the
number 0 (zero).
/FMF Command to perform File Maintenance.
OUTPUT=
File for the process report. If you do not use this keyword, the command echo and error
messages display automatically after the process completes. In a UNIX or Linux environment, the
report is displayed to the console.
reportfilename.txt
The name of the file. If you do not provide the full path, the file is saved in the default
Data Directory, identified in Personal Options.
Chapter 13. Command Line Interface — Maintenance Utilities 379
+ Indicates the report should be appended to the file.
@ File containing selection criteria and commands. (Required)
commandfilename.txt
The name of the command file. If you do not provide the full path, the file is read from
the default Data Directory, identified in Personal Options.

Remove Rows Process


The File Maintenance Facility Remove Rows process selectively removes rows from a registered Archive
File, on the basis of selection criteria in a command file.

The Remove Rows process generates the following files when an Archive File is processed:
v A subset Extract file, which contains the data to be removed from the source Archive File. It is used to
delete rows from the source file and create the resulting Archive File. The file name is derived as
follows: <orig. archive file name>sub<number>.xf
v An Archive File (if RETAINORIGINAL in the command file is set to YES)
v An index file (if RETAINORIGINAL in the command file is set to YES).

Command File Syntax

The command file contains selection criteria that identify the rows to be removed from processed Archive
Files.

A command may appear several times in a command file. A single command can span multiple lines for
ease of maintenance (except where noted otherwise). A group of commands ending with a RUN command
represents a “process block.” Except for the RUN command, all commands in a process block can appear in
any order. See “Example” on page 382 for a sample command file.

A command file may contain one or more process blocks in the following format:
[// comment ]
[ OPTIMDIR optimdirectory ]
AF { arcservername | (local) } archivefilename1[,archivefilenamen]
[ STARTTABLE dbalias.cid.tablename ]

[ SELCRIT dbalias.cid.tablename sqlwhereclause ]


...
[ SELCRIT dbalias.cid.tablename sqlwhereclause ]

[ ONERROR { CONTINUE | QUITPROCESS | QUITALL }]


[ RETAINORIGINAL { YES | NO }]
RUN REMOVEROWS
// At the beginning of a line, indicates that the text following the slashes is a comment. Enter
comment text on one line, anywhere in the command file.
OPTIMDIR
Optim Directory to register and/or update Archive Files. The Optim Directory provides complete
Archive File names in case a wild card name is specified. (The default is the current Optim
Directory.)
AF The Archive Files to be processed. (Required)
filenames
Server name followed by a comma-separated list of Archive File names or patterns with
wildcards (% for any number of characters). If a file name contains spaces, use quotes
around the name. The file(s) must exist in the Archive Directory. You can use multiple
occurrences of this command to process Archive Files on multiple servers.

380 IBM Optim: Archive User Manual


STARTTABLE
Sets the Start Table for the data processed in the process block. The Start Table determines which
rows are selected from the Archive File(s) in the block.
tablename
A three-part table name. The default is the Start Table in the Access Definition used to
create the Archive File.
SELCRIT
Identifies rows to be removed from processed Archive Files. (Required)
A process block can include multiple SELCRIT commands. Multiple SELCRIT commands can
include the same table name. In this case, the process combines the WHERE clauses with an OR.
The Subset Extract process handles selection criteria as an “intersection” of the data. Suppose the
Archive File contains the tables CUSTOMERS (parent) and ORDERS (child), and the selection
criteria are:
CUSTOMERS: CUST_ID = '00486'
ORDERS: ORDER_ID = 111

The CUSTOMERS row with CUST_ID = '00486' has two orders: 111 and 1164. Based on the selection
criteria, only the ORDERS row with Order ID 111 would be included.
The process maintains relational integrity. Relationship Options 1 and 2 are both disabled.
criteria
A three-part table name (including the Start Table) followed by a WHERE clause.
(Command, table name, and WHERE clause must all be on the same line.)
ONERROR
Indicates how Optim will react to an error.
CONTINUE
Processing continues with the next file, if possible.
QUITPROCESS
Processing ends with the current process and proceeds to the next.
QUITALL
Processing ends immediately. (Default)
RETAINORIGINAL
Indicates if Optim should keep the original Archive File and create a new Archive File with a
unique sequence number appended to the file name and a new GUID/AFID.
If an Archive File has an index file, the index file is processed after the Archive File is processed
successfully. If the Archive File is overwritten, then the index file is overwritten. If a new Archive
File is created, then the original index file is retained and a new index file is created.
YES (Default) Optim creates a new Archive File with a new GUID/AFID and an index file. It
registers the new Archive File. The process places the generated files in the same
directory as the original files and the new file names are derived from the original file
names, as follows.

Note: A number is embedded in the filename to ensure uniqueness in case a user runs
the Remove Rows process more than once for an Archive File.
New Archive File
<orig. archive file name>fmf_remove<number>.af
New Index File
<orig. index file name>fmf_remove<number>.afx
NO Optim creates a temporary Archive File and, at the end of the process, deletes the original

Chapter 13. Command Line Interface — Maintenance Utilities 381


Archive File and changes the temporary Archive File name to the original file name. If
the Archive File is overwritten, its associated retention information (from the Storage
Profile) is updated. The original GUID/AFID is kept.
RUN Identifies operation to run. The RUN command and its value indicate the end of a process block.
Any commands following the RUN command are part of the next process block. (Required.)
REMOVEROWS
Removes rows specified in selection criteria.

Example

This example illustrates how you can remove rows from Archive Files using a command line process.

The following command line removes rows from Archive Files specified in command.txt, the command
file. The process report is written to filemaint.txt.
PR0CMND /FMF
OUTPUT=C:\RTDATA\filemaint.txt
@command.txt

The following illustrates the contents of a command file used by the Remove Rows process.
//This is the first block.
OPTIMDIR PSTDJHDIR
AF OPTIMSVR1 C:/OPTIM/DATA/PAYROLL%.AF,C:/OPTIM/DATA/GENERAL_LEDGER.AF
SELCRIT DBMS.OPTUSER.CUSTOMERS LASTNAME=“henderson” and FIRSTNAME=“dave”
SELCRIT DBMS.OPTUSER.CUSTOMERS LASTNAME=“skippy”
SELCRIT DBMS.OPTUSER.CUSTOMERS LASTNAME=“VanDorn”
RUN REMOVEROWS
//This begins the second block.
OPTIMDIR PSTDJHDIR2
AF (LOCAL) %ACCOUNTS_PAYABLE.AF,%ACCOUNTS_RECEIVABLE.AF
SELCRIT DBMS.OPTUSER.CUSTOMERS COLNAME1='XXXE'
RUN REMOVEROWS

Compress Process
The File Maintenance Facility Compress process compresses one or more Archive and/or Extract Files,
based on user-specified compression ratio thresholds. The compression ratio thresholds represent data
space savings in percent. For example, a 10 MB file that is compressed to 2 MB would have a
compression ratio of 80 percent.

The Compress process provides table-level compression using a compression ratio threshold value for
each specified table or a default threshold value (if both are specified, the table-level threshold overrides
the default). When you specify table-level or default threshold values, Optim determines the compression
ratio for each specified table. If a table's computed compression ratio is less than the table or default
threshold value you specified, Optim disables compression for that table. In this way, Optim does not
attempt to compress row data from a table that will not result in a significant compression ratio. If you
do not specify a compression ratio threshold value for a table nor a default value, Optim performs full
compression on that table in all specified files that contain the table.

The Compress process also compresses (or uncompresses) a table that had been previously compressed.
The process compresses (or uncompresses) the table based on the specified parameters. For example, if
the specified table-level threshold is higher than the compression ratio for a table that had been
previously compressed, the Compress process will uncompress the table.

382 IBM Optim: Archive User Manual


Command File Syntax

The command file contains parameters that identify the Archive and/or Extract Files to be compressed
and the default and table-level compression ratio thresholds to be used to determine if compression will
occur.

A command may appear several times in a command file. A single command can span multiple lines for
ease of maintenance (except where noted otherwise). A group of commands ending with a RUN command
represents a “process block.” Except for the RUN command, all commands in a process block can appear in
any order. See Example for a sample command file.

A command file may contain one or more process blocks in the following format:
[// comment ]
[ OPTIMDIR optimdirectory ]
[AF { arcservername | (local) } { archivefilename1[,archivefilenamen | * }]
[COLLECTION collection1[,collectionn]
[AFEXCLUDE archivefilename1[,archivefilenamen]
[XF { servername | (local) } extractfilename1[,extractfilenamen]
[DEFTHRESHOLD { defthreshold | ON | OFF }]
[TABLETHRESHOLD dbalias.cid.tablename { tablethreshold | ON | OFF }]
...
[TABLETHRESHOLD dbalias.cid.tablename { tablethreshold | ON | OFF }]
[ONERROR { CONTINUE | QUITPROCESS | QUITALL }]
[RETAINORIGINAL { YES | NO }]
RUN COMPRESS
// At the beginning of a line, indicates that the text following the slashes is a comment. Enter
comment text on one line, anywhere in the command file.
OPTIMDIR
Optim Directory to register and/or update Archive Files. The Optim Directory provides complete
Archive File names in case a wild card name is specified. It is used in conjunction with the AF
and COLLECTION commands. The specified AF or COLLECTION must be in the directory
specified by OPTIMDIR. (The default is the current Optim Directory.)
AF The Archive Files to be processed.

Note: You can specify either XF or AF in a process block, but not both. You can use AF and
COLLECTION together in a process block.
filenames
Server name followed by a comma-separated list of Archive File names or patterns with
wild cards (% for any number of characters). If a file name contains spaces, use quotes
around the name. The file(s) must exist in the Archive Directory. You can use multiple
occurrences of this command to process Archive Files on multiple servers. Use the
keyword “*” to indicate that all files in the directory should be processed.
COLLECTION
The Archive Files from a collection to be processed. If both AF and COLLECTION are specified,
the final list of Archive Files to be processed contains only unique files.
collection
Comma-separated list of collection names or patterns with wild cards (% for any number
of characters).
AFEXCLUDE
The Archive Files to be excluded from compression. If both AF and COLLECTION are specified,
the final list of Archive Files to be processed contains only unique files. You can use multiple
occurrences of this command to add more file names to exclude.

Chapter 13. Command Line Interface — Maintenance Utilities 383


filenames
Comma-separated list of Archive File names to exclude from the compression list. If a file
name contains spaces, use quotes around the name.
XF The Extract Files to be processed.

Note: You can specify either XF or AF in a process block, but not both. Also, the XF keyword is
not allowed with the COLLECTION keyword.
filenames
Server name followed by a comma-separated list of Extract File names. Since these files
will not be stored in an Optim Directory, you must enter fully qualified paths to identify
the files to be compressed. If a file name contains spaces, use quotes around the name.
You can use multiple occurrences of this command to process Extract Files on multiple
servers.
TABLETHRESHOLD
The table compression ratio threshold. The specified integer value is a minimum compression
ratio threshold, which will be compared with the computed compression ratio of the table sample
size (the first buffer.) If the computed ratio is less than the compression ratio threshold you
specify, Optim deactivates compression for the table.
tablename tablethreshold
A three-part table name followed by a compression ratio threshold integer value from 1
to 99, or ON or OFF. ON indicates that the table will always be compressed. OFF
indicates that the table should not be compressed. 1 to 99 indicate the minimum
compression ratio required to enable table compression. (Command, table name, and
threshold value must all be on the same line.)
DEFTHRESHOLD
The default compression ratio threshold value to be used if a table has no specified compression
ratio threshold (TABLETHRESHOLD). The specified integer value is a minimum compression
ratio threshold, which will be compared with the computed compression ratio of the table sample
size (the first buffer.) If the computed ratio is less than the default compression ratio you specify,
Optim deactivates compression for the table.
defthreshold
Default compression ratio threshold, an integer value from 1 to 99, or ON or OFF. ON
indicates that the table should be compressed (default if DEFTHRESHOLD is not
specified). OFF indicates that the table should not be compressed. 1 to 99 indicate the
minimum compression ratio required to enable table compression. (Command, table
name, and threshold value must all be on the same line.)
ONERROR
Indicates how Optim will react to an error.
CONTINUE
Processing continues with the next file, if possible.
QUITPROCESS
Processing ends with the current process and proceeds to the next.
QUITALL
Processing ends immediately. (Default)
RETAINORIGINAL
Indicates if Optim should keep the original Archive File and create a new Archive File with a
unique sequence number appended to the file name and a new GUID/AFID.
If an Archive File has an index file, the index file is processed after the Archive File is processed
successfully. If the Archive File is overwritten, then the index file is overwritten. If a new Archive
File is created, then the original index file is retained and a new index file is created.

384 IBM Optim: Archive User Manual


YES (Default) Optim creates a new Archive File with a new GUID/AFID and an index file. It
registers the new Archive File. If you specified a collection, the new Archive File will be
added to the collection, as well. The process places the generated files in the same
directory as the original files and the new file names are derived from the original file
names, as follows.

Note: A number is embedded in the file name to ensure uniqueness in case a user runs
the Compress process more than once for an Archive File.
New Archive File
<orig. archive file name>fmf_compress<number>.af
New Index File
<orig. index file name>fmf_compress<number>.afx
NO Optim creates a temporary Archive File and, at the end of the process, deletes the original
Archive File and changes the temporary Archive File name to the original file name. The
original GUID/AFID is kept and the Archive File retention information (from the Storage
Profile) is updated.
RUN Identifies operation to run. The RUN command and its value indicate the end of a process block.
Any commands following the RUN command are part of the next process block. (Required.)
COMPRESS
Compresses specified files.

Example

The following command line compresses the Archive and Extract Files specified in command.txt, the
command file. The process report is written to filemaint.txt.
PR0CMND /FMF
OUTPUT=C:\RTDATA\filemaint.txt
@command.txt

The following illustrates the contents of a command file used by the Compress process.
//This is the first block.
OPTIMDIR OPTIMDIR1
AF OPTIMSVR1 C:/OPTIM/DATA/PAYROLL%.AF,C:/OPTIM/DATA/GENERAL_LEDGER.AF
DEFTHRESHOLD 45
TABLETHRESHOLD DBMS.OPTUSER.CUSTOMERS 50
TABLETHRESHOLD DBMS.OPTUSER.DETAILS 40
TABLETHRESHOLD DBMS.OPTUSER.ITEMS 45
RUN COMPRESS

//This is the second block. The default threshold is ON, therefore, all tables will be compressed.
OPTIMDIR OPTIMDIR2
AF (LOCAL) %ACCOUNTS_PAYABLE.AF,%ACCOUNTS_RECEIVABLE.AF
RUN COMPRESS

//This is the third block.


XF (LOCAL) PAYABLE.XF,C:/OPTIM/DATA/ACCOUNTS_RECEIVABLE.XF
RUN COMPRESS

//This is the fourth block.


OPTIMDIR OPTIMDIR1
AF OPTIMSVR1 C:/OPTIM/DATA/PAYROLL%.AF,C:/OPTIM/DATA/GENERAL_LEDGER.AF
COLLECTION PAYROLL.COLL1,EMPLOYEE.COLL%
DEFTHRESHOLD 45
AFEXCLUDE ACCOUNTS_PAYABLE.AF,ACCOUNTS_RECEIVABLE.AF
RUN COMPRESS

Chapter 13. Command Line Interface — Maintenance Utilities 385


386 IBM Optim: Archive User Manual
Appendix A. SQL Grammar for Search and Restore
When you use selection criteria or SQL statements to find specific data in an Archive File, the syntax and
grammar may differ slightly from SQL syntax and grammar you are accustomed to using with a
particular DBMS.

The following rules apply to SQL statements used internally by Archive:


v No DISTINCT after SELECT
v No arithmetic expressions (only columns (eventually qualified), literals or parameters)
v No GraphicLiteral
v No TextLiteral
v No functions
v No subselect in WHERE clause
v Only one table in the FROM clause
v No ORDER BY
v No GROUP BY
v No END keyword or operator required (for example, no semicolon required)

Any level of complexity, using parentheses and boolean operators, can be expressed in a WHERE clause. All
comparison operators are supported, as are BETWEEN, IS NULL, IN, and LIKE operators, with their
NOT form.

SELECT. . . FROM (table) WHERE

The SQL tab of the Selection Criteria dialog contains the statement:

SELECT... FROM dbalias.creatorid.tablename WHERE:

SELECT... Rows are selected from the named table according to the WHERE clause you create.
FROM The WHERE clause is applied to the table named after this keyword. Select the table for the SQL
statement from the drop-down list.
WHERE Create a WHERE clause in the text box below the Select statement, using column names,
operators and values to complete the statement. You can type directly into the text box, and
select column names and operators from the lists. Selected column names and operators are
inserted in the text box at the cursor position.
Note: Dates must be expressed as string literals using all or part of the format:
'YYYY_MM_DD_HH_MM_SS_FFF[FFF]' where the separators can be underscore ( _ ), dash ( - ), colon
( : ), front slash ( / ), period ( . ), or blank space.

v To validate the SQL WHERE clause, right-click the SELECT text box and select Validate SQL, or click
outside the text box. If the statement is invalid, a message is displayed.
v To remove the SQL WHERE clause, right-click the SELECT text box and select Remove SQL. You may
also overtype with blanks, or use the Delete or Backspace key.

© Copyright IBM Corp. 1994, 2010 387


388 IBM Optim: Archive User Manual
Appendix B. ODBC Access to Archived Data
Database client technologies such as ODBC (Open Data Base Connectivity) provide a uniform interface
for writing client software for relational databases.

Archive has an ODBC driver that allows you to access data in an Archive File programmatically. Note
that the Archive ODBC driver is not available for a UNIX or Linux environment. With the ODBC
interface, you can integrate your archiving strategy into your production environment, complete with the
ability to browse and restore archived data, as necessary. Archive Files registered in an Archive Directory
in any accessible Optim Directory can be processed using ODBC. As you develop your archiving strategy,
it is important to consider these key points:
v The ODBC interface connects to, and can retrieve data from, a single Archive File at a time.
v A well-conceived set of archive indexes greatly improves performance when retrieving archived data
using ODBC. An indexing scheme should anticipate and support searches that will occur with any
regularity. (Archive accommodates an evolving system; as search requirements change, indexes can be
added, updated, or deleted to meet current search requirements.)

To use the ODBC interface, you must create a Data Source to identify the Archive File you will access.
You can use the Windows ODBC Data Source Administrator to create a Data Source. Specifications for the
Data Source are entered on the ODBC Source Data Default Specification dialog. Data Source criteria
provide information needed to select an Archive File as identified by group, server, or creator. You can
also include a reference to a parameter file in a Data Source, to identify an Archive File using more
specific criteria (for example, the Archive File creation date, or the name of an archived table included in
the Archive File). Connection string parameters can be used in conjunction with a Data Source,
depending on the application interface.

You may have several Data Sources for the Archive File Driver.

For example, you could create a data source to use for creating reports. The data source could be saved
with the information required to create the desired report, except the specific Archive File identifier,
which could be provided programmatically at runtime.

You could create another to provide supplementary information to the user of an application during daily
transactions. The parameters saved for this type of data source might be less specific, relying on
connection call parameters or parameter file overrides to retrieve the desired Archive File data at runtime.

You can report on retrieved rows using your application software, or commercial software, including, but
not limited to, Business Objects Crystal Reports, Microsoft Access, and Microsoft Visual Basic.

Installation and Configuration

ODBC Application Programming Interface (API) software is included as part of Windows 2000, Windows
NT and Windows XP. If you are using an older version of Windows, you can load the necessary ODBC
software from the installation CD. Refer to the Installation and Configuration Guide for complete
information.

ODBC Server Command Console


Archive provides the PR0COMS ODBC Monitor, which allows you to monitor and administer ODBC
Driver connections to access Archive Files from an Optim Server in a Windows environment.

© Copyright IBM Corp. 1994, 2010 389


In a Windows environment, you can monitor ODBC Driver connections by launching the PR0COMS
ODBC Server Command Console. Archive creates an ODBC Server for each (Windows) User that accesses
the Optim ODBC Driver. The Console displays each active ODBC Server. Thus, if an ODBC application is
running under the LocalSystem account and a second is running under a user account, two ODBC
Servers are listed on the console. You can also use the ODBC Console to display all of the ODBC
connections for each ODBC Server.

To launch the PR0COMS ODBC Server Command Console, open the ...\IBM Optim\RT subdirectory, and
double-click the PR0COMS icon.

Commands

The following commands are available from the ODBC Console:

Windows Commands Description


(H)elp Display the list of available commands.
(D)isplay Display a list of the ODBC Servers running on the system.
(S)hutdown Terminate the specified ODBC after all connections have been
disconnected.

Additionally, prevent new connections to the specified ODBC Server.


(K)ill Disconnect all connections to the specified ODBC Server and terminate
the server normally.
(K)ill immed Immediately sever all connections to the specified ODBC Server and
terminate the server.
Note: Invoke this command only if other attempts to terminate the
ODBC server have failed.

390 IBM Optim: Archive User Manual


Windows Commands Description
List List all connections to the specified ODBC Server and display
information about each connection.

If no ODBC Server is specified, all connections to all ODBC Servers are


listed.
Cancel [ <cid> | <user> ] Terminate ODBC connections from the specified ODBC Server. You
must enter one of the following:

<cid> Client id needed to terminate a specific connection. (for example,


Cancel 1648 2)

<user> User id needed to terminate all connections for a specific user.


(for example, Cancel 1648 PSTDEMO)

Define a Data Source


A Data Source is a named object that contains criteria that ODBC requires to connect to the Archive
ODBC driver and locate an Archive File.

Note: Before you can define an ODBC Data Source, you must install ODBC Application Programming
Interface (API) software on your workstation, and enable the ODBC Optim Archive File Driver (see the
Installation and Configuration Guide for details). This driver is not available for a Linux or UNIX
environment.

To create a Data Source for accessing an Archive File, open the Microsoft ODBC Data Source
Administrator dialog. The method you use to open this dialog varies according to the version of
Windows on your workstation. For Windows 2000, click Start → Settings → Control Panel →
Administrative Tools → Data Sources (ODBC).

Appendix B. ODBC Access to Archived Data 391


Select the Drivers tab on the ODBC Data Source Administrator dialog to confirm that the Optim Archive
File Driver is available.

Next, click the User DSN or System DSN tab to create a Data Source. (A User Data Source can only be
used by the specific user, on the current machine; a System Data Source can be shared. Refer to Windows
Help for further information on each type.)

Click Add on the selected tab to display the Create New Data Source dialog.

392 IBM Optim: Archive User Manual


Create New Data Source dialog

Select the Optim Archive File Driver and click Finish to display the ODBC Source Data Default
Specification dialog.

ODBC Source Data Default Specification dialog

Use the ODBC Source Data Default Specification dialog to define specifications for the ODBC Data
Source.

Appendix B. ODBC Access to Archived Data 393


You can enter values to select a single Archive File, or enter wildcard patterns so that a set of Archive
Files are referenced. Use the % (percent) symbol to represent any number of characters, or the _
(underscore) to represent a single character. A wildcard pattern must match the naming convention
appropriate for the object referenced by the value (for example, %.% for the two-part Archive File name).

The processing protocol for merging parameters in a file or passed on the ODBC connection call with
those in the Data Source is: Parameter file specifications override connection call parameters, which
override Data Source specifications.

Processing cannot proceed until a single Archive File is selected. If the parameters identify a single
Archive File, processing proceeds. If more than one Archive File meets the criteria, you are prompted to
select the Archive File to be processed. If the connection call does not permit prompting, the process
terminates.

Enter specific or generic criteria on the ODBC Source Data Default Specification dialog to define a Data
Source, as follows:
Data Source Name
Enter a 1-32 character name for the Data Source.
Description
Enter an optional description of the Data Source (1-255 characters).
Directory Name
Select an entry in the drop-down list, or enter a wildcard pattern. If not overridden, a pattern
may cause the Optim Directory dialog to open, allowing a user to select from Optim Directories
with names that match the pattern.

394 IBM Optim: Archive User Manual


Archive File Name
Enter an exact file name or a wildcard pattern.
Server Name
Enter an explicit server name or wildcard pattern.
Group Enter an explicit group or wildcard pattern.
Creator
Enter an explicit creator ID or wildcard pattern.
Parameter File Name
Specify the name of a file used to provide qualifying criteria for selecting an Archive File. If a
parameter file is not used, leave this control blank. You cannot specify a wildcard pattern.

Note: If the criteria match more than one Archive File, you may be prompted at run time for additional
information, depending on the application connection type (for example, Always Prompt, Never Prompt).

Creating a Parameter File


You can specify a parameter file name in a Data Source and use the parameter file to define the criteria to
select a unique Archive File.

The advantage of using a parameter file with a Data Source is that it allows you to create and employ a
relatively generic Data Source, and use the parameter file to comprehensively define an Archive File for
processing.
v A parameter file is a simple text file (created in a text editor, such as Notepad) listing specifications to
identify an Archive File.
v You can specify criteria in a parameter file that are beyond the scope of the criteria available in a Data
Source.
v Each specification must contain an equal sign (=) and be completed on one line.
v Specifications cannot wrap to the next line.
v You can use the % (percent) symbol and the _ (underscore) as wildcards appropriate for the naming
convention for a specification. Use the % (percent) symbol to represent any number of characters, or
the _ (underscore) to represent a single character.
v Depending on your application, you can also specify parameters on the connect string to override or
complement parameters specified in the Data Source.

Note: Specifications for selecting an Archive File are used as follows: Criteria specified in the Data Source
are superseded by criteria specified on the connect string. Criteria specified on the connect string are
superseded by criteria specified in a parameter file.
v An Optim Directory must be explicitly identified in the Data Source, in the connect string, or in the
parameter file.

Syntax

Use keywords and values in a connect string (if your application allows), or in a parameter file, as
follows.

Note: When you specify an Archive ID value, additional keywords and values are ignored.
DIRECTORY = pstdirectoryname
(ARCHIVEID = n | GUID = n |
FILE = archivefilename[SERVER = servername]
[GROUP = groupid]
[CREATOR = creatorid]
[TABLENAME = dbalias.creatorid.tablename]
[STARTDATE = startdate]
[ENDDATE = enddate]

Appendix B. ODBC Access to Archived Data 395


[SELCRIT = tablename columnname relationaloperator value]
[COLCONN = tablename {AND|OR}]
[SQLTEXT = tablename SQLwhereclause]
[CONN = tablename {AND|OR}] )

Syntax Specifications
DIRECTORY
Specific Optim Directory.
ARCHIVEID
Archive File identifier (n). The identifier must be a numeric value. The ARCHIVEID keyword cannot
be used when the FILE keyword is used, and cannot be used with a SERVER keyword.
GUID Globally Unique [Archive File] identifier (n). The identifier must be a numeric value. The GUID
keyword cannot be used when the ARCHIVEID or FILE keyword is used, and cannot be used with
a SERVER keyword.
FILE Specific Archive File name or a wildcard pattern.
SERVER Optim Server name or wildcard pattern.
GROUP Group name associated with the Archive File, or wildcard pattern.
CREATOR
Creator ID associated with the Archive File, or wildcard pattern.
TABLENAME
Fully qualified table name, or wildcard pattern, to narrow the focus to Archive Files containing
the named table.
STARTDATE
Start date of range to limit Archive Files to those created within a specific time frame. Date
format must conform to the setting chosen in the Windows Regional Options.
ENDDATE
End date of range to limit Archive Files to those created within a specific time frame. Date format
must conform to the setting chosen in the Windows Regional Options.
SELCRIT tablename columnname relationaloperator value
Selection criteria, to limit Archive Files to those containing the named table, and the data
specified. Use a fully qualified table name (dbalias.creatorid.tablename) for selection criteria.
(Selection criteria must conform to SQL syntax and must include a column name, relational
operator, and a value.)
COLCONN tablename {AND|OR}
Column connector for multiple local selection criteria applied to the named table.
SQLTEXT tablename sqlwhereclause
SQL WHERE clause, to limit Archive Files to those containing the named table, and the data
specified. Use the fully qualified table name (dbalias.creatorid.tablename). (The SQL WHERE
clause (sql) must conform to SQL syntax.)
CONN {AND|OR}
Table connector for SELCRITS or SQLTEXTfor multiple tables.

Selection criteria and SQL WHERE clauses are applied to Archive Indexes, if any exist. Depending on
whether the Only Use Index to Perform Search check box on the Archive tab in Personal Options is
selected, criteria may also be applied to Archive File data to identify the desired Archive File. (Refer to
the Common Elements Manual .)

Retrieving Data from the Selected Archive File


You can use the following supported ODBC functions and grammar to query and select data.

396 IBM Optim: Archive User Manual


Refer to the Microsoft ODBC 3.0 Software Development Kit and Programmer's Reference for additional
information about ODBC functions and statements.

Supported Functions
You can use the following supported ODBC functions and grammar to query and select data.

Configuration

v ConfigDriver

v ConfigDSN

ODBC API

v SQLAllocHandle v SQLDriverConnect

v SQLBindCol v SQLEndTran

v SQLBindParameter v SQLExecDirect (Refer to “SELECT Statement Syntax”


on page 398)

v SQLBrowseConnect v SQLExecute

v SQLBulkOperations (always returns HYC00; HYC00 is v SQLExtendedFetch (only FETCH_NEXT supported)


the SQL state for “Optional feature not implemented”)

v SQLCancel v SQLFetch

v SQLCloseCursor v SQLFetchScroll (only FETCH_NEXT supported)

v SQLColAttribute v SQLForeignKeys

v SQLColumns v SQLFreeHandle

v SQLConnect v SQLFreeStmt

v SQLCopyDesc v SQLGetConnectAttr

v SQLDescribeCol v SQLGetCursorName

v SQLDescribeParam v SQLGetData

v SQLDisconnect v SQLGetDescField

v SQLGetDescRec v SQLPrimaryKeys

v SQLGetDiagField v SQLPutData

v SQLGetDiagRec v SQLRowCount

v SQLGetEnvAttr v SQLSetConnectAttr

v SQLGetFunctions v SQLSetCursorName

v SQLGetInfo v SQLSetDescField

v SQLGetStmtAttr v SQLSetDescRec

v SQLGetTypeInfo v SQLSetEnvAttr

v SQLMoreResults v SQLSetPos (always returns HYC00)

v SQLNativeSql v SQLSetStmtAttr

v SQLNumParams v SQLSpecialColumns

Appendix B. ODBC Access to Archived Data 397


v SQLNumResultCols v SQLStatistics

v SQLParamData v SQLTables

v SQLPrepare (Refer to “SELECT Statement Syntax”)

SELECT Statement Syntax


The currently supported SELECT statement syntax is:
SELECT columnname [[as] columnalias] [,columnname [[as]
columnalias] ]
FROM ([[dbalias.]creatorid.]tablename [[as] tablealias])
[WHERE condition]

The following guidelines apply to WHERE conditions:


v condition = [booleanterm [or booleanterm ]]
v booleanterm = [booleanfactor [and booleanfactor ]]
v booleanfactor = [[not] predicate | [not]( condition )]
v predicate = [expression [not] between expression and expression | expression [not] in
(expression {,expression } ) | expression is [not] null | expression [not] like literalstring
[escape literalstring ] | expression relationaloperator expression
v The following relational operator symbols are acceptable:
=, <, >, <=, >=, !=, !<, !>, <>, ^=, ^<, ^>.
v expression = [( expression ) | Literal | [qualifier.] columnname
v qualifier = [dbalias.] creatorid.] tablename | tablealias

398 IBM Optim: Archive User Manual


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 grant 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.

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:

© Copyright IBM Corp. 1994, 2010 399


IBM Corporation
Software Interoperability Coordinator, Department 49XA
3605 Highway 52 N
Rochester, MN 55901
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.

All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without
notice. Dealer prices may vary.

This information is for planning purposes only. The information herein is subject to change before the
products described become available.

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.

Each copy or any portion of these sample programs or any derivative work, must include a copyright
notice as follows:

© (your company name) (year). Portions of this code are derived from IBM Corp. Sample Programs. ©
Copyright IBM Corp. _enter the year or years_. All rights reserved.

400 IBM Optim: Archive User Manual


If you are viewing this information softcopy, the photographs and color illustrations may not appear.

Trademarks
IBM, the IBM logo, DB2, Informix, iSeries, Optim, Tivoli, TotalStorage, z/OS, and ibm.com® are
trademarks or registered trademarks of International Business Machines Corporation in the United States,
other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence
in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common
law trademarks owned by IBM at the time this information was published. Such trademarks may also be
registered or common law trademarks in other countries. A current list of IBM trademarks is available on
the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.

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

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

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

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

Notices 401
402 IBM Optim: Archive User Manual
Index
A Archive Request Editor (continued)
create report 71
Control Files (continued)
Load Request 142
Access Definitions 6, 74 editing Report Request 68 Copy to Backup Device
Key Lookup Limit 319 Email notification 83 option 295
options 13, 74 File Access Definition 70 overview 304
Relationship Index Analysis 321 Generate Statistical Report 311 Currency
Aging Amounts limit rows to extract 71 Insert Request 128
Insert Request 125 menu commands 68 Load Request 181
Load Request 178 object list 80
Alternate File Directory 297 objects to extract 75
Archive Actions 74
Archive Audit Trail 263
Point and Shoot options 77
substitution variables 78
D
migration information 263 Data Model 215
Archive Requests
Archive Directory Database Connections 71, 107, 324
creating 65
Index 220 Date Adjustment Options
Delete options 84
secured files 255, 265, 266 Insert Request 126
editing 67
update entry 259 Load Request 179
run 88
Archive Directory Entry Information 259 Date Adjustment Values
schedule 88
Archive Directory Maintenance 368 Insert Request 125
Start Table 77
Archive Directory Report 193, 196 Load Request 178
Archive File Collection 284 DB2
Archive File Collection Editor 284 check pending status 147
Archive File Filters 221, 250 B copy options for load 151
Archive File Migration 374, 378 Backup devices 293 directory paths for load 152
Archive File Report 193, 200, 203 Centera 294, 298 LOAD Process 146
Archive Files NetWorker 294, 300 log 175
alternate file directory 297 Tivoli 294, 302 Delete Options
Archive Request 70 Archive Request 84
Auto Delete Date 261 Delete Performance Tools 310
copy to backup device 297 C Delete Process Report 110
printing 111
duplicate 294, 297 Calendar
file retention 261, 289 redisplaying 111
Insert Request 126
Restore Request 220 saving 111
Load Request 179
secured 70, 255, 265 statistical information 111
Cascading Delete/Update
segments 294 Delete Process Statistics 84, 315
Confirmation dialog
storage media 63, 289 Delete Processing
Delete 87
using a Storage Profile 293, 306 Access Method 319
Insert 131
Archive Index Maintenance 272, 283 description of 95
LOAD 186
Archive Media 63, 289 monitor progress 109
Centera tab, Storage Profile 294, 298
Archive Performance Tools 310, 324 Primary Key Index Analysis 322
Century Pivot
Delete Process 107 print/redisplay report 111
Insert Request 126
Archive Process Report 91, 94 review process report 110
Load Request 179
print 94 statistical report 84
Command Line Interface
redisplay 94 strategies 309
maintenance utilities 367
save 94 Delete Request Editor
processing utilities 327
statistical information 94 Email Notification 108
restart/retry 362
Archive Process Statistics 71, 311 Generate Statistical Report 315
return codes 365
Archive Processing process options 106
run process request 344
description of 63 Source and Control Files 106
run scheduled job 344
error messages 88 Delete Requests
syntax guidelines 327, 367
monitor progress 90 Access Method 99
Commit Frequency 84
print/redisplay report 94 Archive Server 98
Delete Request 106
review process report 91 Create Index 104
Insert Request 119
statistical information 94 creating 96
common elements 2
Table Access 319 editing 98
common objects 2
warning messages 89 Key Lookup Limit 100
compress files 382
Archive Registration Utility 267 naming conventions 95
Compress Process 382
Archive Request Editor Primary Key Index Analysis 103, 322
Content Addressed Storage, Centera 290
Access Definition options 74 run 108
Control Files
always prompt for values 79 schedule 108
Archive Request 83
Archive Files 70 select 96
Delete Request 106
Archive Index Files 70 statistical report 106

© Copyright IBM Corp. 1994, 2010 403


Delete Requests (continued) Insert Processing (continued) Load Requests (continued)
Table Access Strategy 99 review process report 132 editing 141
Discard Row Limit Insert Request Editor run process immediately 183
Delete Request 107 Age Function 124 schedule 183
Insert Request 119 Currency 128 Source and Control Files 142
Duplicate Archive File 71, 291, 297 Delete Options 118 Lock Tables 84
Duplicate Copy tab, Storage Profile 294, Email Notification 130 Delete Request 106
297 Exception Options 126 Insert Request 119
Global Aging 127 Long Object Names 374
menu commands 115
E Process Options 119
Environment vii
Report Options 129
Source and Control Files 117
M
Error Messages Manage Archive Media 289, 306
Table Map options 118
Archive processing 88 fixed media 289
Insert Requests
Exception Options secondary media 289
run 130
Insert Request 126 Storage Profiles 293, 306
schedule 130
Load Request 179 Migration
Invalid Dates
Exception Tables Archive File history 263
Insert Request 126
in a Load Request 149 Minimum File Retention 298
Load Request 179
naming conventions 162 Minimum Retention Devices 290
Multiple/Rule
Insert Request 126
F J Load Request 179
Join
Fast Load Confirmation 183
specify a relationship 238
File Maintenance
Compress 378
stacked tables 238 N
Remove Rows 378 NetWorker tab, Storage Profile 294, 300
File Recall Path Notify
Centera 298 K Delete Request 108
NetWorker 300 Key Lookup Limit Insert Request 130
Tivoli 302 Delete Request 100 Load Request 183
File Retention tab 294, 304 Report Request 206
Retention After Archive 304
Retention After Recall 304 L
File Retention, Archive Files 261, 289
fixed media 289
load processing 153 O
Load Processing Objects
Fixed media 63
description of 135 Archive Request 75
Fast Load 183 ODBC
load versus insert 113, 135 Access to archived data 389
G monitor progress 185 Define Data Source 391
Generate Statistical Report output files 135 Monitor 390
Archive process 71 print/redisplay report 188 parameter file 395
Delete process 84 review process report 186 SELECT statement syntax 398
Global Aging Load Request 137 Server Command Console 390
Insert Request 127 storage estimate 137 supported functions 397
Load Request 181 Load Request Editor using wildcard patterns 394
Age Function 178 Optim Server 8
Currency 181 Options Menu 237
H DB2 Loader 146
Email Notification 183
Oracle
additional loader parameters 163
HSM systems 290
Exception Options 179 compressed files 162
Exception Table Options 149 disable constraints 160
Global Aging 181 disable triggers 160
I Informix Loader 171 discard options for load 162
Index Analysis 321 iSeries Load 153 exception tables 162
Index Maintenance 274 loader options 145 load commit frequency 162
Informix menu commands 144 load processing 159
additional loader parameters 172 Oracle Loader 159 method for load 159
disable constraints 173 Report Options 182
disable triggers 172 SQL Server Loader 166
discard options for load 172
load processing 171
Sybase ASE Loader 163
Table Map options 142
P
Point and Shoot
Insert Processing Teradata Loader 154
Archive Request 76
description of 113 z/OS Loader 175
components 237
overwrite Control File 117, 142 Load Requests
display attributes 237
print/redisplay report 134 avoid long file names 136

404 IBM Optim: Archive User Manual


Point and Shoot (continued) Rules Table Maps
file options 235 Insert Request 126 always view 142
format 237 Load Request 179 Insert Request 118
Options menu 237 Load Request 142
primary keys 236 Tape Storage
processing rules 236
show excluded rows 238
S NetWorker 289
Tivoli 289
Sample Database 8
Point and Shoot Editor Teradata
Search
browse window 237 additional loader parameters 158
Archive Files 221
join multiple tables 238 load processing 154
Indeterminate 228, 256
stacked tables 238 Tivoli tab, Storage Profile 294, 302
Resolve 254
toolbar buttons 237
single step search 228, 256
PR0CMND 327, 367
secondary media 289
PR0COMS 390
Primary Copy tab, Storage Profile 295
Secondary Media 63 U
Segment Utilities
Primary Key Index Analysis 103, 322
naming 294 Archive Directory Maintenance 250
size 294 Archive Registration 267
Selection Criteria Storage Profile 293
R relational operators 231, 256
Recall Archive File, overview 304 SQL WHERE Clause 202, 231, 256
Relationship Index Analysis 321
Relationships
Selective Restore 228
Skipped Dates
V
Variables
for joining tables 238 Insert Request 126
always prompt for values 79
Report Options 71 Load Request 180
default values 79
Insert Request 129 Source File
prompt string 79
Load Request 182 Delete Request 106
SQL syntax 79
Report Request Editor 189, 206 Load Request 145
VERITAS Enterprise Vault 290
Email notification 206 SQL Server
menu commands 192 additional loader parameters 170
Report Files 194 disable constraints 168
Report Type 193 disable triggers 168 W
Report Requests discard options for load 168 Warning Messages
Archive Criteria 194 load processing 166 Archive Process 89
Archive Details 203 Stacked Tables 238 WORM Device
Archive Directory 193, 196 Start Table duplicate Archive File 297
create 190 Archive Request 77 primary Archive File 295
edit 67, 191 Local Selection Criteria 235
Formatting 204 Restore Request 214, 216
Output Options 194
processing 206
Statistical Information
Archive Process Report 94, 311
Z
z/OS
Report File Name 194 Delete Process Report 111, 315
load processing 175
Report Type 193 Statistical Reports 311, 315
Sysin Load Statement Options 175
run 206 Storage Media 63, 289
schedule 206 Storage Profiles 71
Source File 193, 200 copy to backup device 295
Request Selection Mode 214 overview 304
Restore Processing create 291
monitor progress 241 Duplicate Copy tab 297
print/redisplay report 244 open 292
review process report 244 Primary Copy tab 295
Restore Request Editor recall Archive File, overview 304
Add Archive Files 220 segment size 294
Restore Requests WORM device 295, 297
Archive Directory Index 220 Subset Extract Files 214
command line 240 Sybase ASE
creating 212 additional loader parameters 164
editing 213 disable triggers 164
Modified Access Definitions 216 discard options for load 164
Point and Shoot 234, 235 load processing 163
Resolve 228
run 240
schedule 240
Selection mode 214
T
Table Access Strategy 99, 319
Selective restore criteria 228
Table Map Editor
Retention Policy 289
menu commands 99
Retention Policy tab 306

Index 405
406 IBM Optim: Archive User Manual


Printed in USA

You might also like