Create Standby Database (CSD)

Prerequisites for creating the standby database are:

  1. Oracle software must be installed on the standby server.
  2. Enough free space on the standby server must be available for the standby database.
  3. The Oracle background (adump, cdump, udump, bdump etc ) and admin directories are created. These directories can be created by Dbvisit if you choose the option to create missing filesystem directories automatically.

Dbvisit Standby allows the following options for creating the standby database:

a) Regular file system standby database with

      i) Same structure as primary database or
      ii) Different structure as primary database.

b) ASM standby database (for Oracle version 10.2 and higher) with

      i) Same structure as primary database or
      ii) Different structure as primary database.

 

If the ASM storage is used and the version is lower than 11g, the Graceful Switchover option is not available. This feature is only available when the ASM (Grid Infrastructure) is 11g and above.

If you are using Regular Filesystem based storage, the Graceful Switchover option is available.

If the new standby database has FRA enabled, please remove all files from FRA/<unique_db_name> folder on the standby server, prior to creating the database. This is to avoid resetting the standby database incarnation triggered by the presence of old database files in FRA.

Standby Database Creation Methods

 

The following methods are available to create the standby database:

  1. Direct transfer
    This method is using a direct transfer method to copy the primary database files to the standby server (on the fly creation) over the network.
    It is not using RMAN but is placing the primary database tablespaces in backup mode while the files are transfered to the standby server.
    This method is not recommended for large databases, but ideal for small database environments.  

    This option is available only if following two conditions are met,

    • Both primary and standby must be non-ASM 
    • All primary datafiles and tempfiles must not be OMF (Oracle Managed FIles)
  2. Using a temporary location
    This method of using a temporary location is making use of RMAN to create a complete backup of the primary database on a file level and then transferring the complete backup from the temporary location on the primary server to the temporary location specified on the standby server over the network.  This method is making use of RMAN compressed backups and is more effective for larger environments.  
    Sufficient storage space to hold a compressed backup of the primary database should be available on both the primary and standby servers.  Once the creation of the standby is complete can these temporary backup files be removed.  This is the recommended approach and should be suited for most environments.  

  3. Transportable Media 
    This option of using Transportable Media uses a temporary location - specified by the user, to create a complete backup of the primary database.  Once the backup is complete the user will then manually transfer the complete backup (located on Transportable media) to the standby server. Transportable media is an external device such as a USB drive that is first plugged into the primary server and then manually transferred to the standby site and plugged into the standby server to complete the process. 

 

Option 1 should be chosen for small databases.
Option 2 should be chosen for large databases.
Option 3 should be chosen for very large databases or slow networks.
Option 2 and 3 will require adequate space on the primary server to make a (compressed) copy (backup) of the database files.

 

RMAN Backups used during Create Standby Database (CSD)

The CSD process is by default making use of RMAN (when direct transfer is not used).  To be more specific COMPRESSED BACKUPSET is used for the backups.  In certain scenarios it might be required to adjust the backup option to not use compressed backups or to rather use image copies.  This can be done by setting the RMAN_DBF_BACKUP_TYPE parameter in the primary server DDC file.  This parameter can be set to specify if a backupset, compressed backupset or image copies are to be used during the CSD operation:

 

Valid Options for the RMAN_DBF_BACKUP_TYPE  parameter are:

RMAN_DBF_BACKUP_TYPE=AS BACKUPSET
RMAN_DBF_BACKUP_TYPE=AS COMPRESSED BACKUPSET
RMAN_DBF_BACKUP_TYPE=AS COPY

 

 

Standby Database Parameter File (Spfile/Pfile)

The spfile.ora (pfile.ora for Oracle database version less than 9) is created for the standby database using the parameter file (pfile or spfile) from the primary database. Oracle database parameters for the standby database can be customised during the Dbvisit Standby Create Standby Database (CDS) process.

If an existing pfile or spfile is already present on the standby server for the new standby database, it will be overwritten. 

 

The Create Standby Database (CSD) wizard will guide the process for customizing of the Oracle standby database during the creation process.

The settings can be saved as a template for future use. If a standby database template has been created previously, this can be used to create the standby database. No further questions will be asked.