Skip Navigation Links
Exit Print View
| Oracle Solaris Cluster Data Services Reference Manual Oracle Solaris Cluster 4.1

Search Scope:

- This Document
- Entire Library

### custom_action_file

- file that defines custom behavior of fault monitors for HA Oracle server resources and Oracle RAC server resources

## Description

A custom action file is a plain text file. The file contains one or more entries that define the custom behavior of fault monitors for the following resources:

- HA Oracle server resources. These resources are instances of the `SUNW.oracle_server`(5) resource type.

- Oracle Real Application Clusters (RAC) server resources. These resources are instances of the Broken Link (Target ID: SUNW.SCALABLE-RAC-SERVER-5) resource type.

Each entry defines the custom behavior for a single database management system (DBMS) error, a single timeout error, or several logged alerts. A maximum of 1024 entries is allowed in a custom action file.

Note - Each entry in a custom action file overrides the preset action for an error, or specifies an action for an error for which no action is preset. Create entries in a custom action file only for the preset actions that you are overriding or for errors for which no action is preset. Do not create entries for actions that you are not changing.

An entry in a custom action file consists of a sequence of keyword-value pairs that are separated by semicolons. Each entry is enclosed in braces.

The format of an entry in a custom action file is as follows:

    {
    [ERROR_TYPE=DBMS_ERROR|SCAN_LOG|TIMEOUT_ERROR;]
    ERROR=error-spec;
    [ACTION=SWITCH|RESTART|STOP|NONE;]
    [CONNECTION_STATE=co|di|on|*;]
    [NEW_STATE=co|di|on|*;]
    [MESSAGE="message-string"]
    }

White space may be used between separated keyword-value pairs and between entries to format the file.

The meaning and permitted values of the keywords in a custom action file are as follows:

`ERROR_TYPE`

  Indicates the type of the error that the server fault monitor has detected. The following values are permitted for this keyword:

  `DBMS_ERROR`

    Specifies that the error is a DBMS error.

  `SCAN_LOG`

    Specifies that the error is an alert that is logged in the alert log file.

  `TIMEOUT_ERROR`

    Specifies that the error is a timeout.

  The `ERROR_TYPE` keyword is optional. If you omit this keyword, the error is assumed to be a DBMS error.

```ERROR`

  Identifies the error. The data type and the meaning of error-spec are determined by the value of the `ERROR_TYPE` keyword as shown in the following table.

  `ERROR_TYPE` | Data Type | Meaning
  --- | --- | ---
  `DBMS_ERROR` | Integer | The error number of a DBMS error that is generated by Oracle
  `SCAN_LOG` | Quoted regular expression | A string in an error message that Oracle has logged to the Oracle alert log file
  `TIMEOUT_ERROR` | Integer | The number of consecutive timed-out probes since the server fault monitor was last started or restarted

  You must specify the `ERROR` keyword. If you omit this keyword, the entry in the custom action file is ignored.

`ACTION`

  Specifies the action that the server fault monitor is to perform in response to the error. The following values are permitted for this keyword:

  `NONE`

    Specifies that the server fault monitor ignores the error.

  `STOP`

    Specifies that the server fault monitor is stopped.

  `RESTART`

    Specifies an action that depends on the type of resource for which the fault monitor that is being customized:

    - HA Oracle server resource. Specifies that the server fault monitor stops and restarts the entity that is specified by the value of the `Restart_type` extension property of the `SUNW.oracle_server` resource.

    - Oracle RAC server resource. Specifies that the server fault monitor stops and restarts the Oracle RAC server resource.

  `SWITCH`

    Specifies that the server fault monitor switches over the database server resource group to another node.

    Note - Do not specify the `SWITCH` keyword in the custom action file for an Oracle RAC server fault monitor. For the Oracle RAC server fault monitor, the `SWITCH` keyword performs no action.

  The `ACTION` keyword is optional. If you omit this keyword, the server fault monitor ignores the error.

`CONNECTION_STATE`

  Specifies the required state of the connection between the database and the server fault monitor when the error is detected. The entry applies only if the connection is in the required state when the error is detected. The following values are permitted for this keyword:

  `*`

    Specifies that the entry always applies, regardless of the state of the connection.

  `co`

    Specifies that the entry applies only if the server fault monitor is attempting to connect to the database.

  `on`

    Specifies that the entry applies only if the server fault monitor is online. The server fault monitor is online if it is connected to the database.

  `di`

    Specifies that the entry applies only if the server fault monitor is disconnecting from the database.

  The `CONNECTION_STATE` keyword is optional. If you omit this keyword, the entry always applies, regardless of the state of the connection.

`NEW_STATE`

  Specifies the state of the connection between the database and the server fault monitor that the server fault monitor must attain after the error is detected. The following values are permitted for this keyword:

  `*`

    Specifies that the state of the connection must remain unchanged.

  `co`

    Specifies that the server fault monitor must disconnect from the database and reconnect immediately to the database.

  `di`

    Specifies that the server fault monitor must disconnect from the database. The server fault monitor reconnects when it next probes the database.

  The `NEW_STATE` keyword is optional. If you omit this keyword, the state of the database connection remains unchanged after the error is detected.

`MESSAGE`

  Specifies an additional message that is printed to the resource's log file when this error is detected. The message must be enclosed in double quotes. This message is additional to the standard message that is defined for the error.

  The `MESSAGE` keyword is optional. If you omit this keyword, no additional message is printed to the resource's log file when this error is detected.

## Examples

Example 1 Changing the Response to a DBMS Error to Restart

    {
    ERROR_TYPE=DBMS_ERROR;
    ERROR=4031;
    ACTION=restart;
    CONNECTION_STATE=*;
    NEW_STATE=*;
    MESSAGE="Insufficient memory in shared pool.";
    }

This example shows an entry in a custom action file that overrides the preset action for DBMS error 4031. This entry specifies the following behavior:

- In response to DBMS error 4031, the action that the server fault monitor performs is restart.

- This entry applies regardless of the state of the connection between the database and the server fault monitor when the error is detected.

- The state of the connection between the database and the server fault monitor must remain unchanged after the error is detected.

- The following message is printed to the resource's log file when this error is detected:

      Insufficient memory in shared pool.

Example 2 Ignoring a DBMS Error

    {
    ERROR_TYPE=DBMS_ERROR;
    ERROR=4030;
    ACTION=none;
    CONNECTION_STATE=*;
    NEW_STATE=*;
    MESSAGE="";
    }

This example shows an entry in a custom action file that overrides the preset action for DBMS error 4030. This entry specifies the following behavior:

- The server fault monitor ignores DBMS error 4030.

- This entry applies regardless of the state of the connection between the database and the server fault monitor when the error is detected.

- The state of the connection between the database and the server fault monitor must remain unchanged after the error is detected.

- No additional message is printed to the resource's log file when this error is detected.

Example 3 Changing the Response to a Logged Alert

    {
    ERROR_TYPE=SCAN_LOG;
    ERROR="ORA-00600: internal error";
    ACTION=RESTART;
    }

This example shows an entry in a custom action file that overrides the preset action for logged alerts about internal errors. This entry specifies the following behavior:

- In response to logged alerts that contain the text `ORA-00600: internal error`, the action that the server fault monitor performs is restart.

- This entry applies regardless of the state of the connection between the database and the server fault monitor when the error is detected.

- The state of the connection between the database and the server fault monitor must remain unchanged after the error is detected.

- No additional message is printed to the resource's log file when this error is detected.

Example 4 Changing the Maximum Number of Consecutive Timed-Out Probes

    {
    ERROR_TYPE=TIMEOUT;
    ERROR=2;
    ACTION=NONE;
    CONNECTION_STATE=*;
    NEW_STATE=*;
    MESSAGE="Timeout #2 has occurred.";
    }

    {
    ERROR_TYPE=TIMEOUT;
    ERROR=3;
    ACTION=NONE;
    CONNECTION_STATE=*;
    NEW_STATE=*;
    MESSAGE="Timeout #3 has occurred.";
    }

    {
    ERROR_TYPE=TIMEOUT;
    ERROR=4;
    ACTION=NONE;
    CONNECTION_STATE=*;
    NEW_STATE=*;
    MESSAGE="Timeout #4 has occurred.";
    }

    {
    ERROR_TYPE=TIMEOUT;
    ERROR=5;
    ACTION=RESTART;
    CONNECTION_STATE=*;
    NEW_STATE=*;
    MESSAGE="Timeout #5 has occurred. Restarting.";
    }

This example shows the entries in a custom action file for increasing the maximum number of consecutive timed-out probes to five. These entries specify the following behavior:

- The server fault monitor ignores the second consecutive timed-out probe through the fourth consecutive timed-out probe.

- In response to the fifth consecutive timed-out probe, the action that the server fault monitor performs is restart.

- The entries apply regardless of the state of the connection between the database and the server fault monitor when the timeout occurs.

- The state of the connection between the database and the server fault monitor must remain unchanged after the timeout occurs.

- When the second consecutive timed-out probe through the fourth consecutive timed-out probe occurs, a message of the following form is printed to the resource's log file:

      Timeout #number has occurred.

- When the fifth consecutive timed-out probe occurs, the following message is printed to the resource's log file:

      Timeout #5 has occurred. Restarting.

## See Also

`SUNW.oracle_server`(5), Broken Link (Target ID: SUNW.SCALABLE-RAC-SERVER-5)

Oracle Solaris Cluster Data Service for Oracle Guide

Copyright © 2000, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |