The cdc_errortext() function

Returns the error message text corresponding to the specified symbolic error name.

Symbolic error names are listed in the syscdcerrcodes table in the syscdc database.

Syntax


1  cdc_errortext ( ' error_name ' , ' locale_name ' )

Function arguments

Table 1. The cdc_errortext() arguments
Argument Data Type Description
error_name LVARCHAR The symbolic name of the error.
locale_name LVARCHAR The name of the locale in which to display the error text. If locale name parameter is SQL NULL or a string of 0 length ("") the default locale is used.

Usage

Use the cdc_errortext() function to return the error text for an error that you received from another CDC function. Not all error texts are available in all locales. If the cdc_errortext() function does not return the text in the locale you specified, try to run the function again with a different locale, such as 'en_us.819' or 'en_us.0333'.

Return values

If successful, returns SQLCODE 0 and the error message text.

If unsuccessful, returns with a nonzero SQLCODE:

  • 23109: Invalid locale specification.

    The locale name is not correct or the specified locale was not found.

  • 1824: Message cannot be found.

    The locale is valid but the message was not found in the message file for that locale. Specify a different locale, such as en_us.0333.

  • Other SQLCODES represent internal errors.

Example

The following example returns the error text for the error CDC_E_TABCAPTURED in the en_us.0333 locale:
> select cdc_errortext('CDC_E_TABCAPTURED', 'en_us.0333') from syscdcvers;


(expression)  The specified table is already being captured by the CDC session.
              
               
1 row(s) retrieved.