3.42 DDLERROR

Valid For

Extract and Replicat

Description

Use the DDLERROR parameter to handle DDL errors on the source and target systems. Options are available for Extract and Replicat.

DDLERROR for Extract

Use the Extract option of the DDLERROR parameter to handle errors on objects found by Extract for which metadata cannot be found.

Default

Abend

Syntax

DDLERROR [RESTARTSKIP number_of_skips] [RETRYDELAY seconds] [SKIPTRIGGERERROR number_of_errors]
RESTARTSKIP number_of_skips

Causes Extract to skip and ignore a specific number of DDL operations on startup, to prevent Extract from abending on an error. By default, a DDL error causes Extract to abend so that no operations are skipped. Valid values are 1 to 100000.

To write information about skipped operations to the Extract report file, use the DDLOPTIONS parameter with the REPORT option.

SKIPTRIGGERERROR number_of_errors

(Oracle) Causes Extract to skip and ignore a specific number of DDL errors that are caused by the DDL trigger on startup. Valid values are 1 through 100000.

SKIPTRIGGERERROR is checked before the RESTARTSKIP option. If Extract skips a DDL operation because of a trigger error, that operation is not counted toward the RESTARTSKIP specification.

DDLERROR for Replicat

Use the Replicat options of the DDLERROR parameter to handle errors that occur when DDL is applied to the target database. With DDLERROR options, you can handle most errors in a default manner, for example to stop processing, and also handle other errors in a specific manner. You can use multiple instances of DDLERROR in the same parameter file to handle all errors that are anticipated.

Default

Abend

Syntax

DDLERROR
{error | DEFAULT} {response}
{INCLUDE inclusion_clause | EXCLUDE exclusion_clause}
[IGNOREMISSINGOBJECTS | ABENDONMISSINGOBJECTS] 
[RETRYDELAY seconds] 
{error | DEFAULT} {response}
error

Specifies an explicit DDL error for this DDLERROR statement to handle.

DEFAULT

Specifies a default response to any DDL errors for which there is not an explicit DDLERROR statement.

response

The action taken by Replicat when a DDL error occurs. Can be one of the following:

ABEND

Roll back the operation and terminate processing abnormally. ABEND is the default.

DISCARD

Log the offending operation to the discard file but continue processing subsequent DDL.

IGNORE

Ignore the error.

{INCLUDE inclusion_clause | EXCLUDE exclusion_clause}

Identifies the beginning of an inclusion or exclusion clause that controls whether specific DDL is handled or not handled by the DDLERROR statement. See "DDL Filtering Options" for syntax and usage.

[IGNOREMISSINGOBJECTS | ABENDONMISSINGOBJECTS]

Controls whether or not Extract abends when DML is issued on objects that could not be found on the target. This condition typically occurs when DDL that is not in the replication configuration is issued directly on the target, or it can occur when there is a discrepancy between the source and target definitions.

IGNOREMISSINGOBJECTS

Causes Replicat to skip DML operations on missing tables.

ABENDONMISSINGOBJECTS

Causes Replicat to abend on DML operations on missing tables.

[RETRYDELAY seconds]

Specifies the delay in seconds between attempts to retry a failed operation. The default is 10 seconds.

Examples

Example 1   DDLERROR Basic Example

In the following example, the DDLERROR statement causes Replicat to ignore the specified error, but not before trying the operation again three times at ten-second intervals. Replicat applies the error handling to DDL operations executed on objects whose names satisfy the wildcard of tab* (any user, any operation) except those that satisfy tab1*.

DDLERROR 1234 IGNORE RETRYOP MAXRETRIES 3 RETRYDELAY 10 &
INCLUDE ALL OBJTYPE TABLE OBJNAME tab* EXCLUDE OBJNAME tab1*

To handle all errors except that error, the following DDLERROR statement can be added.

DDLERROR DEFAULT ABEND

In this case, Replicat abends on DDL errors.

Example 2   Using Multiple DDLERROR Statements

The order in which you list DDLERROR statements in the parameter file does not affect their validity unless multiple DDLERROR statements specify the same error, without any additional qualifiers. In that case, Replicat only uses the first one listed. For example, given the following statements, Replicat will abend on the error.

DDLERROR 1234 ABEND
DDLERROR 5678 IGNORE

With the proper qualifiers, however, the previous configuration becomes a more useful one. For example:

DDLERROR 1234 ABEND INCLUDE OBJNAME tab*
DDLERROR 5678 IGNORE

In this case, because there is an INCLUDE statement, Replicat will abend only if an object name in an errant DDL statement matches wildcard tab*. Replicat will ignore errant operations that include any other object name.