OMS AND AGENTS
==============
http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_EnterpriseManagerBestPractices.pdf

Install at least one additional OMS using the OUI option ‘Add Additional Management Service’.

$ORACLE_HOME/sysman/config/emoms.properities
oracle.sysman.eml.mntr.emdRepConnectDescriptor=
   (DESCRIPTION=(ADDRESS_LIST=(FAILOVER=ON)
     (ADDRESS=(PROTOCOL=TCP)(HOST=hostname.oms1.com) (PORT=1521))
     (ADDRESS=(PROTOCOL=TCP)(HOST=hostname.oms2.com) (PORT=1521))
   (CONNECT_DATA=(SERVICE_NAME=EMREP)))

execute: emctl config oms loader -shared yes -dir ’

REPOSITORY DB
=============
• Enable ARCHIVELOG Mode
• Enable Block Checksums
• Configure the Size of Redo Log Files and Groups Appropriately
• Use a Flash Recovery Area
• Enable Flashback Database
• Use Fast-Start Fault Recovery to Control Instance Recovery Time
• Enable Database Block Checking
• Set DISK_ASYNCH_IO
(Oracle® Database High Availability Best Practices 10g Release 2 (10.2))

AGENTS
======
Use hardware Server Load Balancer (SLB) between the agents and the OMSes.
Modify the ServerName property defined in the Oracle HTTP Server configuration file at
$ORACLE_HOME/Apache/Apache/conf/ssl.conf
to point to the Virtual host name being managed by the Load Balancer.

Modify the ‘Port’ in the Oracle HTTP Server configuration file at
$ORACLE_HOME/Apache/Apache/conf/ssl.conf to be ‘443.

Note:: complete outline of the steps required to configure a hardware Load Balancer for EM High Availability
is published on Web IV, Note 353074.1, How to configure Grid Control 10.2 Management Servers behind a Server Load Balancer (SLB)
(https://metalink2.oracle.com/metalink/plsql/f?p=130:14:3505972173805869015::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,353074.1,1,0,1,helvetica)

DR
==
• Create standby database
• Return to the Enterprise Manager console and discover the new standby database.
• Navigate to primary database targets page and follow the instructions (below) to bring the primary and standby database under Data Guard Broker Control.
• If the standby database instance is to be a RAC cluster, follow the steps documented in the white paper ‘MAA / Data Guard 10g Release 2 Setup Guide –Creating a RAC Logical Standby for a RAC Primary’
Configure the primary repository and standby repository with the recommendations listed in Section 2.4 of the Oracle® Database High Availability Best Practices 10g Release 2 (10.2) Part Number B25159-01.

Use the ‘Create Additional Management Service’ option of the EM Installer to add the secondary OMS processes.
1. Configure the OMS to point to the repository running on the primary during install.
2. After the install is complete, shutdown the OMS and edit the $ORACLE_HOME/sysman/config/emoms.properities file to
modify the following properties to point the OMS to the standby database:
  oracle.sysman.eml.mntr.emdRepConnectDescriptor=
  oracle.sysman.emSDK.svlt.ConsoleServerName=
add the following property:
  em.FastConnectionFailover=true

Configure Triggers to start OMS at standby site:
An ability of the database is the facility to execute Oracle triggers to be fired database startup.
Combined with Data Guard these triggers can be configured to start OMS processes at the standby site after a Data Guard switchover or failover occurs. Examples of these triggers as they relate to Enterprise Manager are in the Appendix.

A complete reference on the underlying technology used to automate these client failovers is documented in the Client Failover Best Practices for Highly Available Oracle Databases: Oracle Database 10g Release 2, located on the OTN on the Maximum Availability Architecture Page.

Note: The standby OMS processes can be kept ready for service (not started) until the Data Guard failover triggers are initiated or be configured to service requests from the primary if network latency between the primary and standby is low.

Examples of DB Disaster Recovery Triggers & Scripts:
====================================================
The following trigger will be fired on the start up of any instance of a database.
The trigger will call the script ‘start_oms’, which will start an OMS process.
This facility can be used to start the OMS for a standby database in the event of an unplanned site outage

CREATE OR REPLACE TRIGGER manage_service after startup on database
DECLARE
  role VARCHAR(30);
BEGIN
  SELECT DATABASE_ROLE INTO role FROM V$DATABASE;
  IF role = ‘PRIMARY’ THEN
    DBMS_SERVICE.START_SERVICE(‘gcha_oms’);
    begin
      dbms_scheduler.create_job(
        job_name=>’oms_start’,
        job_type=>’executable’,
        job_action=>’