Explain the purpose of the REPERROR replicat parameter

Explain the purpose of the REPERROR replicat parameter

Questions and Answers

The REPERROR parameter is valid for Replicat only

Use the REPERROR parameter to control how Replicat responds to errors. You can use one
REPERROR statement to handle most errors in a default manner while using one or more
other REPERROR statements to handle specific errors differently. For example, you can ignore
duplicate-record errors but abort processing in all other cases.

In the syntax shown, note that the <error>, <response> specification must be within
parentheses. For example:
REPERROR (DEFAULT, ABEND)
REPERROR (-1, IGNORE)

However, the RESET option cannot be within parentheses:
REPERROR RESET

Default TRANSABORT for deadlocks; ABEND for all others.

Syntax REPERROR { (
{DEFAULT | DEFAULT2 | <SQL error> | <user-defined error>},
{ABEND | DISCARD | EXCEPTION | IGNORE | RETRYOP [MAXRETRIES <n>] |
TRANSABORT [, MAXRETRIES] [, DELAYSECS <n> | DELAYCSECS <n>] }) | RESET }

The following options specify the error to handle:

Argument

Description

DEFAULT

Sets a global response to all errors except those for which explicit REPERROR statements are specified

DEFAULT2

Provides a backup default action when the response for DEFAULT is set to EXCEPTION. Use DEFAULT2 when an exceptions MAP statement is not specified for a MAP statement for which errors are anticipated.

{SQL error}

A SQL error number.

{user-defined error}

A user-defined error that is specified with the RAISEERROR option of a FILTER clause within a MAP statement

The following options specify a response to the error:

Argument

Description

ABEND

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

DISCARD

Log the error to the discard file but continue processing the transaction and subsequent transactions

EXCEPTION

Handle the error as an exception. In anticipation of possible errors, you can create an exceptions MAP statement that executes only after an error. Use that MAP statement, for example, to map columns from a failed update statement into a “missing update” table. In the parameter file, specify the exceptions MAP statement after the MAP statement for which the error is anticipated

IGNORE

Ignore the Error

RETRYOP [MAXRETRIES {n}]

Retry the operation. Use the MAXRETRIES option to control the number of retries. For example, if a table is out of extents, RETRYOP with MAXRETRIES gives you time to add extents so the transaction does not fail. Replicat abends after the specified number of MAXRETRIES.

TRANSABORT [, MAXRETRIES {n}] , [, DELAYSECS {n}| , DELAYCSECS {n}}

Abort the transaction and reposition to the beginning of the transaction. This will continue either until the record(s) are processed successfully or MAXRETRIES expires. If MAXRETRIES is not set, the TRANSABORT action will loop continuously.
Use a DELAY option to delay the retry. The default delay is 60 seconds.
The TRANSABORT option is useful for handling timeouts and deadlocks on databases that support those conditions.

RESET

Removes all error rules specified with previous REPERROR statements in the parameter file. Restores the default of ABEND on all errors.
Replicat rolls back the transaction and terminates processing abnormally. This option is not available for use with REPERROR in a MAP statement.


Sobre Alexandre Pires

ORACLE OCS Goldengate Specialist, OCE RAC 10g R2, OCP 12C, 11g, 10g , 9i e 8i - Mais de 25 anos de experiência na área de TI. Participei de projetos na G&P alocado na TOK STOK, EDINFOR alocado na TV CIDADE "NET", 3CON Alocado no PÃO DE AÇUCAR, DISCOVER alocado na VIVO, BANCO IBI e TIVIT, SPC BRASIL, UOLDIVEO alocado no CARREFOUR e atualmente na ORACLE ACS atendendo os seguintes projetos: VIVO, CLARO, TIM, CIELO, CAIXA SEGUROS, MAPFRE, PORTO SEGURO, SULAMERICA, BRADESCO SEGUROS, BANCO BRADESCO, BASA, SANTANDER, CNJ, TSE, ELETROPAULO, EDP, SKY, NATURA, ODEBRESHT, NISSEI, SICREDI, CELEPAR, TAM, TIVIT, IBM, SMILES, CELEPAR, SERPRO,OKI,BANCO PAN, etc
Esse post foi publicado em GOLDENGATE. Bookmark o link permanente.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s