My Oracle Support Banner

Creating a Physical Standby database using RMAN restore database from service (Doc ID 2283978.1)

Last updated on AUGUST 05, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Cloud at Customer - Version N/A and later
Information in this document applies to any platform.

Goal

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

Maximum Availability Architecture

The Maximum Availability Architecture (MAA) defines Oracle’s most comprehensive architecture for reducing downtime for scheduled outages as well as preventing, detecting and recovering from unscheduled outages. Real Application Clusters (RAC) and Oracle Data Guard are integral components of the Database MAA reference architectures and solutions.

More detailed information, such as a discussion of the purpose of MAA and the benefits it provides, can be found on the Oracle Technology Network (OTN) at http://www.oracle.com/technetwork/database/features/availability/maa-096107.html

Purpose of this Document

Provide a step-by-step guide for instantiating a standby database using the RMAN “from service” clause to copy directly from the primary database through an Oracle Net connection.

NOTE:
  • This document applies to Oracle Database Server versions 12.1 to 19c and higher.
  • SECTION SIZE support is available. The section size clause used with multiple RMAN channels enables parallelization of individual files by dividing large files into smaller pieces.  This improves the overall efficiency of parallelization across channels.
  • Encryption is supported.
  • Compression is supported. It is not recommended to use compression on backups or data that has already been compressed (e.g. using OLTP, HCC compression) or encrypted since the compression benefits is very small and the overall impact (e.g. CPU resources and increased elapsed time) can be significant.


About RMAN 'FROM SERVICE' clause

The RMAN ‘from service’ clause enables the restore and recover of primary database files to a standby database across the network. This functionality can be used to instantiate a standby database in lieu of the RMAN DUPLICATE DATABASE command and is more intuitive and less error prone thus saving time. Additionally, utilizing the SECTION SIZE clause with multiple RMAN channels improves the efficiency of parallelization of the restore, further improving instantiation times.

NOTE: This ‘FROM SERVICE‘ method can be used to restore or recover an entire database, individual data files, control files, server parameter file, or tablespaces. This method is useful in synchronizing the primary and standby database.

This paper assumes that the following conditions exist:

  1. The network between the primary and standby sites is reliable and has been assessed and determined to support the peak redo generation rate of the primary.  See note 2275154.1 for details on assessing the network.
  2. A primary database utilizing ASM for data file storage as well as Oracle Managed Files(OMF).
  3. The primary database is in archive log mode.
  4. The primary database online redo logs:
    1. are identical in size
    2. are sized so they do not switch more than 6 times per hour at peak redo generation (this can significantly impact redo apply in Data Guard)
    3. reside on the DATA disk group
    4. are multiplexed on NORMAL redundancy disk groups (HIGH redundancy disk groups are not multiplexed)
    5. have a minimum of 3 groups for each thread of a RAC database
  5. Password and spfile are stored in ASM.
  6. The target standby host has all the required Oracle software installed and configured.
  7. The standby database database software matches the primary database software.  Including PSU/RU/RUR and one off patches.
  8. The standby target database storage will utilize ASM storage and OMF.
  9. The standby target resides on separate hardware.
  10. If role separation is used in your environment set the environment based on the roles with oracle or grid. In our example the oracle user owns both grid and database software installations.

All of the example names illustrated in this document use the following naming:

Hosts and Databases Used in this Example

 

Primary

Standby

Hosts

<primaryhost1>,<primaryhost2>

<standbyhost1>,<standbyhost2>

Database Unique Name

<primary unique name>

<standby unique name>

Instance names

<primary unique name>1, <primary unique name>2

<standby unique name>1, <standby unique name>2

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 Steps to Create a Physical Standby Database using “RESTORE DATABASE FROM SERVICE”
 PRIMARY DATABASE
 Put primary database in forced logging mode
 Create Standby Redo Logs
 Enable Standby File Management
 Password File Copy
 Create a pfile from the primary database and scp to standby
 Create net alias' for the primary and standby databases
 STANDBY DATABASE
 Create Audit Directory
 Register the standby database with clusterware
 Place the Standby Password File
 Modify PFILE Parameters
 Restore the Standby Controlfile from the Primary
 Update the controlfile name in the standby pfile
 Create the spfile
 Configure Encryption (if needed)
 Step 1: Set the default encryption algorithm for the database
 Step 2: Configure the Keystore on the Primary Database
 Step 3: Configure Standby Access to Keystore
 Configure degree of parallelism
 Restore the Standby Database from the primary database service
 Section Size
 RESTORE DATABASE FROM SERVICE
 Large Database Optimization - Instance Parallelism
 Large Database Optimization - Gap Resolution with RECOVER DATABASE FROM SERVICE
 Clear Logfiles
 Set the parameters and create the Data Guard Broker configuration.
 Stop and Start the standby database
 Validate broker configuration
 Implement MAA Best Practice Recommendations
 Data Protection Parameters
 Enable Flashback Database
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.