How to run Observer Process as a Background Process
In Oracle Data Guard, the Observer process is a component of the Fast-Start Failover (FSFO) feature, which automates the failover process in a Data Guard configuration. The Observer continuously monitors both the primary and standby databases, ensuring high availability by automatically triggering a failover to the standby database if the primary database becomes unavailable. Here’s an overview of its function, requirements, and configuration steps:
Key Functions of the Observer Process
- Continuous Monitoring: The Observer is typically hosted on a separate third-party server, ideally on a different site, ensuring that it remains unaffected by local network or server issues at the primary or standby locations.
- Automatic Failover: If the Observer loses connectivity to the primary database and confirms that the primary database is inaccessible, it initiates a fast-start failover to the standby database, minimizing downtime.
- Primary Reinstatement: Once the failover completes and the original primary server is back online, the Observer can help facilitate the reinstatement of the old primary database as a new standby.
Requirements for Fast-Start Failover and the Observer Process
- Data Guard Broker must be configured and enabled in the environment.
- Protection Mode must be set to
Maximum Availability
orMaximum Performance
. - Standby Redo Logs must be configured on the standby database.
- The Observer should ideally run on a separate machine that can access both primary and standby sites.
How to run Observer Process as a Background Process
To run the Oracle Data Guard Observer in the background, you can use the following approach:
1. start the dgmgrl process with nohup command, eg:
nohup dgmgrl -logfile /tmp/dgmgrl.log <connect sys/passwd@connect_string
start observer
EOF
2. create a shell script and run the shell script at background:
create observer.sh like:
#!/bin/ksh
## Script to start observer via DGMGRL
dgmgrl -echo -logfile /tmp/dgmgrl.log << EOF
connect sys/passwd@connect_string
start observer
EOF
chmod +x observer.sh
./observer.sh &
3. From 11.2 onwards, one can use the following command to start observer:
% dgmgrl -logfile /tmp/observer.log sys/passwd@connect_string "start observer" &
No Comments