9 Configuring Oracle Management Agent for High Availability

You can configure Oracle Enterprise Manager 10g Grid Control to monitor databases configured for high availability by using the following procedure:

  1. Install Oracle Management Agent.

  2. Create an Oracle Management Agent that listens on a virtual address.

  3. Add the Oracle Management Agent created in Step 2 to the same group as the Oracle Database (or databases) configured for high availability.

  4. Configure the Oracle Management Agent to monitor the database or databases.

The following topics are discussed in this chapter:

9.1 Prerequisites for High Availability

You must install the following software on the cluster system before you can configure an Oracle Management Agent for high availability:

  • Oracle Database – any release supported by Oracle Enterprise Manager 10g Grid Control

  • Oracle Management Agent

    You must install the Management Agent on each cluster node, using the same Oracle home on each node.

  • Oracle Fail Safe

In addition, the following components must be configured:

  • An Oracle database instance must be configured for high availability.

  • An Oracle Enterprise Manager Management Server must be configured and available for setup. The Management Server need not reside on the cluster system.

9.2 Procedure for Configuring Oracle Management Agent for High Availability

You must follow the following steps to configure Oracle Management Agent for high availability:

Step 1   Make the Management Agent Highly Available

Use Oracle Fail Safe Manager to add the new Oracle Management Agent to the Fail Safe group that contains the databases it will monitor. Oracle Fail Safe will create a Generic Service resource for the Oracle Management Agent when you select the Oracle Management Agent Resource Type in the Add Resource to Group Wizard. Follow these steps:

  1. From the Resources menu, click Add to Group. The Add Resource to Group Wizard opens.

    Figure 9-1 Add Resource to Group Wizard - Resource Page

    Description of Figure 9-1 follows
    Description of "Figure 9-1 Add Resource to Group Wizard - Resource Page"

  2. In the Resource Type box, select Oracle Management Agent.

  3. In the Group Name box, select the group to which you want to add Oracle Management Agent. This must be the group that contains the database you want to monitor with Oracle Management Agent.

  4. Click Next. The Management Agent Oracle Home page opens.

    Figure 9-2 Add Resource to Group Wizard - Management Agent Oracle Home Page

    Description of Figure 9-2 follows
    Description of "Figure 9-2 Add Resource to Group Wizard - Management Agent Oracle Home Page"

  5. In the Oracle Home box, select the Oracle home that you want to add to the group.

  6. Select the shared disk that will be used to store Management Agent context information.

  7. Click Next. The Management Agent Virtual Address page opens.

    Figure 9-3 Add Resource to Group Wizard - Management Agent Virtual Address Page

    Description of Figure 9-3 follows
    Description of "Figure 9-3 Add Resource to Group Wizard - Management Agent Virtual Address Page"

  8. In the Virtual Address box, select the desired virtual address.

  9. In the Port box, enter an open port number.

  10. Click Next. The Management Agent password page opens.

    Figure 9-4 Add Resource to Group Wizard - Management Agent Page

    Description of Figure 9-4 follows
    Description of "Figure 9-4 Add Resource to Group Wizard - Management Agent Page"

  11. Provide the password used for the Oracle Management Server.

  12. Click Finish. The Finish Adding Management Agent window opens.

  13. This window summarizes the properties you have set with the wizard. If the summary information is correct, then click OK. Otherwise, click Cancel and then click Back to find the page or pages in the wizard on which you want to change entries.

    When you click OK, a window opens to display the progress of this clusterwide operation. (A clusterwide operation is one that occurs on multiple cluster nodes.)

Step 2   Add the Highly Available Database as a Target in Oracle Enterprise Manager

To configure the highly available database for monitoring through the highly available Management Agent, follow these steps:

  1. Log in to the Oracle Enterprise Manager 10g Grid Control Console.

  2. Click the Targets tab. The Hosts page opens.

  3. Click the Databases secondary tab. The Databases page opens.

  4. Click Add (in the upper right-hand section of the page). The Add Database Target: Specify Host page opens.

  5. Click the flashlight icon. The Search and Select Host window opens.

  6. Select the virtual host, and then click Select. The Search and Select Host window closes and the Host field in the Add Database to Target: Specify Host page contains the selected virtual host.

  7. Click Continue. The Targets Discovered on Host page opens.

  8. Select the highly available database or databases that you want to monitor, then click OK. The Database Configuration Results page opens.

  9. Click OK.

Step 3   Test the Highly Available Management Agent

To test that the Management Agent is highly available, run a job against the highly available database it is monitoring, and follow these steps:

  1. Log in to the Oracle Enterprise Manager 10g Grid Control Console.

  2. Create a SQL job and submit it against the highly available database, as follows:

    1. Click the Jobs tab. The Job Activity page opens.

    2. In the Create Job box, select SQL Script, and then click Go. The Create 'SQL Script' Job page opens.

    3. In the Job Name box, enter TEST JOB, and in the SQL Script field, enter SELECT * FROM ts$.

    4. In the Databases region of the page, click Add. The Add Targets page opens.

    5. Select the highly available database host name (which matches the virtual host name), and then click Add. The Create 'SQL Script' Job page opens.

    6. In the Host and Database Credentials portion of the page, specify the database credentials, and then click Submit.

  3. Ensure that the submitted job completes successfully.

  4. Create another job against the same database (by following Step 1 and Step 2 in this list), but schedule it for 10 minutes from the current time.

  5. Using Oracle Fail Safe Manager, fail over the group.

  6. After 10 minutes pass, check that the second job scheduled ran successfully.

Step 4   Remove Extraneous Targets from the Oracle Enterprise Manager Environment

When you reach this step, the Oracle Enterprise Manager 10g Grid Control Console shows three targets for the same database. During the Management Agent installation, the installer automatically discovers Oracle components, including highly available databases, and adds the discovered components as targets.

Because the highly available database instance exists on each cluster node, there are two targets for the database – each monitored by a different Management Agent. In addition, you create a third target when you add the database as a target for the highly available Management Agent listening on the virtual server (in Chapter 10, "Configuring Oracle Application Server Components for High Availability").

You can safely remove the database targets that were discovered when the Management Agent was installed by performing the following steps:

  1. Log in to the Oracle Enterprise Manager 10g Grid Control Console.

  2. Click the Targets tab. The Hosts page opens.

  3. Click the physical (as opposed to virtual) host name for one of the cluster nodes. The Host page for that physical host opens.

  4. Click the Targets locator link.

  5. Select the database on this host, and then click Remove.

  6. Repeat Step 2 though Step 5 for each cluster node.

9.3 Removing Oracle Management Agent from a Group

If you decide you no longer want to have an Oracle Management Agent configured for high availability, then remove it from the group that contains it. When you do so, the Oracle Management Agent is deleted from the cluster.

To remove an Oracle Management Agent from a group, perform the following steps:

  1. Open Oracle Fail Safe Manager.

  2. In the tree view, select the Oracle Management Agent that you want to remove and then, on the Resources menu, select Remove from Group.

  3. The Confirm Remove from Group box opens. Click Yes in the Confirm Remove from Group box.