START OBSERVER
The START OBSERVER command starts a fast-start failover observer on this host (where the DGMGRL session is running), if there is no registered observer running on this host for this configuration.
Before using this command, you must first issue a CONNECT command to log into a specific broker configuration. Otherwise, an error message is returned stating that you are not logged on.
Format
START OBSERVER [<observer_name>] [FILE IS <observer_file>] [LOGFILE IS <observer_log_file>] [TRACE_LEVEL IS { USER | SUPPORT }];
Command Parameters
- observer_name
- A name to identify observers within the same Data Guard broker configuration.
-
No two observers on the same Data Guard broker configuration can have the same name.
-
If no name is specified for the observer then a default observer name, the host name of machine where the
START OBSERVERcommand is issued, is used. -
An observer name is case-insensitive.
-
The strings "NONAME" and "ALL" cannot be used as an observer name.
-
- observer_log_file
- Specifies the path and name of the
runtime data file. If you specify only a file name, the path used is
$DG_ADMIN/config_ConfigurationSimpleName/dat. If you omit both the path and file name, the file name defaults tofsfo_hostname.datand the path is$DG_ADMIN/config_ConfigurationSimpleName/dat. If theDG_ADMINenvironment variable is not defined, the default path is the current working directory. - log_file
- The full path name of the observer log file. Each observer has its own log file.
Usage Notes
-
You can register up to four observers to monitor a single Data Guard broker configuration. Each observer is identified by a name that you supply when you issue the
START OBSERVERcommand. See Installing and Starting the Observer. -
The optional clause
TRACE_LEVEL ISlets you control the amount of tracing done and written to the observer log file. The default value isUSER, which limits the observer log contents to tracing information about fast-start failover, status changes of the primary and target standby database, and error/warning messages. SettingTRACE_LEVELtoSUPPORTincreases the amount of tracing information to include lower-level information needed by Oracle Support Services. -
The Oracle Client Administrator kit, or the full Oracle Database Enterprise Edition or Oracle Personal Edition kit must be installed on the observer computer to monitor a broker configuration for which fast-start failover is to be enabled. See Prerequisites for Enabling Fast-Start Failover for more information.
-
The
START OBSERVERcommand must be issued on the observer computer. Once the observer is successfully started, control is not returned to the user until the observer is stopped (for example, by issuing the STOP OBSERVER command from a different client connection). If you want to perform further interaction with the broker configuration, you must connect through another client.For information about how to start the observer in the background, see START OBSERVER IN BACKGROUND.
-
If the
LOGFILE ISclause is used, then all observer output is recorded in the specified file. Observer output is useful for troubleshooting problems with the observer and with fast-start failover in general.If a complete path, with file name, is provided, the file is stored in the specified path.
If only a file name is provided and the
DG_ADMINenvironment variable is defined, the specified file is stored in the$DG_ADMIN/config_ConfigurationSimpleName/logdirectory. If theDG_ADMINenvironment variable is not defined, the file is stored in the current working directory.If
LOGFILE ISclause is omitted, the log file is stored in the$DG_ADMIN/config_ConfigurationSimpleName/logdirectory using the nameobserver_hostname.log. If theDG_ADMINenvironment variable is not defined, the log file is stored asobserver_hostname.login the current working directory.ConfigurationSimpleNameis the name of the broker configuration.If the specified log file is not accessible, the observer output is sent to standard output.
-
If a complete directory path and file name is specified with the
FILE ISclause, the observer runtime data file is created in this directory. If a relative path and file name is specified, the file is created in the specified path under the current working directory.If only a file name is specified, the file is stored in the
$DG_ADMIN/config_ConfigurationSimpleName/dat/directory. If theDG_ADMINenvironment variable is not defined, the file is stored in the current working directory.ConfigurationSimpleName, which is a configuration property, is the name of the broker configuration.If this clause is omitted, the file is stored as
$DG_ADMIN/config_ConfigurationSimpleName/dat/FSFO_hostname.dat. If theDG_ADMINenvironment variable is not defined, the file is stored in the current working directory asfsfo.dat. -
The primary and target standby database
DB_UNIQUE_NAMEinitialization parameter and connect identifiers are stored in thefsfo.datconfiguration file. Oracle recommends you ensure this file is protected from unauthorized access. -
The order of the
FILE IS,LOGFILE IS, andTRACE LEVEL ISclauses is interchangeable. -
Fast-start failover does not need to be enabled before you issue this command.
-
If fast-start failover is enabled, the observer will retrieve primary and target standby connect identifiers from the broker configuration and begin monitoring the configuration.
-
If fast-start failover is not enabled, the observer continually monitors for when fast-start failover is enabled.
-
-
Only the primary database needs to be running when you issue this command; the standby database that will be the target of a fast-start failover does not need to be running in order for this command to complete successfully.
-
Use the
SHOW OBSERVERcommand or theSHOW CONFIGURATION VERBOSEcommand, or query theV$FS_FAILOVER_OBSERVERSview on the primary database to see the status of the observer and its host computer. -
If the primary and target standby databases stay connected but they lose the connection to the observer, then the primary database goes into an unobserved state. This state is reported by the broker's health check capability.
-
The
SHOW OBSERVERcommand indicates whether one or more observers have already been started.If the
SHOW OBSERVERcommand shows one or more registered observers, but some of them are no longer running for some reason, then you can do either of the following:-
Issue the
START OBSERVERcommand on the same observer computer where it was started originally, with the observer configuration file used when the observer was first started. -
Issue the
STOP OBSERVERcommand and then theSTART OBSERVERcommand on any computer to start the observer.
If the
SHOW OBSERVERcommand shows one or more observers and one observer is already running at one location, then an attempt to start an observer at that location again will fail with the following error:Unable to open the observer file
If the
SHOW OBSERVERcommand shows four registered observers and you attempt to start an observer at a different location, then the command will fail with the following error:ORA-16647: could not start more than four observers
-
Command Examples
Example 1: Starting the Observer
The following example shows how to start the observer.
DGMGRL> CONNECT sysdg@North_Sales.example.com;
Password: password
Connected to "North_Sales"
Connected as SYSDG.
DGMGRL> START OBSERVER;
Observer startedExample 2: Starting the Observer Without Showing Credentials
The following example shows how to start the observer using CONNECT '/' so that connection credentials are not visible on the command line:
DGMGRL> CONNECT /@North_Sales.example.com; Connected to "North_Sales" DGMGRL> START OBSERVER; Observer started.
You must set up Oracle Wallet or SSL to use CONNECT '/'. By setting up Oracle Wallet or SSL, you can write a script to securely start and run the observer as a background job without specifying database credentials in the script. When using Oracle Wallet as a secure external password store, be sure to add credentials for both the primary and fast-start failover target standby databases. The database connect string that you specify when adding the credentials for each database must match the ObserverConnectIdentifer or DGConnectIdentifier database property.