Primary on RAC and Single Instance Standby using ASM

This section will show you an example on how to create a Single Instance Standby on ASM  where Primary Database is Oracle RAC .

In this example the setup is as follow, we have 2 RAC Nodes:

  • Dbvisit Standby version used: 7.0.14
  • Operating System - Oracle Linux 5.8
  • Oracle Database version 11.2.0.4
  • Oracle Grid Infrastructure 11.2.0.4
  • ASM Disk Groups: +DATA and +FRA
  • Database Name: TSTRAC
  • Primary Server: dbvrlin301
  • Primary Server: dbvrlin302
  • Standby Server: dbvrlin305
  • RAC Node1: TSTRAC1
  • RAC Node2: TSTRAC2
  • Dbvisit Standby ARCHDEST: /u01/app/oracle/dbvisit_archive
  • Primary Servers Datafile Locations: +DATA
  • Primary Servers Flash Recovery Area: +FRA
  • Standby Server Datafile Locations: +DATA
  • Standby Server Flash Recovery Area: +FRA

 

Important

  • You can run Create Standby Database (CSD) process from any of the primary nodes (1st node recommended).
  • It is important that you have a DDC file already created on both primary nodes. (Each nodes must have it's own DDC)
  • Make sure that the following parameter are set correctly in both DDC files of RAC nodes.
    • ORACLE_SID_ASM_DEST = +ASM
    • ORACLE_SID_DEST = TSTRAC
  • Dbvisit Standby is making use of a directory referred to as the ARCHDEST. This location is specific to Dbvisit Standby and is not - and should not, be seen as the same as the Oracle Database Archive destinations. When using Oracle RAC environments and Dbvisit Standby, you need to make sure you create the Dbvisit ARCHDEST directory on ALL the nodes as well as the standby server. This directory should be exactly the same on all nodes.
    • ARCHDEST=  /u01/app/oracle/dbvisit_archive

Note: ASM 10.2. and above is supported, but Dbvisit Standby does not support Graceful Switchover when ASM versions less than 11.1 is used. ASM 11.2 with latest patches applied is recommended.

 

The setup is created using the Dbvisit Standby CLI "dbvisit_setup".

 

oracle@dbvrlin301[/usr/dbvisit/standby]: ./dbvisit_setup

=========================================================
     Dbvisit Standby Database Technology (7.0.14.11991)
           http://www.dbvisit.com
=========================================================
=>dbvisit_setup only needs to be run on the primary server.
Is this the primary server? <Yes/No> [Yes]:
=========================================================
     Dbvisit Standby Database Technology (7.0.14.11991)
           http://www.dbvisit.com
     Dbvisit Database setup
       Default values will be shown in []
  Options:
       1) New Dbvisit Database setup (combines options 2,3,4)
       1a) New Dbvisit RAC Instance setup (combines options 2,3,4)
       2) New Dbvisit Database configuration (DDC) file setup
       3) New Dbvisit Archive Management Module (AMM) setup
       4) New Dbvisit Database repository (DDR) setup
       5) Manage Dbvisit Database repository (DDR)
       6) Update Dbvisit Database configuration (DDC) file
       7) Create Standby Database (and template)
       8) Synchronize Standby Database
       9) Uninstall Dbvisit Database repository (DDR)
       E) Exit
=========================================================
Please enter choice : 7
------------------------------------------------------------------------------
=>Creating Standby Database.
Primary database will NOT be shutdown.
 
Choose database:
The following Oracle database(s) have a Dbvisit Database configuration (DDC)
file on this server:
     DDC
     ===
1)   TSTRAC1
2)   Return to menu

Please enter choice : 1
Is this correct? <Yes/No> [Yes]:Yes
Database TSTRAC1 is up.

>>> Checking Dbvisit Standby for configurational differences between dbvrlin301 and
    dbvrlin305...

    No configurational differences found between dbvrlin301 and dbvrlin305.

>>> Checking Oracle installation on dbvrlin305 in
    /u01/app/oracle/product/11.2.0/db_1/bin/oracle...

>>> Checking primary datafiles on dbvrlin301...

>>> Validating Dbvisit configuration file on dbvrlin305...

>>> Checking if a database is up and running on dbvrlin305...
    Checks completed OK.

>>> Total database size for TSTRAC1 is 2.81GB

What would you like to do:
   1 - Create standby database (and optionally save settings in template)
   2 - Create standby database using existing template (previously saved)
   3 - Help
   4 - Terminate processing
   Please enter your choice [1]: 1

-------------------------------------------------------------------------------
Do you want to create an ASM standby database (with all or some database files
in ASM storage)? [Yes]:

Standby database will be ASM: Y
Is this correct? <Yes/No> [Yes]:Yes

Make Sure that you provide "Standby database will be ASM: Y" , since our standby database is also ASM.

-------------------------------------------------------------------------------
Use network compression to compress the database files during transfer? [No]:
Database files will be compressed during transfer: N

Is this correct? <Yes/No> [Yes]:Yes

-------------------------------------------------------------------------------
Dbvisit Standby provides functionality to create missing filesystem directories
on the standby server automatically.

Do you want Dbvisit Standby to create missing filesystem directories on the
standby server automatically? [Yes]:Yes

Dbvisit Standby will create missing filesystem directories automatically: Y
Is this correct? <Yes/No> [Yes]:Yes

-------------------------------------------------------------------------------
Primary database contains Oracle Managed Files (OMF). These files will be
created as OMF files on the standby server. Please make sure creating of OMF
files is enabled on the standby by setting up parameters db_create_file_dest,
db_create_online_log_dest_n and db_recovery_file_dest to point to valid ASM
locations. Refer to Oracle documentation for information how to enable creating
of OMF files.


The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
audit_file_dest                         /u01/app/oracle/admin/TSTRAC/adump
compatible                              11.2.0.4.0
db_block_size                           8192
db_create_file_dest                     +DATA
db_name                                 TSTRAC
db_recovery_file_dest                   +FRA
db_recovery_file_dest_size              16106127360
diagnostic_dest                         /u01/app/oracle
dispatchers                             (PROTOCOL=TCP) (SERVICE=TSTRACXDB)
memory_max_target                       788529152
memory_target                           788529152
open_cursors                            300
processes                               150
remote_login_passwordfile               EXCLUSIVE
sga_max_size                            788529152
spfile                                  +DATA
standby_file_management                 MANUAL
undo_tablespace                         UNDOTBS1
-------------------------------------------------------------------------------
What would you like to do:
   1 - Proceed with creating the standby database
   2 - Edit oracle database parameters for the standby database pfile/spfile
   3 - Terminate processing
   Please enter your choice [1]:1

Validating oracle database parameters... please wait
SUCCEEDED

You need to update these parameters, if you want to use specific ASM disk groups on the standby server.

  • db_create_file_dest
  • db_recovery_file_dest

In our example, we use the same ASM disk groups as Primary ASM, therefore:

  • db_create_file_dest=+DATA
  • db_recovery_file_dest=+FRA

 

-------------------------------------------------------------------------------
Do you want to use TRANSPORTABLE MEDIA to transfer the database backup 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 continue the process.
It can be used for large databases or slow networks.

Specifying No means the network will be used to transfer the database backup.
[No]:

Transportable media will be used: N
Is this correct? <Yes/No> [Yes]:Yes

-------------------------------------------------------------------------------
A temporary location must be specified on dbvrlin301 where the database will be
backed up to first.

This location must be big enough to hold RMAN backup of the whole database
(2.81GB).

Specify the location on this server: [/usr/tmp]:/usr/tmp

Directory for temporary location will be: /usr/tmp

Is this correct? <Yes/No> [Yes]:Yes

-------------------------------------------------------------------------------
A temporary location must be specified on dbvrlin305 where the database backup
will be copied to before moving to specified locations.

Specify location on remote server: [/usr/tmp]:/usr/tmp

Directory for temporary will be: /usr/tmp

Is this correct? <Yes/No> [Yes]:Yes

-------------------------------------------------------------------------------
The creation of the standby database consists of 2 parts:
1) Backup database to temporary location.
2) Transfer backup from temporary location to standby server.
The process can be stopped after step 1 and then continued with step 2 at a
later date.

Do you want to the process to stop between these 2 steps? [No]:
Process will stop between steps: N

Is this correct? <Yes/No> [Yes]:Yes

Dbvisit Standby will automatically create standby OMF ASM datafiles and
tempfiles.
The files will be created under <ASM Disk
Group>/<db_unique_name>/datafile|tempfile.

Review and confirm ASM disk groups for standby datafiles and tempfiles.

-------------------------------------------------------------------------------
Primary                   ===> Standby
-------------------------------------------------------------------------------
+DATA                     ===> +DATA
-------------------------------------------------------------------------------
What would you like to do:
   1 - Confirm standby location(s) are correct and continue
   2 - Provide different standby location(s)
   Please enter your choice [1]:1

Standby locations validated.

Primary database contains non-OMF redo logs.
Non-OMF ASM redo logs will be created under: <ASM Disk
Group>/<db_unique_name>/onlinelog.

Make sure these locations exist on the standby server or create them manually.
Review and confirm ASM disk group names for non-OMF standby redo logs.

-------------------------------------------------------------------------------
Primary                   ===> Standby
-------------------------------------------------------------------------------
+DATA                     ===> +DATA
-------------------------------------------------------------------------------
What would you like to do:
   1 - Confirm standby location(s) are correct and continue
   2 - Provide different standby location(s)
   Please enter your choice [1]:
Standby locations validated.

-------------------------------------------------------------------------------
=>Create standby database template for TSTRAC1 using provided answers? <Yes/No>
[Yes]: Yes
An existing template found.

=>Do you want to view the existing template? <Yes/No> [Yes]: No
What would you like to do:
   1 - Keep existing template and continue with creating a standby database
       using provided answers
   2 - Save provided answers as a new template (Note: existing template
       will be replaced by the new one)
   Please enter your choice [1]:1


>>> Dbvisit will now run a pre-flight check for standby database creation. An attempt will
    be made to create a standby (s)pfile using oracle standby database parameters, followed
    by trying to start the standby instance. If this step fails, then please double-check
    the following items before re-running Dbvisit again:
   
	1) Review the standby database parameters you have supplied and provide valid values
    unless a template is used.
    
	2) Recreate the template to provide valid values for standby database parameters if a
    template is used.
    Running pre-flight check for standby creation, please wait... - done.


>>> Backing up primary database...
    Backing up datafile 1... - done.
    Backing up datafile 2... - done.
    Backing up datafile 3... - done.
    Backing up datafile 4... - done.
    Backing up datafile 5... - done.
    Backing up datafile 6... - done.
    Backing up datafile 7... - done.
    Backing up datafile 8... - done.
|
>>> Creating standby control file... - done.
Backup of primary database completed.

>>> Transferring backup from dbvrlin301 to dbvrlin305...
  > Transferring 'dbv_TSTRAC1_csd_dbf_1_77p7s89k_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [10396 KB/s] - done.

  > Transferring 'dbv_TSTRAC1_csd_dbf_1_78p7s8an_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [12010 KB/s] - done.

  > Transferring 'dbv_TSTRAC1_csd_dbf_2_79p7s8b7_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [10839 KB/s] - done.

  > Transferring 'dbv_TSTRAC1_csd_dbf_3_7ap7s8c6_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [10400 KB/s] - done.

  > Transferring 'dbv_TSTRAC1_csd_dbf_4_7bp7s8ch_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [10960 KB/s] - done.

  > Transferring 'dbv_TSTRAC1_csd_dbf_5_7cp7s8dg_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [10981 KB/s] - done.

  > Transferring 'dbv_TSTRAC1_csd_dbf_6_7dp7s8e4_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [11461 KB/s] - done.

  > Transferring 'dbv_TSTRAC1_csd_dbf_7_7ep7s8ef_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [11866 KB/s] - done.

  > Transferring 'dbv_TSTRAC1_csd_dbf_8_7fp7s8ep_1_1.rman' to server dbvrlin305:7890
    Progress: 0%...20%...40%...60%...80%...100% [11580 KB/s] - done.

>>> Restoring standby control files... - done.

>>> Starting standby database TSTRAC on dbvrlin305 mount... - done.

>>> Restoring datafiles on dbvrlin305...
    Restoring datafile 1 - done.
    Restoring datafile 2 - done.
    Restoring datafile 3 - done.
    Restoring datafile 4 - done.
    Restoring datafile 5 - done.
    Restoring datafile 6 - done.
    Restoring datafile 7 - done.
    Restoring datafile 8 - done.
|
>>> Renaming standby redo logs and tempfiles on dbvrlin305... - done.

>>> Performing checkpoint and archiving logs... - done.

>>> Finishing standby database creation... - done.

Standby database created.
Please execute the following commands to complete the database creation process:
1) Run dbvisit on all primary nodes that are up and running.
2) After having run dbvisit on all primary nodes, execute it on the standby node (this
will ensure the standby is in sync with the primary).

If a primary node was down during standby creation, then you need to run Dbvisit with
the '-R' option once this node has been started.

Please press <Enter> to continue...


=========================================================
     Standby Database creation on dbvrlin305 completed.
Next steps:
1) Exit out of dbvisit_setup.
2) Run Dbvisit on this server with command:
        dbvisit database_name
   Run Dbvisit on all other primary nodes with command:
       dbvisit -R instance_name
3) Run Dbvisit on standby server with command:
       dbvisit database_name
Once Dbvisit has been tested, schedule Dbvisit on primary and standby servers
using cron or other scheduling tool.
=========================================================
Please press <Enter> to continue...
=========================================================

     Dbvisit Standby Database Technology (7.0.14.11991)
           http://www.dbvisit.com
     Dbvisit Database setup
       Default values will be shown in []
  Options:
       1) New Dbvisit Database setup (combines options 2,3,4)
       1a) New Dbvisit RAC Instance setup (combines options 2,3,4)
       2) New Dbvisit Database configuration (DDC) file setup
       3) New Dbvisit Archive Management Module (AMM) setup
       4) New Dbvisit Database repository (DDR) setup
       5) Manage Dbvisit Database repository (DDR)
       6) Update Dbvisit Database configuration (DDC) file
       7) Create Standby Database (and template)
       8) Synchronize Standby Database
       9) Uninstall Dbvisit Database repository (DDR)
       E) Exit
=========================================================
Please enter choice : E

 

The Standby Database has been created successfully, you can now send logs to the standby from the primary server.

 

To Send and Apply logs in RAC Environment please see "Section - Sending and Applying logs in RAC Environments"Â