Skip Headers
Oracle® Enterprise Manager Lifecycle Management Administrator's Guide
12c Release 4 (12.1.0.4)

E27046-22
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

13 Provisioning Oracle Standby Databases

This chapter contains the following sections:

13.1 Overview of Creating a Standby Database

Creating a standby database is the first thing you must do before you can manage and monitor the databases. Enterprise Manager Cloud Control provides the Add Standby Database wizard to create a broker configuration that includes a primary database and one or more standby databases.

You can create a physical or a logical standby database. Physical standby databases are physically identical to the primary database, mounted or open read-only when in recovery mode, and support all datatypes and DDL. Logical standby databases are physically different from the primary database, open read-write only when in recovery mode, can be used for data protection and reporting, and support only some databases and DDL.

The standby database creation process performs the following steps:

  • Performs an online backup (or optionally uses an existing backup) of the primary database control file, datafiles, and archived redo log files

  • Transfers the backup pieces from the primary host to the standby host

  • Creates other needed files (e.g., initialization, password) on the standby host

  • Restores the control file, datafiles, and archived redo log files to the specified locations on the standby host

  • Adds online redo log files and other files to the standby database as needed

  • Configures the recovered database as a physical or logical standby database

13.2 Creating a New Physical Standby Database (single-instance only)

To create a new physical standby database (single-instance only), follow these steps:

Note:

New physical databases will be created as single-instance databases. The Enterprise Manager Convert to Cluster Database function can be used to convert the standby database to a cluster database after it is created.
  1. From the Targets menu, select Databases.

  2. On the Databases page, you see a list of databases. Select the primary database for which you want to create a new physical standby database.

  3. On the primary database home page, click Availability and then select Add Standby Database.

  4. On the Database Login page, enter your credentials. Click Login.

    Note:

    You need to connect to the primary database using SYSDBA credentials, if you are not yet connected.

    If you log in as a user with SYSDBA privileges, you will have access to all Data Guard functionality, including all monitoring and management features. If you log in as a non-SYSDBA user, you will have access to monitoring functions only; features such as standby creation, switchover, and failover will not be available.

  5. On the Add Standby Database page, select Create a new physical standby database. Click Continue.

    Note:

    If you choose to create a new physical or logical standby database, Data Guard checks the following when you click Continue:
    • Server parameter file (SPFILE) -- Data Guard requires that all databases in a configuration use a server parameter file (SPFILE). If the wizard encounters a primary database that does not use an SPFILE, the wizard stops and returns a message asking you to create one. You can create one with a non-default name. Data Guard only requires that the primary database uses an SPFILE.

    • NOARCHIVELOG mode -- Regardless of what method you choose to add the standby database, the primary database must be in ARCHIVELOG mode. If the primary database is in NOARCHIVELOG mode, you will be asked to exit the wizard and put the primary database into ARCHIVELOG mode.

  6. The Add Standby Database wizard opens. It takes you through the following steps:

    • Determine the backup type.

    • Set up the backup options.

    • Select the Oracle home in which to create the standby database.

    • Set up the location for standby database files.

    • Provide standby database configuration parameters.

    • Review the information before clicking Finish.

13.2.1 Step 1: Determine the backup type

Enterprise Manager uses Oracle Recovery Manager (RMAN) to create a single-instance standby database from a new or existing backup of the primary database. You can select one of two backup operations to use for the standby database creation:

  • Perform a live backup of the primary database using RMAN to copy database files, or by copying the database files via staging areas.

  • Use an existing RMAN backup or an existing backup from a previous standby database creation.

Click Next.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

13.2.2 Step 2: Set up the backup options

For an online backup using RMAN, enter the Degree of Parallelism (the number of parallel channels used by RMAN to copy the database files). The default number is 2.

For an online backup by copying the database files via staging areas, provide the staging area location. You can also choose if you want to retain the directory or delete it after the standby database has been created.

For an offline backup using RMAN, provide the RMAN backup location and the staging area location.

Enter the primary host credentials. You can use existing credentials or create new credentials. If you create new credentials you can save the credentials to use for another database standby creation later. To do this, check the Set As Preferred Credentials box.

Click Next.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

13.2.3 Step 3: Select the Oracle home in which to create the standby database

The standby database can be created in any Oracle home that was discovered by Oracle Enterprise Manager. Only Oracle homes on hosts that match the operating system of the primary host are shown. You must select a discovered Oracle home and provide a unique instance name for the standby database. Standby host credentials are required to continue.

13.2.4 Step 4: Set up the location for standby database files

Since the primary and standby databases are the same host, the standby database files are placed into an Oracle Optimal Flexible Architecture (OFA) directory structure. Click Customize to modify individual file names.

In the Listener Configuration section, specify the name and port of the listener that will be used for the standby database. If a new name and port are specified that are not in use by an existing listener, a new listener using the specified port will be created.

Click Next.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

13.2.5 Step 5: Provide standby database configuration parameters

Standby database configuration parameters must be set. These parameters include the database name, database unique name, target name, and standby archive location. The standby archive location can be a regular directory or a flash recovery area. The default values are based on corresponding primary database settings.

After you verify that the parameters are correct, click Next.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

13.2.6 Step 6: Review the information before clicking Finish

The Add Standby Database wizard allows one last review of the data you input for the configuration and standby database. Click Finish when you are certain all of the information is correct.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

By clicking Standby Database Storage, you can see additional information about all the standby database file locations.

Once you click Finish, the standby database creation process runs as an Oracle Enterprise Manager job. You can cancel the standby creation at any point before the job submission.

After the job is submitted, you will be returned to the Data Guard Overview page. In the Status column of the Standby Databases table, you will see Creation in progress listed. If you click that link, you can monitor the progress of the standby database creation.

Note:

To add additional standby databases after the initial creation of the configuration, click Add Standby Database to run the Add Standby Database wizard again.

13.3 Creating a New Logical Standby Database (single-instance only)

To create a new physical standby database (single-instance only), follow these steps:

Note:

New logical standby databases will be created as single-instance databases. The Enterprise Manager Convert to Cluster Database function can be used to convert the standby database to a cluster database after it is created.
  1. From the Targets menu, select Databases.

  2. On the Databases page, you see a list of databases. Select the primary database for which you want to create a new physical standby database.

  3. On the primary database home page, click Availability and then select Add Standby Database.

  4. On the Database Login page, enter your credentials. Click Login.

    Note:

    You need to connect to the primary database using SYSDBA credentials, if you are not yet connected.

    If you log in as a user with SYSDBA privileges, you will have access to all Data Guard functionality, including all monitoring and management features. If you log in as a non-SYSDBA user, you will have access to monitoring functions only; features such as standby creation, switchover, and failover will not be available.

  5. On the Add Standby Database page, select Create a new physical standby database. Click Continue.

    Note:

    If you choose to create a new physical or logical standby database, Data Guard checks the following when you click Continue:
    • Server parameter file (SPFILE) -- Data Guard requires that all databases in a configuration use a server parameter file (SPFILE). If the wizard encounters a primary database that does not use an SPFILE, the wizard stops and returns a message asking you to create one. You can create one with a non-default name. Data Guard only requires that the primary database uses an SPFILE.

    • NOARCHIVELOG mode -- Regardless of what method you choose to add the standby database, the primary database must be in ARCHIVELOG mode. If the primary database is in NOARCHIVELOG mode, you will be asked to exit the wizard and put the primary database into ARCHIVELOG mode.

  6. On the database page, in the Standby Databases section, click Add Standby Database.

  7. The following steps assume a broker configuration already exists with one primary database and one physical standby database, and creates a new logical standby database. It shows how the wizard takes you through additional steps to select the Oracle home for the database and to copy datafiles to the standby database.

    The Add Standby Database wizard takes you through the following steps:

    1. Determine the backup type.

    2. Set up the backup options.

    3. Select the Oracle home in which to create the standby database.

    4. Set up the location for standby database files.

    5. Provide standby database configuration parameters.

    6. Review the information before clicking Finish.

13.3.1 Step 1: Determine the backup type

Enterprise Manager uses Oracle Recovery Manager (RMAN) to create a single-instance standby database from a new or existing backup of the primary database. You can select one of two backup operations to use for the standby database creation:

  • Perform a live backup of the primary database

  • Use an existing backup of the primary database

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

13.3.2 Step 2: Set up the backup options

A working directory is needed to store the primary database backup files. It can optionally be retained and used to create additional standby databases in the future. Specify a location on the primary host in which the working directory can be created.

Primary host credentials are required for this step. Enter the credentials of the owner of the primary database Oracle server installation. These credentials can be saved by checking the box marked Save as Preferred Credential.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

13.3.3 Step 3: Select the Oracle home in which to create the standby database

The standby database can be created in any Oracle home that was discovered by Oracle Enterprise Manager. Only Oracle homes on hosts that match the operating system of the primary host are shown. You must select a discovered Oracle home and provide a unique instance name for the standby database. Standby host credentials are required to continue.

13.3.4 Step 4: Set up the location for standby database files

Part of the create broker configuration process involves making the datafiles for the primary database available to the standby host. You have the option of customizing the location for the standby database files. Standby host credentials are required to continue. The following list describes your options:

  • Specify the backup file access method

    Choose the method by which you want to make the primary database backup files accessible to the standby host. The two options are:

    • Transfer files from the primary host working directory to a standby host working directory

    • Directly access the primary host working directory location from the standby host using a network path name

  • Specify the standby database file location

    Choose the locations for the standby database files. You have two options:

    • Convert to Oracle OFA (Optimal Flexible Architecture)

    • Keep file names and locations the same as the primary database

  • Specify the network configuration file location

    Data Guard will add configuration information for the standby database to the network configuration files (listener.ora and tnsnames.ora) in the specified directory on the standby host.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

13.3.5 Step 5: Provide standby database configuration parameters

Standby database configuration parameters must be set. These parameters include the database name, database unique name, target name, and standby archive location. The standby archive location can be a regular directory or a flash recovery area. The default values are based on corresponding primary database settings.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

13.3.6 Step 6: Review the information before clicking Finish

The Add Standby Database wizard allows one last review of the data you input for the configuration and standby database. Click Finish when you are certain all of the information is correct.

You can click Cancel to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.

By clicking Standby Database Storage, you can see additional information about all the standby database file locations.

Once you click Finish, the standby database creation process runs as an Oracle Enterprise Manager job. You can cancel the standby creation at any point before the job submission.

After the job is submitted, you will be returned to the Data Guard Overview page. In the Status column of the Standby Databases table, you will see Creation in progress listed. If you click that link, you can monitor the progress of the standby database creation.

Note:

To add additional standby databases after the initial creation of the configuration, click Add Standby Database to run the Add Standby Database wizard again.

13.4 Managing an Existing Standby Database with Data Guard Broker

To add an existing standby database, follow these steps:

  1. From the Targets menu, select Databases.

  2. On the Databases page, you see a list of databases. Select the database you want to manage an existing standby database.

  3. On the primary database home page, click Availability and then select Add Standby Database.

  4. On the Database Login page, enter your credentials. Click Login.

    Note:

    You need to connect to the primary database using SYSDBA credentials, if you are not yet connected.

    If you log in as a user with SYSDBA privileges, you will have access to all Data Guard functionality, including all monitoring and management features. If you log in as a non-SYSDBA user, you will have access to monitoring functions only; features such as standby creation, switchover, and failover will not be available.

  5. In the Add Standby Database page, select Manage an Existing Standby Database with Data Guard Broker.

  6. Select an existing standby database that you want to be managed by the Data Guard broker. The database you choose must have been created from the primary database and must be configured to function as a standby database.

    All discovered databases in your environment (both RAC and non-RAC databases) will be shown in the list.

    Click Next.

    Note:

    You can click Cancel at any time to terminate the current process and begin again at the introductory page of the Add Standby Database wizard.
  7. Enter the log in details for the database. You can select Named or New credentials. For new credentials, create a unique credential. You can set it to Preferred Credential if you want to use it again.

    Click Next.

  8. (optional) Change the Standby Archive Location setting of the existing standby cluster database. Click Next.

  9. Review the data for the configuration and standby database. Click Finish

13.5 Creating a Primary Database Backup Only

An additional option is to only create a primary database backup without creating a standby database. This backup can be used for future standby database creations by re-running the Add Standby Database wizard and choosing to create a standby database from an existing backup. The existing backup can be used from either the primary or standby host. Consider this option if you are not able to use the file transfer mechanism provided by Enterprise Manager to transfer the backup files from the primary to the standby hosts, and instead wish to transfer and stage the backup files on the standby host using your own mechanism.

To create a primary database backup only, follow these steps:

  1. From the Targets menu, select Databases.

  2. On the Databases page, you see a list of databases. Select the database you want to manage an existing standby database.

  3. On the primary database home page, click Availability and then select Add Standby Database.

  4. On the Database Login page, enter your credentials. Click Login.

    Note:

    You need to connect to the primary database using SYSDBA credentials, if you are not yet connected.

    If you log in as a user with SYSDBA privileges, you will have access to all Data Guard functionality, including all monitoring and management features. If you log in as a non-SYSDBA user, you will have access to monitoring functions only; features such as standby creation, switchover, and failover will not be available.

  5. In the Add Standby Database page, select Create a Primary Backup Only.

    Click Continue.

  6. On the Backup Options page, specify a location on the primary host where a directory can be created to store the primary database backup files. Click Next.

  7. On the Schedule page, specify a name, description, and start time for the backup job.

    You can choose to start the backup immediately or at a later time. If you want to start at a later time, set the time and date for when the backup should start.

    Click Next.

  8. Review the data for the configuration and standby database. Click Finish