10 Oracle Data Guard Command Reference
Use the command reference to understand how you can use the Data Guard broker command-line interface (DGMGRL) to manage your broker configuration.
DGMGRL enables you to manage a Data Guard broker configuration and its various members directly from the command line, or from batch programs or scripts. You can use the Data Guard broker command-line interface as an alternative to Oracle Enterprise Manager Cloud Control (Cloud Control) for managing a Data Guard configuration.
- Starting the Data Guard Command-Line Interface
To start the Data Guard command-line interface (DGMGRL), enterdgmgrlat the command-line prompt on a system where Oracle is installed. - Oracle SQLcl
Oracle SQLcl allows you to run SQL and PL/SQL statements in interactive or batch mode. - @ (at sign) Command
The @ command allows you to execute DGMGRL commands stored in script files. - / (slash) Command
Use the DGMGRL / (slash) command to repeat the last command entered at the command prompt. - ADD CONFIGURATION
TheADD CONFIGURATIONcommand establishes a relationship between two Data Guard broker configurations by adding a broker configuration to the current configuration. - ADD DATABASE
The DGMGRLADD DATABASEcommand adds a standby database to an existing broker configuration. - ADD FAR_SYNC
TheADD FAR_SYNCcommand adds an existing far sync instance to an Oracle Data Guard broker configuration. - ADD PLUGGABLE DATABASE
This command instantiates a target PDB in the target database. The target PDB is used to provide data protection for a source PDB in a source database. - ADD RECOVERY_APPLIANCE
TheADD RECOVERY_APPLIANCEcommand adds a Zero Data Loss Recovery Appliance (Recovery Appliance) to an existing broker configuration. - CONNECT
The DGMGRLCONNECTcommand connects you to a database or far sync instance that is a member of a Data Guard broker configuration. - CONVERT DATABASE
TheCONVERT DATABASEcommand converts a physical standby database to a snapshot standby database, or reverts the snapshot standby database back to a physical standby database. - CREATE CONFIGURATION
TheCREATE CONFIGURATIONcommand creates a new broker configuration that includes the specified primary database. - CREATE FAR_SYNC
TheCREATE FAR_SYNCcommand creates a new far sync instance and adds it to the broker configuration. To use this command, Oracle wallet-based authentication must be configured and you must connect with SYSDBA privilege. In addition, an auxiliary instance must be started on the host where a new far sync instance is created. - DISABLE CONFIGURATION
TheDISABLE CONFIGURATIONcommand disables broker management of a configuration so that the configuration and all of its databases are no longer managed by the broker. - DISABLE DATABASE
TheDISABLE DATABASEcommand disables broker management of the named standby database. - DISABLE FAR_SYNC
TheDISABLE FAR_SYNCcommand disables broker management of a far sync instance. - DISABLE FAST_START FAILOVER
TheDISABLE FAST_START FAILOVERcommand prevents the observer from initiating a failover to the target standby database. - DISABLE FAST_START FAILOVER CONDITION
TheDISABLE FAST_START FAILOVER CONDITIONcommand allows you to remove conditions for which a fast-start failover should be performed. - DISABLE RECOVERY_APPLIANCE
The DISABLE RECOVERY_APPLIANCE command disables broker management of the named Zero Data Loss Recovery Appliance (Recovery Appliance). - EDIT ALL MEMBERS RESET (Parameter)
TheEDIT ALL MEMBERS RESETresets the specified configurable parameter for all members in the configuration. - EDIT ALL MEMBERS RESET (Property)
TheEDIT ALL MEMBERS RESETresets the specified configurable property for all members in the configuration. - EDIT ALL MEMBERS SET (Parameter)
TheEDIT ALL MEMBERS SETcommand changes the value of the specified parameter for all members in the broker configuration. OptionalALTER SYSTEM SETcommand options can be included. These options must be specified in quotation marks. - EDIT ALL MEMBERS SET (Property)
TheEDIT ALL MEMBERS SETsets the specified configurable property for all members in the configuration. - EDIT CONFIGURATION (Property)
TheEDIT CONFIGURATION SET PROPERTYcommand changes the value of a property for the broker configuration. - EDIT CONFIGURATION (Protection Mode)
TheEDIT CONFIGURATION SET PROTECTION MODE AScommand edits the current protection mode setting for the broker configuration. - EDIT CONFIGURATION (RENAME)
TheEDIT CONFIGURATION RENAME TOcommand changes a configuration’s name. - EDIT CONFIGURATION PREPARE DGPDB
TheEDIT CONFIGURATION PREPARE DGPDBcommand prepares the environment for DG PDB. - EDIT CONFIGURATION RESET (Property)
TheEDIT CONFIGURATION RESET PROPERTYcommand resets the specified configuration property to its default value. - EDIT CONFIGURATION RESET TAG
TheEDIT CONFIGURATION RESET TAGcommand removes the tag and its value-pair. - EDIT CONFIGURATION SET TAG
TheEDIT CONFIGURATION SET TAGcommand applies the value-pair tag to the configuration. - EDIT DATABASE (Property)
TheEDIT DATABASEcommand changes the value of the specified configurable property for a database member. - EDIT DATABASE (Parameter)
TheEDIT DATABASE(Parameter) command sets the specified initialization parameter for the named database. - EDIT DATABASE (Rename)
TheEDIT DATABASE(Rename) command changes the name used by the broker to refer to the specified database. - EDIT DATABASE (State)
TheEDIT DATABASE(State) command changes the state of the specified database. - EDIT DATABASE RESET (Parameter)
TheEDIT DATABASE RESET(Parameter) command resets the specified database initialization parameter for the named database to its default value. - EDIT DATABASE RESET (Property)
TheEDIT DATABASE RESET(Property) command reset the specified property for the named database back to its default value. - EDIT DATABASE RESET TAG
TheEDIT DATABASE RESET TAGcommand removes the tag and its value-pair. - EDIT DATABASE SET TAG
TheEDIT DATABASE SET TAGcommand applies the value-pair tag to the database. - EDIT FAR_SYNC
TheEDIT FAR_SYNCcommand changes the name, properties, or initialization parameters of a far sync instance. - EDIT FAR_SYNC RESET (Parameter)
TheEDIT FAR_SYNC RESET PARAMETER(Parameter) command resets the specified database initialization parameter for the named far sync instance to its default value. - EDIT FAR_SYNC RESET (Property)
TheEDIT FAR_SYNC RESET(Property) command resets the specified property for the named far sync instance to its default value. - EDIT FAR_SYNC RESET TAG
TheEDIT FAR_SYNC RESET TAGcommand removes the tag and its value-pair. - EDIT FAR_SYNC SET TAG
TheEDIT FAR_SYNC SET TAGcommand applies the value-pair tag to the far-sync database. - EDIT MEMBER RESET TAG
TheEDIT MEMBER RESET TAGcommand removes the tag and its value-pair. - EDIT MEMBER SET TAG
TheEDIT MEMBER SET TAGcommand applies the value-pair tag to the member database. - EDIT PLUGGABLE DATABASE (State)
TheEDIT PLUGGABLE DATABASEcommand changes the state of the specified pluggable database (PDB). - EDIT RECOVERY_APPLIANCE (Property)
TheEDIT RECOVERY_APPLIANCE(Property) command changes the value of the property for the named Zero Data Loss Recovery Appliance (Recovery Appliance). - EDIT RECOVERY_APPLIANCE (Rename)
TheEDIT RECOVERY_APPLIANCE(Rename) command changes the name used by the broker to refer to the specified Recovery Appliance, as recorded in that Recovery Appliance's profile in the broker configuration. - EDIT RECOVERY_APPLIANCE RESET (Property)
TheEDIT RECOVERY_APPLIANCE RESET(Property) command resets the specified property for the named Recovery Appliance to its default value. - ENABLE CONFIGURATION
TheENABLE CONFIGURATIONcommand enables the broker to manage the broker configuration, including all of its databases. - ENABLE DATABASE
TheENABLE DATABASEcommand enables broker management of the specified standby database. - ENABLE FAR_SYNC
TheENABLE FAR_SYNCcommand enables broker management of the specified far sync instance. - ENABLE FAST_START FAILOVER
TheENABLE FAST_START FAILOVERcommand enables the broker to fail over to a specifically-chosen standby database in the event of loss of the primary database, without requiring any manual steps. - ENABLE FAST_START FAILOVER CONDITION
TheENABLE FAST_START FAILOVER CONDITIONcommand specifies additional conditions for which a fast-start failover should be performed. - ENABLE RECOVERY_APPLIANCE
TheENABLE RECOVERY_APPLIANCEcommand enables broker management of the specified Zero Data Loss Recovery Appliance (Recovery Appliance). - EXIT
TheEXITcommand exits (quits) the broker’s command-line interface. - EXPORT CONFIGURATION
TheEXPORT CONFIGURATIONcommand enables you to save the metadata contained in the broker configuration file to a text file. Use this command to maintain an up-to-date copy of the broker configuration metadata. - FAILOVER
TheFAILOVERcommand invokes a failover that transitions the named (target) standby database into the role of a primary database. - FAILOVER TO PLUGGABLE DATABASE
TheFAILOVER TO PLUGGABLE DATABASEcommand invokes a failover that transitions the named target PDB into the role of a source PDB. - HELP
TheDISPLAYcommand displays online help for the Data Guard command-line interface. - HOST or ! (exclamation point)
The DGMGRLHOSTand ! commands allow you to execute operating system command(s) directly through the DGMGRL console without leaving DGMGRL. - IMPORT CONFIGURATION
TheIMPORT CONFIGURATIONcommand enables you to import the broker configuration metadata that was previously exported to a file in the trace directory using theEXPORT CONFIGURATIONcommand. - MIGRATE PLUGGABLE DATABASE
TheMIGRATE PLUGGABLE DATABASEcommand lets you migrate a pluggable database (PDB) from one multitenant container database (CDB) to another on the same host. You can migrate a PDB from a primary CDB to another primary CDB or failover a PDB from a standby CDB to a primary CDB. - PREPARE DATABASE FOR DATA GUARD
ThePREPARE DATABASE FOR DATA GUARDcommand configures a database for use as either a primary or standby database in a Data Guard broker configuration. Database initialization parameters are set to recommended values. - QUIT
TheQUITcommand quits (exits) the Data Guard command-line interface. - REINSTATE DATABASE
TheREINSTATE DATABASEcommand reinstates a database as a new standby database in the broker configuration for the current primary database. - REMOVE CONFIGURATION
TheREMOVE CONFIGURATIONcommand removes the Oracle Data Guard broker configuration and ends broker management of all members in the configuration. - REMOVE DATABASE
TheREMOVE DATABASEcommand removes the specified standby database from the broker configuration and terminates broker management of that standby database. - REMOVE FAR_SYNC
TheREMOVE FAR SYNCcommand removes a far sync instance from an Oracle Data Guard broker configuration. - REMOVE INSTANCE
TheREMOVE INSTANCEcommand removes the specified instance from the broker configuration. - REMOVE PLUGGABLE DATABASE
This command stops recovery at a target PDB and then drops the target PDB. Dropping the target PDB ends data protection for the source PDB in a DG PDB environment. - REMOVE RECOVERY_APPLIANCE
TheREMOVE RECOVERY_APPLIANCEcommand removes the specified Zero Data Loss Recovery Appliance (Recovery Appliance) from the broker configuration and terminates broker management of the Recovery Appliance. - SET ECHO
The SET ECHO command controls whether or not to echo commands that are issued either at the command-line prompt or from a DGMGRL script. - SET FAST_START FAILOVER TARGET
TheSET FAST_START FAILOVER TARGETcommand enables you to set the fast-start failover target to the named standby database without disabling fast-start failover or modifying the fast start failover list. - SET MASTEROBSERVER TO
TheSET MASTEROBSERVER TOcommand lets you manually change which observer is recognized as the master observer. - SET MASTEROBSERVERHOSTS
TheSET MASTEROBSERVERHOSTScommand sets the master observer of a broker configuration to the observer on the target host. - SET ObserverConfigFile
TheSET ObserverConfigFilecommand sets the full path and file name of an observer configuration file. - SET TIME
The DGMGRLSET TIMEcommand turns timestamp printing on and off. - SET TRACE_LEVEL
TheSET TRACE_LEVELcommand sets the amount of tracing done by DGMGRL. This is a client-side setting and does not impact the tracing set for the broker within the Oracle Database. - SHOW ALL
TheSHOW ALLcommand shows the values of DGMGRL CLI properties. - SHOW ALL MEMBERS (Parameter)
TheEDIT ALL MEMBERS SETcommand displays the value of the specified initialization parameter for all members in the configuration. - SHOW ALL MEMBERS (Property)
TheSHOW ALL MEMBERS(Property) command displays the value of the specified property for all members in the configuration. - SHOW CONFIGURATION
TheSHOW CONFIGURATIONcommand displays a summary and status of the broker configuration. - SHOW CONFIGURATION TAG
TheSHOW CONFIGURATION TAGcommand displays all configurations associated with tags or the named tag. - SHOW CONFIGURATION WHEN PRIMARY IS
TheSHOW CONFIGURATION WHEN PRIMARY IScommand displays the redo transport configuration that would be in effect if the specified database were the primary database. - SHOW CONNECTION
Shows the current database connection. - SHOW DATABASE
TheSHOW DATABASEcommand displays information, property values, or initialization parameter values of the specified database and its instances. - SHOW DATABASE TAG
ThesHOW DATABASE TAGcommand displays all databases associated with tags or the named tag. - SHOW FAR_SYNC
TheSHOW FAR_SYNCcommand shows information about a far sync instance. - SHOW FAR_SYNC TAG
TheSHOW FAR_SYNC TAGcommand displays all far-sync databases associated with tags or the named tag. - SHOW FAST_START FAILOVER
TheSHOW FAST_START FAILOVERcommand displays all fast-start failover related information. - SHOW INSTANCE
TheSHOW INSTANCEcommand displays information or property values for the specified instance. - SHOW MEMBER TAG
TheSHOW MEMBER TAGcommand is used to display the value of a specific member-level tag or all tags for a specific database member. - SHOW OBSERVER
TheSHOW OBSERVERcommand shows information about all registered observers in a Data Guard broker configuration. - SHOW ObserverConfigFile
TheSHOW ObserverConfigFilecommand shows the value of theObserverConfigFileproperty. - SHOW OBSERVERS
TheSHOW OBSERVERScommand shows information about all observers for all broker configurations in a specific configuration group. - SHOW PLUGGABLE DATABASE
This command displays the information or property values of the specified pluggable database (PDB). - SHOW RECOVERY_APPLIANCE
TheSHOW RECOVERY_APPLIANCEcommand displays information, property values, or initialization parameter values of the specified Zero Data Loss Recovery Appliance (Recovery Appliance). - SHUTDOWN
Shuts down a currently running Oracle instance. - SPOOL
TheSPOOLcommand records the input and output of DGMGRL to a file. - SQL
The SQL command executes a SQL statement or a PL/SQL stored procedure. - START OBSERVER
TheSTART OBSERVERcommand 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. - START OBSERVER IN BACKGROUND
TheSTART OBSERVER IN BACKGROUNDcommand starts a fast-start failover observer on this host (where this DGMGRL session is running) as a background process. - START OBSERVING
TheSTART OBSERVINGcommand starts a new observer for each broker configuration in the specified group. - STARTUP
TheSTARTUPcommand starts an Oracle database instance, and allows you to specify a number of options. - STOP OBSERVER
TheSTOP OBSERVERcommand stops the fast-start failover observer. - STOP OBSERVING
- SWITCHOVER
When you issue theSWITCHOVERcommand, the current primary database becomes a standby database, and the specified standby database becomes the primary database. This is known as a switchover operation. - SWITCHOVER PLUGGABLE DATABASE
This command switches the role of a source PDB with its designated target PDB. - VALIDATE DATABASE
TheVALIDATE DATABASEcommand performs a comprehensive set of checks prior to a role change. The command gives the option of running basic checks indicating whether the specified standby is ready for switchover or failover. You may also include a stricter level of checks using options available for theSTRICTclause. - VALIDATE DATABASE DATAFILE
TheVALIDATE DATABASE DATAFILEcommand performs validation of data files across the primary database and standby databases. - VALIDATE DATABASE SPFILE
TheVALIDATE DATABASE SPFILEcommand performs a comparison of server parameter file (SPFILE) entries between the primary database and a specified standby database. - VALIDATE DGConnectIdentifier
TheVALIDATE DGConnectIdentifiercommand enables users to check to see whether a connect identifier is valid for theDGConnectidentifierproperty. - VALIDATE FAR_SYNC
TheVALIDATE FAR_SYNCcommand performs a comprehensive set of checks for a far sync instance. - VALIDATE FAST_START FAILOVER
TheVALIDATE FAST_START FAILOVERcommand enables you to validate a fast-start failover configuration. It identifies misconfigurations, either while setting up or initiating fast-start failover. - VALIDATE NETWORK CONFIGURATION
TheVALIDATE NETWORK CONFIGURATIONcommand performs network connectivity checks between members of a configuration. - VALIDATE PLUGGABLE DATABASE
TheVALIDATE DATABASEcommand performs a comprehensive set of database checks prior to a role change. - VALIDATE STATIC CONNECT IDENTIFIER
TheVALIDATE STATIC CONNECT IDENTIFIERcommand validates the static connect identifier of a database.