CREATE CONFIGURATION

The CREATE CONFIGURATION command creates a new broker configuration that includes the specified primary database.

Format

CREATE CONFIGURATION <configuration_name> AS PRIMARY DATABASE IS <db-unique_name> CONNECT IDENTIFIER IS <connect_identifier>
[INCLUDE CURRENT DESTINATIONS]
;

Command Parameters

configuration-name

A user-friendly name for the configuration you are creating. Valid names contain any alphanumeric characters. If spaces are included in the name, the name must be enclosed in double or single quotation marks. The name must consist of 30 or fewer bytes.

db-unique-name

The name that will be used by the broker to refer to the primary database. It must match (case-insensitive) the value of the primary database DB_UNIQUE_NAME initialization parameter.

connect-identifier

A fully specified connect descriptor or a name to be resolved by an Oracle Net Services naming method (for example, TNS). The value you specify is also used as the initial value of the DGConnectIdentifier database property.

Usage Notes

  • A broker configuration is a named collection of one or more members that you want to manage as a group. You must specify a value for each of the command parameters. There are no default values.

  • You must connect to the primary database to issue this command.

  • The broker uses the specified connect_identifier to communicate with the specified database from other databases. Therefore, you must ensure that the connect_identifier can be used to address the specified database from all databases in your configuration. For example, if TNS is used as the naming method, you must ensure that the tnsnames.ora file on every database and instance that is part of the configuration contains an entry for the connect-identifier. The connect identifier must resolve to the same connect descriptor. If the database that is being added is an Oracle RAC database, the connect_identifier provided here must reach all instances of the Oracle RAC, preferably with FAILOVER attributes set.

  • To add standby databases after you create the broker configuration, use the ADD DATABASE command.

    Similarly, use ADD FAR SYNC and ADD RECOVERY APPLIANCE to add far sync instances and recovery appliances respectively.

  • You must clear any remote redo transport destinations on the primary database that do not have the NOREGISTER attribute, before a configuration can be created.

  • The Data Guard broker will verify that the connect identifier specified results in a connection to the database specified by the db_unique_name command parameter.

Command Example

The following example creates a new broker configuration named DRSolution with a primary database named North_Sales.

DGMGRL> CREATE CONFIGURATION 'DRSolution' AS
> PRIMARY DATABASE IS 'North_Sales'
> CONNECT IDENTIFIER IS North_Sales.example.com;
Configuration "DRSolution" created with primary database "North_Sales"