Configure Oracle RAC Primary with Oracle RAC Standby

 

 

Introduction

This section will cover the configuration of Dbvisit Standby where the primary is a two node Oracle RAC configuration with a standby that is also running and Oracle RAC configuration.

Please note the following:

  •  Dbvisit Standby does support having a standby database that is RAC capable, but there are a number of restrictions and manual steps required:
    1. The Standby Database can be Oracle RAC enabled, meaning two instances can be configured, this process to configure the standby RAC cluster is manual and will be discussed in this section
    2. Only one of these instances will be able to perform the recovery.  Meaning Dbvisit Standby on the primary nodes are configured to ship logs to only one of the standby database nodes.
    3. When performing a Graceful Switchover, the standby database must only have one instance running on the Standby RAC cluster.  
    4. Using Shared storage for the ARCHDEST location is recommended (ACFS or NFS) but is not required.  
    5. The key requirements is that the ARCHDEST directory structure must exist on all nodes (primary and standby)
    6. When performing the initial configuration (DDC Creation and Creation of the Standby Database) both the primary RAC nodes and its database instances must be running.

 

The high level steps to configure Dbvisit Standby in this type of setup is:

  1. Make sure pre-requisites are met, example, Operating Systems must match, Oracle Software is already installed and must match between primary and standby cluster.
  2. Ensure SSH user equivalence is setup between all nodes in the configuration.
  3. Make sure you are using the latest available Dbvisit Standby software and that it is installed on all nodes in the exact same directory structure.  Example install Dbvisit Standby on each node in /usr/dbvisit
  4. The requirement is that Oracle RAC is already configured, using ASM as the base location for the database files
  5. Dbvisit Standby Configuration Files (DDC) - should be created - one for each primary node
  6. The Standby Database is created - first as a single instance standby database on the first node of the standby RAC cluster.  
  7. It is recommended to keep the names for the standby database the same as the primary 
  8. Once the standby is created - first as a single instance standby (with two threads - but one is not active) - manual steps will be performed to convert it to a Oracle RAC enabled database with two instances
  9. The second instance may be left running, but recovery will always happen from node 1 to which the DDC files on the primary are pointing
  10. If a Graceful Switchover is performed the second instance on the standby database must be down.

 

The example below will go through the following steps:

  • Dbvisit Standby is installed on each of the 4 nodes in /usr/dbvisit
  • Create the Dbvisit Standby Configuration on the primary nodes (kiwi91/92)
  • The Standby Database is created on the 1st node on the standyb RAC (kiwi81)
  • The Standby database is then updated by first sending and applying logs to make sure everything is working as expected
  • The standby database is then converted to a RAC enabled database
  • Dbvisit Standby DDC files are updated 
  • Dbvisit Standby is then used to ship logs and apply logs 
  • A Graceful Switchover will be performed between the Node 1 of the primary RAC and node 1 of the standby RAC

 

Example Environment Overview

In this section we will explain the setup by using an example.  The configuration consist out of the following:

Primary Oracle RAC Cluster:

  • Operating System: Oracle Linux 6 x86_64
  • Oracle Database Software 11.2.0.4
  • Oracle Clusterware / Grid Infrastructure 11.2.0.4
  • Oracle RAC Database: DEV
  • Primary Node 1:  kiwi91 - running instance DEV1
  • Primary Node 2:  kiwi92 - running instance DEV2
  • Dbvisit Standby software used: 7.0.52
  • Dbvisit Standby software installation location:  /usr/dbvisit
  • Database ASM Diskgroups are: +DATA and +FRA
  • The /etc/oratab files on the primary RAC have the following entries:
    • kiwi91

      +ASM1:/u01/app/11.2.0/grid:N # line added by Agent
      DEV1:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent
      DEV:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent
    • kiwi92

      +ASM2:/u01/app/11.2.0/grid:N # line added by Agent
      DEV2:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent
      DEV:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent

 

Standby Oracle RAC Cluster:

  • Operating System: Oracle Linux 6 x86_64
  • Oracle Database Software 11.2.0.4
  • Oracle Clusterware / Grid Infrastructure 11.2.0.4
  • Oracle RAC Database: DEV  (this will first be configured as a single instance on node 1 (kiwi81) and then converted to run two instances on node 1 and 2  on the standby RAC.
  • Primary Node 1:  kiwi81 - running instance will be DEV1 once the manual changes are complete
  • Primary Node 2:  kiwi82 - running instance will be DEV2 once the manual changes are complete
  • Dbvisit Standby software used: 7.0.52
  • Dbvisit Standby software installation location:  /usr/dbvisit
  • Database ASM Diskgroup s are +DATADR and +DR   (This is just as an example showing the diskgroups may be different than the primary - in the ideal configuration they should match the primary)
  • The /etc/oratab files on the Standby RAC are edited to include the following
    • kiwi81

      +ASM1:/u01/app/11.2.0/grid:N # line added by Agent
      DEV1:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent
      DEV:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent
    • kiwi82

      +ASM2:/u01/app/11.2.0/grid:N # line added by Agent
      DEV2:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent
      DEV:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent

Creating the DDC configurations

In this section we will show step by step the creation of the DDC files.

Two DDC files will be created, one on node 1 (kiwi91) called dbv_DEV1.env and one on node 2 (kiwi92) called dbv_DEV2.env

Creating the DDC "dbv_DEV1.env" on node 1 - kiwi91

In this section we show you the the answers to the "dbvisit_setup" menu creating a new DDC for the primary database node 1 where the instance DEV1 is running for the RAC database called DEV.

The DDC file name will be DEV1 to match the instance name and the file will be called - dbv_DEV1.env.

As part of the creation of the DDC file on the first node, the Dbvisit Standby Repository will be created under the Oracle Database Schema - DBVISIT7

 

Note: The Detail setup with question answers are below, remember the Standby server in this case will be the first node on the standby Oracle RAC cluster which is kiwi81 where the standby database will be called DEV and the ASM instance is already running as +ASM1

 

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


=========================================================

     Dbvisit Standby Database Technology (7.0.54.15715)
           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.54.15715)
           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 : 1a
    END USER LICENSE AGREEMENT
    PLEASE READ THIS END USER LICENSE AGREEMENT ("AGREEMENT") CAREFULLY
    BEFORE DOWNLOADING THE LICENSED PRODUCT.  BY CLICKING "I AGREE" BELOW, YOU
    ARE REPRESENTING THAT YOU HAVE THE RIGHT AND AUTHORITY TO LEGALLY BIND
....
....  <<---- text removed 
....
    other provisions shall remain in full force and effect.  Waiver of any
    provision of this Agreement in one instance shall not preclude enforcement
    of it on future occasions. Headings are for reference purposes only and
    have no substantive effect.


Continue ? <Yes/No> [No]: Yes

------------------------------------------------------------------------------
=>Accept Defaults
Would you like to do a quick setup?
Or would you like Dbvisit to prompt you for all settings and suggest defaults?

Values are Yes or No
Yes = Quick setup (let Dbvisit choose defaults for settings that are not displayed).
No = Dbvisit will prompt for all settings and suggest defaults.

All settings will be displayed at the end of the configuration for review.

Quick setup? [Y]:
=>Dbvisit will do a quick setup: Y

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

=========================================================
Dbvisit setup begins for RAC.
=========================================================

------------------------------------------------------------------------------
=>
Please specify if this is the first RAC node in the Dbvisit configuration or not.

Values are Yes or No
Yes = First RAC node that Dbvisit is configured for.
No = Dbvisit has been already configured on another node in this RAC configuration.

First Dbvisit RAC node? [Y]:

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

------------------------------------------------------------------------------
=>PATH
Please set the PATH to the server (or OS) environment.
Do not include the ORACLE_HOME in the path.

Server environment PATH is [/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin]:
=>PATH will be: /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin

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

------------------------------------------------------------------------------
Please specify for which Oracle instance you would like to configure Dbvisit. For RAC, the instance local to this node must be chosen. Not the database. For example, the database may be called RACDB
and has the following instances: RACDB1 and RACDB2.
Choose RACDB1 or RACDB2 depending on which instance is running on this node.


------------------------------------------------------------------------------
=>ORATAB
Dbvisit can use the oratab file to find all the databases on this server.
If you would like Dbvisit to do this, please enter the location of the oratab file.
Specifying the oratab file is not mandatory.

Oratab file is [/etc/oratab]:
=>Oratab will be: /etc/oratab

Is this correct? <Yes/No> [Yes]:
The following Oracle instance(s) have been found on this server:

    SID      ORACLE_HOME
    ===      ===========
1)  DEV1     /u01/app/oracle/product/11.2.0/db_1
2)  DEV      /u01/app/oracle/product/11.2.0/db_1
3)  Enter own ORACLE_SID and ORACLE_HOME

Please enter choice : 1

Is this correct? <Yes/No> [Yes]:
=>ORACLE_SID will be: DEV1
=>ORACLE_HOME will be: /u01/app/oracle/product/11.2.0/db_1

------------------------------------------------------------------------------
=>OWNER
Please enter the account owner that will be used to run Dbvisit.
It is recommended that this be the same user as the Oracle Database owner.
This user should belong to a DBA group.
This user must also exist on the standby database server.

Account that will run Dbvisit is [oracle]:
=>Account owner will be: oracle

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

------------------------------------------------------------------------------
=>DBVNET_PORT
Please enter a port number for the DBVNET_PORT parameter.
This is the  port number on which the Dbvisit network infrastructure
daemon/service (Dbvnet) is listening on the primary and standby servers.
The default port number used is 7890.
Important: since Dbvnet is required in order to transfer files and other
information between your servers by Dbvisit Standby, please ensure your
firewalls are not blocking this port number.
Enter 0 to disable Dbvnet (not recommended)

Dbvisit network infrastructure port is [7890]:
=>Dbvisit network infrastructure port will be: 7890

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

------------------------------------------------------------------------------
=>COMPRESS
Please enter compression method.
if an external compression is used, then this must also exist on the
standby server.
It is recommended to disable any other compression routines
used to compress the Oracle (archive) log files for this database.

If you are unsure, choose option 1.

The following compression methods are available:
1)   /usr/bin/gzip
2)   Dbvisit internal compression (files will be left compressed on server)
3)   No compression
4)   /usr/bin/compress
5)   Enter own method

Please enter choice [1] : 1

Is this correct? <Yes/No> [Yes]:
=>Compression method will be: /usr/bin/gzip
=>Uncompression method will be: /usr/bin/gunzip

------------------------------------------------------------------------------
=>RAC_TAKEOVER_SID
Specify the instance name that Dbvisit processing should take over if that instance is unavailable.
The instance name must be different to the current instance name (DEV1).

The standby database may not be kept up to date if an instance is not available and Dbvisit processing is not taken over by another instance.

RAC Takeover SID is []: DEV2
=>RAC Takeover SID will be: DEV2

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

------------------------------------------------------------------------------
=>SOURCE
Please enter primary server [kiwi91]

Primary server is [kiwi91]:
=>Primary server will be: kiwi91

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

------------------------------------------------------------------------------
=>DBUSER
Please enter the Oracle database user that will be used to log onto the database DEV1.
This user will also own the Dbvisit Database repository (DDR) [dbvisit7].
(This user will be created as part of this setup/configuration).

Dbvisit Oracle user is [dbvisit7]:
=>Dbvisit Oracle user will be: dbvisit7

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

------------------------------------------------------------------------------
=>DBPASSWD
Please enter the password for Dbvisit Oracle database user dbvisit7.
The password must start with a letter. Subsequent characters may be letters, numbers, or the symbols # (pound sign), $ (dollar sign) or _ (underscore).

------------------------------------------------------------------------------
Note: ENCRYPT_PASSWDS is set to Y, the password will be encrypted.
Dbvisit Oracle user dbvisit7 password is [dbvisitpasswd] *************
Please re-enter password: *************


------------------------------------------------------------------------------
=>ORACLE_SID_ASM
If your primary database is using ASM, please set the ASM instance name or leave as default.
If you are not using ASM, then leave it as default (+ASM).

if unsure, leave blank.

ORACLE_SID_ASM on primary server is [+ASM1]:
=>Optional ORACLE_SID_ASM on primary server will be: +ASM1

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

------------------------------------------------------------------------------
=========================================================
Now please enter the information about the
Standby Database
=========================================================

=>DESTINATION
Please enter the name of the standby server (or standby database server).
(Primary server is kiwi91)

Standby server is []: kiwi81
=>Standby server will be: kiwi81

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

------------------------------------------------------------------------------
=>ORACLE_SID_DEST
If the ORACLE_SID on the standby server kiwi81 is different than the ORACLE_SID on the primary server, then it can be specified here.
Default is the same as ORACLE_SID: [DEV1]

Please enter instance on standby server kiwi81.

Oracle instance on standby server is [DEV1]: DEV
=>Oracle instance on standby server will be: DEV

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

------------------------------------------------------------------------------
=>DBVISIT_BASE_DR
Please enter DBVISIT_BASE directory for the standby server kiwi81.
DBVISIT_BASE is the Dbvisit installation directory on the standby server kiwi81.

DBVISIT_BASE for standby server is [/usr/dbvisit]:
=>DBVISIT_BASE_DR for standby server will be: /usr/dbvisit

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

------------------------------------------------------------------------------
=>ARCHDEST
Please enter the directory where Dbvisit will transfer the (archive) log files to on standby server kiwi81.
This directory will ONLY contain (archive) log files related to this database. It should not contain any other (non archive log) files.
Please ensure that this directory exists on kiwi81 as this cannot be verified.
This directory is specific to Dbvisit Standby and is NOT the same as the database archive log directory and should NOT be set to the same
value as your database archive log or recovery area location.

It is advisable to also create this directory on the primary server kiwi91 for graceful switchover to work.

Archive log dir on the standby server is [/oracle/dbvisit_archdest/DEV1]: /u01/app/oracle/dbvisit_archdest/DEV
=>Archive log dir on the standby server will be: /u01/app/oracle/dbvisit_archdest/DEV

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

------------------------------------------------------------------------------
=>MAX_TIMES_TRIED
Please specify the number of times that Dbvisit should attempt to apply the missing log file before raising an error.
Note this number is also used to raise an error if Dbvisit cannot be started in case a previous scheduled Dbvisit is still running.

Ensure that this number is not too low and not too high.

If you are unsure, set to 4

Maximum attempts before raising error when log file is not there is [4]:
=>Maximum attempts before raising error when log file is not there will be: 4

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

------------------------------------------------------------------------------
=>ORACLE_SID_ASM_DEST
If your standby database is using ASM and ASM instance name on the standby server kiwi81
is different than the ASM instance name on the primary server kiwi91, then it can be specified here.
Default is the same as ORACLE_SID_ASM: [+ASM1]
If you are not using ASM, then leave it as default.

if unsure, leave blank.

ORACLE_SID_ASM_DEST on standby server is [+ASM1]:
=>Optional ORACLE_SID_ASM_DEST on standby server will be: +ASM1

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

------------------------------------------------------------------------------
=>ADMINS
Please enter the administrator email address(es) where emails will be sent upon
success or failure of Dbvisit. Multiple emails
should be separated with a comma (,).
Sample:
support@mycompany.com,dba@mycompany.com

Administrators email is [oracle@kiwi91]:
=>Administrators email will be: oracle@kiwi91

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

------------------------------------------------------------------------------
=>MAILCFG_FROM
Please enter the FROM email address of this server (optional).
If this is not specified when using Dbvisit internal mail, the emails may not arrive.

Mail FROM address is [oracle@kiwi91.com]: oracle@kiwi91
=>Mail FROM address will be: oracle@kiwi91

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

------------------------------------------------------------------------------
=>MAILCFG_FROM_DR
Please enter the FROM email address of the standby server (optional).
If this is not specified when using Dbvisit internal mail, the emails may not arrive.

Mail FROM_DR address is [oracle@kiwi81.com]: oracle@kiwi81
=>Mail FROM_DR address will be: oracle@kiwi81

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

------------------------------------------------------------------------------
=>MAILCFG_SMTP_SERVER
Please enter the smtp mail server to send the email to.
Sample:
- mail.<your company name>.com
- smtp.<your company name>.com

SMTP mail server is [mail.yourdomain.com]: localhost
=>SMTP mail server will be: localhost

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

------------------------------------------------------------------------------
=>MAILCFG_SMTP_SERVER_DR
Optional smtp mail server for the standby server.
Only used if smtp mail server for the standby server differs from the
main smtp mail server (MAILCFG_SMTP_SERVER).
Sample:
- mail.dbvisit.com
- smtp.dbvisit.com

SMTP mail server for standby server is (optional) []:
=>SMTP mail server for standby server will be:

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

------------------------------------------------------------------------------
=========================================================
Primary Archive log Management Module Settings (AMM)
=========================================================
=>ARCHSOURCE_MANAGEMENT
Do you want to setup (archive) log file management on the primary server?
This is used to manage the Oracle logs on the primary server.
- Alerts when certain thresholds have been reached.
- Can delete Oracle archives logs after a set number of days.
- Can keep a constant number of Oracle archive logs on the system.

Values are Yes or No
Yes = Setup and use AMM on primary server.
No = do not use AMM on primary server.

If you are unsure, set to Yes.

Should Dbvisit Archive Log Management Module be used on primary server? [Y]:
=>Dbvisit Archive Log Management Module on primary server will used: Y

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

------------------------------------------------------------------------------
=>DAYS_TO_KEEP_ARCHSOURCE
Please specify the number of days to keep the Oracle log files on the primary server.
After this the log files will be removed from the server.
To disable this setting, set to 0.

If you are unsure, set to 7

Number of days to keep log files on disk is [7]:
=>Number of days to keep log files on disk will be: 7

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

------------------------------------------------------------------------------
=>NUM_ARCHSOURCE_TO_KEEP
Please specify the number of archive log files to keep on the primary server.
Log files greater than this number will be removed (oldest first).
To disable this setting, set to 0.

If you are unsure, set to 0 (disable).

Number of log files to keep on disk is [0]:
=>Number of log files to keep on disk will be: 0

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

------------------------------------------------------------------------------
=>ARCHSOURCE_BACKUP_COUNT
Please specify the number of times an archive log has to be backed up by RMAN
before it is deleted from the primary server by Dbvisit Standby.
Values range from 0-15 and is only applicable if RMAN is used to backup archive
log files. This parameter is only applicable to Oracle versions 9 or higher.
To disable this setting, set to 0.

If you are unsure, set to 0 (disable).

Archive log backup count is [0]:
=>Archive log backup count will be: 0

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

------------------------------------------------------------------------------
=>THRESHOLD_ARCHSOURCE
Please specify the threshold in percentage (%) of how much disk space may be taken up by the Oracle log files on disk before an alert is triggered on the primary server.
80 means at 80% disk space full an alert will be triggered.

Please specify threshold as an integer.

If you are unsure, set to 80.

Threshold for log file management is [80]:
=>Threshold for log file management will be: 80

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

------------------------------------------------------------------------------
=>FRA_THRESHOLD_ARCHSOURCE
Please specify the threshold in percentage (%) of how much FRA space may be taken up by the Oracle log files on disk before an alert is triggered on the primary server.
This setting is valid only for Oracle databases versions 10 or higher that have FRA enabled in the primary database.
80 means at 80% FRA full an alert will be triggered.
To disable this setting, set to 0.

Please specify threshold as an integer.

FRA threshold for log file management is [0]:
=>FRA threshold for log file management will be: 0

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

------------------------------------------------------------------------------
=>DELETE_ARCHSOURCE
Please specify if (archive) log files should be deleted once the threshold (THRESHOLD_ARCHSOURCE) on the primary server is reached.
Once the percentage threshold is reached oldest (archive) log files are deleted first.
The log files WILL have been transferred to the standby server.
(There is no verification that these log files have been backed up).

Values are Yes or No
Yes = Let Dbvisit delete (archive) log files once percentage threshold is met.
No = Dbvisit will only alert once percentage threshold (no log files will be deleted).

If you are unsure, set to No.

Should Dbvisit Archive Log Management Module delete log files once percentage threshold is met? [N]:
=>Dbvisit Archive Log Management Module will delete log files once percentage threshold is met: N

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

------------------------------------------------------------------------------
=========================================================
Standby Archive log Management Module Settings (AMM)
=========================================================
=>ARCHDEST_MANAGEMENT
Do you want to setup (archive) log file management on the standby server?
This is used to manage the Oracle logs on the standby server.
- Alerts when certain thresholds have been reached.
- Can delete Oracle archives logs after a set number of days.
- Can keep a constant number of Oracle archive logs on the system.

Values are Yes or no
Yes = Setup and use AMM on standby server.
No = do not use AMM on standby server.

If you are unsure, set to Yes.

Should Dbvisit Archive Log Management Module be used on standby server? [Y]:
=>Dbvisit Archive Log Management Module on standby server will used: Y

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

------------------------------------------------------------------------------
=>DAYS_TO_KEEP_ARCHDEST
Please specify the number of days to keep the Oracle log files on the standby server.
After this the log files will be removed from the server.
To disable this setting, set to 0.

If you are unsure, set to 7

Number of days to keep log files on disk is [7]:
=>Number of days to keep log files on disk will be: 7

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

------------------------------------------------------------------------------
=>NUM_ARCHDEST_TO_KEEP
Please specify the number of archive log files to keep on the standby server.
Log files greater than this number will be removed (oldest first).
To disable this setting, set to 0.

If you are unsure, set to 0 (disable).

Number of log files to keep on disk is [0]:
=>Number of log files to keep on disk will be: 0

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

------------------------------------------------------------------------------
=>THRESHOLD_ARCHDEST
Please specify the threshold in percentage (%) of how much disk space may be taken up by the Oracle log files on disk before an alert is triggered on the standby server.
80 means at 80% disk space full an alert will be triggered.

Please specify threshold as an integer.

If you are unsure, set to 80.

Threshold for log file management is [80]:
=>Threshold for log file management will be: 80

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

------------------------------------------------------------------------------
=>DELETE_ARCHDEST
Please specify if (archive) log files should be deleted once the threshold (THRESHOLD_ARCHDEST) on the standby server is reached.
Once the percentage threshold is reached oldest (archive) log files are deleted first.
The log files WILL have been applied to the standby database.
(There is no verification that these log files have been backed up).

Values are Yes or No
Yes = Let Dbvisit delete (archive) log files once percentage threshold is met.
No = Dbvisit will only alert once percentage threshold (no log files will be deleted).

If you are unsure, set to No.

Should Dbvisit Archive Log Management Module delete log files once percentage threshold is met? [N]:
=>Dbvisit Archive Log Management Module will delete log files once percentage threshold is met: N

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

------------------------------------------------------------------------------
Would you like to review all the variables? <Yes/No> [Yes]: No

------------------------------------------------------------------------------
=>DDC File
Please specify the name of the Dbvisit Database Configuration (DDC) file.
The DDC file contains all the Dbvisit Standby settings.
The DDC file is a plain text file and can be edited manually or through this setup.

Dbvisit Database Configuration (DDC) file is [DEV1]:
=>Dbvisit Database Configuration (DDC) file will be: DEV1

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

=>Dbvisit Database configuration (DDC) file /usr/dbvisit/standby/conf/dbv_DEV1.env created.

------------------------------------------------------------------------------
=>Creating Dbvisit Database repository (DDR).
Database DEV1 is up.


------------------------------------------------------------------------------
Please select the default tablespace to install the Dbvisit Database repository (DDR).

The following tablespaces are available:

     Tablespace
     ===========
1)   USERS
2)   Refresh list

Please enter choice : 1
The default tablespace will be: USERS

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

------------------------------------------------------------------------------
Please select the temp tablespace to install the Dbvisit Database repository (DDR).

The following tablespaces are available:

     Tablespace
     ===========
1)   TEMP
2)   USERS
3)   Refresh list

Please enter choice : 1
The temp tablespace will be: TEMP

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

Dbvisit will now create the Dbvisit Database repository (DDR). Continue (Yes) or return to the menu? <Yes/Return> [Yes]: Yes
User dbvisit7 created.
Grants to user dbvisit7 completed.
Dbvisit Database repository (DDR) for dbvisit7 created.

=========================================================
     Dbvisit configuration completed.

   IMPORTANT!
      Ensure the following directories are setup on
      standby server kiwi81 with the correct permissions:
      1) /usr/dbvisit
      2) /u01/app/oracle/dbvisit_archdest/DEV

 Next steps:
Create standby database using option in main menu:
      7) Create Standby Database

=========================================================
Please press <Enter> to return to main menu...

=========================================================
     Dbvisit Standby Database Technology (7.0.54.15715)
           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
=========================================================
     Dbvisit setup completed.

 Any changes to the configuration can be made by either:
1) Manually by editing dbv_DEV1.env.
2) Running dbvisit_setup and choosing option:
     -> 6) Update Dbvisit Database configuration (DDC) file

Next steps:
1) Run Dbvisit on this server with command:
       dbvisit DEV1
2) Run Dbvisit on standby server with command:
       dbvisit DEV1

Once Dbvisit has been tested, schedule Dbvisit on primary and standby servers using cron or other scheduling tool.
=========================================================
oracle@kiwi91[/usr/dbvisit/standby]:

 

The next step now is to create the DDC file for the second primary RAC node.

 

Creating the DDC "dbv_DEV2.env" on node 2 - kiwi92

In this section we show you the the answers to the "dbvisit_setup" menu creating a new DDC for the primary database node 2 where the instance DEV2 is running for the RAC database called DEV.

The DDC file name will be DEV2 to match the instance name running on this node, and the DDC file will be called - dbv_DEV2.env.

The Dbvisit Standby repository is only created during the first DDC setup and will not be executed again during the second DDC creation.

As this is the second RAC node, when asked the question if this is the first RAC node make sure you specify N (no), example:

 

First Dbvisit RAC node? [Y]: N

 

 

The Detail setup with question answers are below, remember the Standby server in this case will be the first node on the standby Oracle RAC cluster which is kiwi81 where the standby database will be called DEV and the ASM instance is already running as +ASM1

 

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


=========================================================

     Dbvisit Standby Database Technology (7.0.54.15715)
           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.54.15715)
           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 : 1a
    END USER LICENSE AGREEMENT
    PLEASE READ THIS END USER LICENSE AGREEMENT ("AGREEMENT") CAREFULLY
    BEFORE DOWNLOADING THE LICENSED PRODUCT.  BY CLICKING "I AGREE" BELOW, YOU
...
...  <<--- text have been removed 
...
...
    other provisions shall remain in full force and effect.  Waiver of any
    provision of this Agreement in one instance shall not preclude enforcement
    of it on future occasions. Headings are for reference purposes only and
    have no substantive effect.


Continue ? <Yes/No> [No]: Yes

------------------------------------------------------------------------------
=>Accept Defaults
Would you like to do a quick setup?
Or would you like Dbvisit to prompt you for all settings and suggest defaults?

Values are Yes or No
Yes = Quick setup (let Dbvisit choose defaults for settings that are not displayed).
No = Dbvisit will prompt for all settings and suggest defaults.

All settings will be displayed at the end of the configuration for review.

Quick setup? [Y]:
=>Dbvisit will do a quick setup: Y

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

=========================================================
Dbvisit setup begins for RAC.
=========================================================

------------------------------------------------------------------------------
=>
Please specify if this is the first RAC node in the Dbvisit configuration or not.

Values are Yes or No
Yes = First RAC node that Dbvisit is configured for.
No = Dbvisit has been already configured on another node in this RAC configuration.

First Dbvisit RAC node? [Y]: N

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

------------------------------------------------------------------------------
=>PATH
Please set the PATH to the server (or OS) environment.
Do not include the ORACLE_HOME in the path.

Server environment PATH is [/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin]:
=>PATH will be: /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin

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

------------------------------------------------------------------------------
Please specify for which Oracle instance you would like to configure Dbvisit. For RAC, the instance local to this node must be chosen. Not the database. For example, the database may be called RACDB
and has the following instances: RACDB1 and RACDB2.
Choose RACDB1 or RACDB2 depending on which instance is running on this node.


------------------------------------------------------------------------------
=>ORATAB
Dbvisit can use the oratab file to find all the databases on this server.
If you would like Dbvisit to do this, please enter the location of the oratab file.
Specifying the oratab file is not mandatory.

Oratab file is [/etc/oratab]:
=>Oratab will be: /etc/oratab

Is this correct? <Yes/No> [Yes]:
The following Oracle instance(s) have been found on this server:

    SID      ORACLE_HOME
    ===      ===========
1)  DEV2     /u01/app/oracle/product/11.2.0/db_1
2)  DEV      /u01/app/oracle/product/11.2.0/db_1
3)  Enter own ORACLE_SID and ORACLE_HOME

Please enter choice : 1

Is this correct? <Yes/No> [Yes]:
=>ORACLE_SID will be: DEV2
=>ORACLE_HOME will be: /u01/app/oracle/product/11.2.0/db_1

------------------------------------------------------------------------------
=>OWNER
Please enter the account owner that will be used to run Dbvisit.
It is recommended that this be the same user as the Oracle Database owner.
This user should belong to a DBA group.
This user must also exist on the standby database server.

Account that will run Dbvisit is [oracle]:
=>Account owner will be: oracle

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

------------------------------------------------------------------------------
=>DBVNET_PORT
Please enter a port number for the DBVNET_PORT parameter.
This is the  port number on which the Dbvisit network infrastructure
daemon/service (Dbvnet) is listening on the primary and standby servers.
The default port number used is 7890.
Important: since Dbvnet is required in order to transfer files and other
information between your servers by Dbvisit Standby, please ensure your
firewalls are not blocking this port number.
Enter 0 to disable Dbvnet (not recommended)

Dbvisit network infrastructure port is [7890]:
=>Dbvisit network infrastructure port will be: 7890

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

------------------------------------------------------------------------------
=>COMPRESS
Please enter compression method.
if an external compression is used, then this must also exist on the
standby server.
It is recommended to disable any other compression routines
used to compress the Oracle (archive) log files for this database.

If you are unsure, choose option 1.

The following compression methods are available:
1)   /usr/bin/gzip
2)   Dbvisit internal compression (files will be left compressed on server)
3)   No compression
4)   /usr/bin/compress
5)   Enter own method

Please enter choice [1] : 1

Is this correct? <Yes/No> [Yes]:
=>Compression method will be: /usr/bin/gzip
=>Uncompression method will be: /usr/bin/gunzip

------------------------------------------------------------------------------
=>RAC_TAKEOVER_SID
Specify the instance name that Dbvisit processing should take over if that instance is unavailable.
The instance name must be different to the current instance name (DEV2).

The standby database may not be kept up to date if an instance is not available and Dbvisit processing is not taken over by another instance.

RAC Takeover SID is []: DEV1
=>RAC Takeover SID will be: DEV1

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

------------------------------------------------------------------------------
=>SOURCE
Please enter primary server [kiwi92]

Primary server is [kiwi92]:
=>Primary server will be: kiwi92

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

------------------------------------------------------------------------------
=>DBUSER
Please enter the Oracle database user that will be used to log onto the database DEV2.
This user will also own the Dbvisit Database repository (DDR) [dbvisit7].
(This user will be created as part of this setup/configuration).

Dbvisit Oracle user is [dbvisit7]:
=>Dbvisit Oracle user will be: dbvisit7

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

------------------------------------------------------------------------------
=>DBPASSWD
Please enter the password for Dbvisit Oracle database user dbvisit7.
The password must start with a letter. Subsequent characters may be letters, numbers, or the symbols # (pound sign), $ (dollar sign) or _ (underscore).

------------------------------------------------------------------------------
Note: ENCRYPT_PASSWDS is set to Y, the password will be encrypted.
Dbvisit Oracle user dbvisit7 password is [dbvisitpasswd] *************
Please re-enter password: *************


------------------------------------------------------------------------------
=>ORACLE_SID_ASM
If your primary database is using ASM, please set the ASM instance name or leave as default.
If you are not using ASM, then leave it as default (+ASM).

if unsure, leave blank.

ORACLE_SID_ASM on primary server is [+ASM2]:
=>Optional ORACLE_SID_ASM on primary server will be: +ASM2

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

------------------------------------------------------------------------------
=========================================================
Now please enter the information about the
Standby Database
=========================================================

=>DESTINATION
Please enter the name of the standby server (or standby database server).
(Primary server is kiwi92)

Standby server is []: kiwi81
=>Standby server will be: kiwi81

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

------------------------------------------------------------------------------
=>ORACLE_SID_DEST
If the ORACLE_SID on the standby server kiwi81 is different than the ORACLE_SID on the primary server, then it can be specified here.
Default is the same as ORACLE_SID: [DEV2]

Please enter instance on standby server kiwi81.

Oracle instance on standby server is [DEV2]: DEV
=>Oracle instance on standby server will be: DEV

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

------------------------------------------------------------------------------
=>DBVISIT_BASE_DR
Please enter DBVISIT_BASE directory for the standby server kiwi81.
DBVISIT_BASE is the Dbvisit installation directory on the standby server kiwi81.

DBVISIT_BASE for standby server is [/usr/dbvisit]:
=>DBVISIT_BASE_DR for standby server will be: /usr/dbvisit

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

------------------------------------------------------------------------------
=>ARCHDEST
Please enter the directory where Dbvisit will transfer the (archive) log files to on standby server kiwi81.
This directory will ONLY contain (archive) log files related to this database. It should not contain any other (non archive log) files.
Please ensure that this directory exists on kiwi81 as this cannot be verified.
This directory is specific to Dbvisit Standby and is NOT the same as the database archive log directory and should NOT be set to the same
value as your database archive log or recovery area location.

It is advisable to also create this directory on the primary server kiwi92 for graceful switchover to work.

Archive log dir on the standby server is [/oracle/dbvisit_archdest/DEV2]: /u01/app/oracle/dbvisit_archdest/DEV
=>Archive log dir on the standby server will be: /u01/app/oracle/dbvisit_archdest/DEV

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

------------------------------------------------------------------------------
=>MAX_TIMES_TRIED
Please specify the number of times that Dbvisit should attempt to apply the missing log file before raising an error.
Note this number is also used to raise an error if Dbvisit cannot be started in case a previous scheduled Dbvisit is still running.

Ensure that this number is not too low and not too high.

If you are unsure, set to 4

Maximum attempts before raising error when log file is not there is [4]:
=>Maximum attempts before raising error when log file is not there will be: 4

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

------------------------------------------------------------------------------
=>ORACLE_SID_ASM_DEST
If your standby database is using ASM and ASM instance name on the standby server kiwi81
is different than the ASM instance name on the primary server kiwi92, then it can be specified here.
Default is the same as ORACLE_SID_ASM: [+ASM2]
If you are not using ASM, then leave it as default.

if unsure, leave blank.

ORACLE_SID_ASM_DEST on standby server is [+ASM2]: +ASM1
=>Optional ORACLE_SID_ASM_DEST on standby server will be: +ASM1

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

------------------------------------------------------------------------------
=>ADMINS
Please enter the administrator email address(es) where emails will be sent upon
success or failure of Dbvisit. Multiple emails
should be separated with a comma (,).
Sample:
support@mycompany.com,dba@mycompany.com

Administrators email is [oracle@kiwi92]:
=>Administrators email will be: oracle@kiwi92

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

------------------------------------------------------------------------------
=>MAILCFG_FROM
Please enter the FROM email address of this server (optional).
If this is not specified when using Dbvisit internal mail, the emails may not arrive.

Mail FROM address is [oracle@kiwi92.com]: oracle@kiwi92
=>Mail FROM address will be: oracle@kiwi92

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

------------------------------------------------------------------------------
=>MAILCFG_FROM_DR
Please enter the FROM email address of the standby server (optional).
If this is not specified when using Dbvisit internal mail, the emails may not arrive.

Mail FROM_DR address is [oracle@kiwi81.com]: oracle@kiwi81
=>Mail FROM_DR address will be: oracle@kiwi81

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

------------------------------------------------------------------------------
=>MAILCFG_SMTP_SERVER
Please enter the smtp mail server to send the email to.
Sample:
- mail.<your company name>.com
- smtp.<your company name>.com

SMTP mail server is [mail.yourdomain.com]: localhost
=>SMTP mail server will be: localhost

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

------------------------------------------------------------------------------
=>MAILCFG_SMTP_SERVER_DR
Optional smtp mail server for the standby server.
Only used if smtp mail server for the standby server differs from the
main smtp mail server (MAILCFG_SMTP_SERVER).
Sample:
- mail.dbvisit.com
- smtp.dbvisit.com

SMTP mail server for standby server is (optional) []:
=>SMTP mail server for standby server will be:

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

------------------------------------------------------------------------------
=========================================================
Primary Archive log Management Module Settings (AMM)
=========================================================
=>ARCHSOURCE_MANAGEMENT
Do you want to setup (archive) log file management on the primary server?
This is used to manage the Oracle logs on the primary server.
- Alerts when certain thresholds have been reached.
- Can delete Oracle archives logs after a set number of days.
- Can keep a constant number of Oracle archive logs on the system.

Values are Yes or No
Yes = Setup and use AMM on primary server.
No = do not use AMM on primary server.

If you are unsure, set to Yes.

Should Dbvisit Archive Log Management Module be used on primary server? [Y]:
=>Dbvisit Archive Log Management Module on primary server will used: Y

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

------------------------------------------------------------------------------
=>DAYS_TO_KEEP_ARCHSOURCE
Please specify the number of days to keep the Oracle log files on the primary server.
After this the log files will be removed from the server.
To disable this setting, set to 0.

If you are unsure, set to 7

Number of days to keep log files on disk is [7]:
=>Number of days to keep log files on disk will be: 7

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

------------------------------------------------------------------------------
=>NUM_ARCHSOURCE_TO_KEEP
Please specify the number of archive log files to keep on the primary server.
Log files greater than this number will be removed (oldest first).
To disable this setting, set to 0.

If you are unsure, set to 0 (disable).

Number of log files to keep on disk is [0]:
=>Number of log files to keep on disk will be: 0

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

------------------------------------------------------------------------------
=>ARCHSOURCE_BACKUP_COUNT
Please specify the number of times an archive log has to be backed up by RMAN
before it is deleted from the primary server by Dbvisit Standby.
Values range from 0-15 and is only applicable if RMAN is used to backup archive
log files. This parameter is only applicable to Oracle versions 9 or higher.
To disable this setting, set to 0.

If you are unsure, set to 0 (disable).

Archive log backup count is [0]:
=>Archive log backup count will be: 0

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

------------------------------------------------------------------------------
=>THRESHOLD_ARCHSOURCE
Please specify the threshold in percentage (%) of how much disk space may be taken up by the Oracle log files on disk before an alert is triggered on the primary server.
80 means at 80% disk space full an alert will be triggered.

Please specify threshold as an integer.

If you are unsure, set to 80.

Threshold for log file management is [80]:
=>Threshold for log file management will be: 80

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

------------------------------------------------------------------------------
=>FRA_THRESHOLD_ARCHSOURCE
Please specify the threshold in percentage (%) of how much FRA space may be taken up by the Oracle log files on disk before an alert is triggered on the primary server.
This setting is valid only for Oracle databases versions 10 or higher that have FRA enabled in the primary database.
80 means at 80% FRA full an alert will be triggered.
To disable this setting, set to 0.

Please specify threshold as an integer.

FRA threshold for log file management is [0]:
=>FRA threshold for log file management will be: 0

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

------------------------------------------------------------------------------
=>DELETE_ARCHSOURCE
Please specify if (archive) log files should be deleted once the threshold (THRESHOLD_ARCHSOURCE) on the primary server is reached.
Once the percentage threshold is reached oldest (archive) log files are deleted first.
The log files WILL have been transferred to the standby server.
(There is no verification that these log files have been backed up).

Values are Yes or No
Yes = Let Dbvisit delete (archive) log files once percentage threshold is met.
No = Dbvisit will only alert once percentage threshold (no log files will be deleted).

If you are unsure, set to No.

Should Dbvisit Archive Log Management Module delete log files once percentage threshold is met? [N]:
=>Dbvisit Archive Log Management Module will delete log files once percentage threshold is met: N

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

------------------------------------------------------------------------------
=========================================================
Standby Archive log Management Module Settings (AMM)
=========================================================
=>ARCHDEST_MANAGEMENT
Do you want to setup (archive) log file management on the standby server?
This is used to manage the Oracle logs on the standby server.
- Alerts when certain thresholds have been reached.
- Can delete Oracle archives logs after a set number of days.
- Can keep a constant number of Oracle archive logs on the system.

Values are Yes or no
Yes = Setup and use AMM on standby server.
No = do not use AMM on standby server.

If you are unsure, set to Yes.

Should Dbvisit Archive Log Management Module be used on standby server? [Y]:
=>Dbvisit Archive Log Management Module on standby server will used: Y

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

------------------------------------------------------------------------------
=>DAYS_TO_KEEP_ARCHDEST
Please specify the number of days to keep the Oracle log files on the standby server.
After this the log files will be removed from the server.
To disable this setting, set to 0.

If you are unsure, set to 7

Number of days to keep log files on disk is [7]:
=>Number of days to keep log files on disk will be: 7

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

------------------------------------------------------------------------------
=>NUM_ARCHDEST_TO_KEEP
Please specify the number of archive log files to keep on the standby server.
Log files greater than this number will be removed (oldest first).
To disable this setting, set to 0.

If you are unsure, set to 0 (disable).

Number of log files to keep on disk is [0]:
=>Number of log files to keep on disk will be: 0

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

------------------------------------------------------------------------------
=>THRESHOLD_ARCHDEST
Please specify the threshold in percentage (%) of how much disk space may be taken up by the Oracle log files on disk before an alert is triggered on the standby server.
80 means at 80% disk space full an alert will be triggered.

Please specify threshold as an integer.

If you are unsure, set to 80.

Threshold for log file management is [80]:
=>Threshold for log file management will be: 80

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

------------------------------------------------------------------------------
=>DELETE_ARCHDEST
Please specify if (archive) log files should be deleted once the threshold (THRESHOLD_ARCHDEST) on the standby server is reached.
Once the percentage threshold is reached oldest (archive) log files are deleted first.
The log files WILL have been applied to the standby database.
(There is no verification that these log files have been backed up).

Values are Yes or No
Yes = Let Dbvisit delete (archive) log files once percentage threshold is met.
No = Dbvisit will only alert once percentage threshold (no log files will be deleted).

If you are unsure, set to No.

Should Dbvisit Archive Log Management Module delete log files once percentage threshold is met? [N]:
=>Dbvisit Archive Log Management Module will delete log files once percentage threshold is met: N

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

------------------------------------------------------------------------------
Would you like to review all the variables? <Yes/No> [Yes]:

=====10 Generic Settings=====
1) PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin
2) ORATAB=/etc/oratab
3) ORACLE_SID=DEV2
4) ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
5) OWNER=oracle
6) DBVNET_PORT=7890
7) COMPRESS=/usr/bin/gzip
8) UNCOMPRESS=/usr/bin/gunzip
9) ZIP_EXTENSION=.gz
10) SEND_HEARTBEAT_TIME24=0700

=====15 RAC Settings=====
11) RAC=Y
12) RAC_TAKEOVER=Y
13) RAC_TAKEOVER_FORCE=N
14) RAC_TAKEOVER_SID=DEV1

=====20 Primary Server Settings=====
15) SOURCE=kiwi92
16) DBVISIT_BASE=/usr/dbvisit
17) ENCRYPT_PASSWDS=Y
18) DBUSER=dbvisit7
19) DBPASSWD=******
20) LEAVE_COMPRESS_SOURCE=N
21) SYNCH_DBVISIT_INSTALL=Y
22) LOGSWITCH=N
23) ORACLE_SID_ASM=+ASM2

=====25 Sys Logon Settings=====
24) SYS_LOGON=N
25) SYS_USER=sys
26) _SYS_PASSWD=

Are these variables correct? <Yes/No> [Yes]:

=====25 Sys Logon Settings=====
27) SYS_LOGON_STRING=as sysdba

=====30 Standby Server Settings=====
28) DESTINATION=kiwi81
29) ORACLE_SID_DEST=DEV
30) DBVISIT_BASE_DR=/usr/dbvisit
31) ARCHDEST=/u01/app/oracle/dbvisit_archdest/DEV
32) LEAVE_COMPRESS_DEST=Y
33) MAX_TIMES_TRIED=4
34) ORACLE_SID_ASM_DEST=+ASM1

=====40 Mail Settings=====
35) ADMINS=oracle@kiwi92
36) MAILCFG_FROM=oracle@kiwi92
37) MAILCFG_FROM_DR=oracle@kiwi81
38) SUCCESSMAIL=Y
39) SUCCESSMAIL_DR=Y
40) MAILCFG_SMTP_SERVER=localhost
41) MAILCFG_SMTP_SERVER_DR=

=====50 Primary Archive Log Management Settings=====
42) ARCHSOURCE_MANAGEMENT=Y
43) DAYS_TO_KEEP_ARCHSOURCE=7
44) NUM_ARCHSOURCE_TO_KEEP=0
45) ARCHSOURCE_BACKUP_COUNT=0
46) THRESHOLD_ARCHSOURCE=80
47) FRA_THRESHOLD_ARCHSOURCE=0
48) DELETE_ARCHSOURCE=N

=====60 Standby Archive Log Management Settings=====
49) ARCHDEST_MANAGEMENT=Y
50) DAYS_TO_KEEP_ARCHDEST=7
51) NUM_ARCHDEST_TO_KEEP=0
52) THRESHOLD_ARCHDEST=80

Are these variables correct? <Yes/No> [Yes]:

=====60 Standby Archive Log Management Settings=====
53) DELETE_ARCHDEST=N

Are these variables correct? <Yes/No> [Yes]:

Redisplay all variables again? <Yes/No> [No]:

------------------------------------------------------------------------------
=>DDC File
Please specify the name of the Dbvisit Database Configuration (DDC) file.
The DDC file contains all the Dbvisit Standby settings.
The DDC file is a plain text file and can be edited manually or through this setup.

Dbvisit Database Configuration (DDC) file is [DEV2]:
=>Dbvisit Database Configuration (DDC) file will be: DEV2

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

=>Dbvisit Database configuration (DDC) file /usr/dbvisit/standby/conf/dbv_DEV2.env created.
=========================================================
     Dbvisit configuration completed.

   IMPORTANT!
      Ensure the following directories are setup on
      standby server kiwi81 with the correct permissions:
      1) /usr/dbvisit
      2) /u01/app/oracle/dbvisit_archdest/DEV

 Next steps:
Create standby database using option in main menu:
      7) Create Standby Database

=========================================================
Please press <Enter> to return to main menu...

=========================================================
     Dbvisit Standby Database Technology (7.0.54.15715)
           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
=========================================================
     Dbvisit setup completed.

 Any changes to the configuration can be made by either:
1) Manually by editing dbv_DEV2.env.
2) Running dbvisit_setup and choosing option:
     -> 6) Update Dbvisit Database configuration (DDC) file

Next steps:
1) Run Dbvisit on this server with command:
       dbvisit DEV2
2) Run Dbvisit on standby server with command:
       dbvisit DEV2

Once Dbvisit has been tested, schedule Dbvisit on primary and standby servers using cron or other scheduling tool.
=========================================================

 

Apply The Dbvisit Standby License Key

In this example a temporary (trial) key is applied

The key must be applied on both primary nodes - for each DDC

 

Primary Node 1 - kiwi91 for DDC - DEV1

oracle@kiwi91[/usr/dbvisit/standby]: ./dbvisit -lic DEV1 6I0OD-MZ5MJ-735FP-7QSUX-YNARZ-G3SFL-9P81R
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 3483)
dbvisit started on kiwi91: Thu Apr  7 16:29:54 2016 ()
=============================================================

Dbvisit Standby license information for: DEV1
customer_seq=1
customer_key_seq=0
license_type=DEMO (0)
expiry_date=2016-04-21
=>Update with license key: 6I0OD-MZ5MJ-735FP-7QSUX-YNARZ-G3SFL-9P81R? <Yes/No> [Yes]:
License updated.
Status: Valid

=============================================================
dbvisit ended on kiwi91: Thu Apr  7 16:29:58 2016
=============================================================

 

Primary Node 2 - kiwi92 for DDC - DEV2

oracle@kiwi92[/usr/dbvisit/standby]: ./dbvisit -lic DEV2 6I0OD-MZ5MJ-735FP-7QSUX-YNARZ-G3SFL-9P81R
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 4923)
dbvisit started on kiwi92: Thu Apr  7 16:30:58 2016 ()
=============================================================

Dbvisit Standby license information for: DEV2
customer_seq=1
customer_key_seq=0
license_type=DEMO (0)
expiry_date=2016-04-21
=>Update with license key: 6I0OD-MZ5MJ-735FP-7QSUX-YNARZ-G3SFL-9P81R? <Yes/No> [Yes]:
License updated.
Status: Valid

=============================================================
dbvisit ended on kiwi92: Thu Apr  7 16:31:04 2016
=============================================================

 

Creating the Standby Database

The standby database will first be created as a single instance standby database on the standby RAC node 1 - kiwi81

The Standby database will be called DEV and the instance that will be created for it will be DEV as well.  This will be adjusted in the next step when the database is converted to a RAC enabled database with two instances.

The current DDC files as created above will point to kiwi81 as the standby server with +ASM1 as the standby database ASM instance name.

Please note the following:

  1. The standby database in this case will also use ASM but will use different diskgroups (+DATADR and +DG)  - this is purely to show that Dbvisit Standby does support a standby database with different diskgroups being used.  If you use the exact same configuration on the standby than the primary - which is recommended, you do not have to adjust the diskgroup locations is is done below (db_create_file_dest and db_recovery_file_dest and the spfile parameters)
  2. A template is saved based on the answers provided
  3. During the Create Standby Database (CSD) process, the primary database will be backed up to local disk (/usr/tmp in this case) - you need to make sure this location has sufficient space to store a full compressed backup of the primary database.  The backup will then be copied to the standby server into a lcoation specified (in this example it will also be /usr/tmp).  It is important that these locations have sufficient space.  You may use other directories.

 

IMPORTANT

The standby database creation process can take time - RMAN compressed backups are used. You can estimate the time the standby creation will take by doubling your normal RMAN backup timings.

Example, if a primary database backup takes 2 hours, the Create Standby Database (CSD) process can take 2 x 2 = 4 hours + the time to copy the backup from the primary to the standby server.

 

The full example with answers provided are shown below:

 

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


=========================================================

     Dbvisit Standby Database Technology (7.0.54.15715)
           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.54.15715)
           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)   DEV1
2)   Return to menu

Please enter choice : 1

Is this correct? <Yes/No> [Yes]:
Database DEV1 is up.

>>> Checking Dbvisit Standby for configurational differences between kiwi91 and kiwi81...

Waiting for 5 seconds (RETRIES_WAIT_IN_SEC) until retry.
    Dbvisit Standby configurational differences found between kiwi91 and kiwi81...

  > Transferring 'dbv_DEV1.env' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [12805 KB/s] - done.

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

>>> Checking primary datafiles on kiwi91...

>>> Validating Dbvisit configuration file on kiwi81...

>>> Checking if a database is up and running on kiwi81...

    Checks completed OK.
>>> Total database size for DEV1 is 1.90GB

What would you like to do:
   1 - Create standby database (and optionally save settings in template)
   2 - Help
   3 - 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]: Yes
Standby database will be ASM: Y
Is this correct? <Yes/No> [Yes]: Yes

-------------------------------------------------------------------------------

Use network compression to compress the database files during transfer? [No]: 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/DEV/adump
compatible                              11.2.0.4.0
db_block_size                           8192
db_create_file_dest                     +DATA
db_domain
db_name                                 DEV
db_recovery_file_dest                   +DATA
db_recovery_file_dest_size              4294967296
diagnostic_dest                         /u01/app/oracle
dispatchers                             (PROTOCOL=TCP) (SERVICE=DEVXDB)
log_archive_format                      %t_%s_%r.dbf
nls_territory                           NEW ZEALAND
open_cursors                            300
pga_aggregate_target                    157286400
processes                               150
remote_login_passwordfile               EXCLUSIVE
sga_max_size                            683671552
sga_target                              683671552
spfile                                  +DATA
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]: 2

WARNING: Do NOT use single or double quotes to enclose parameter values!
Separate multiple values with a comma. If a comma is part of a value, escape it
with a backslash.
If a comma is part of a value, escape it with a backslash.

Enter full parameter name: []: db_create_file_dest
   1 - Remove from the standby parameter file
   2 - New value in the standby parameter file

Please enter your choice: []: 2

Enter new value (leave blank to set to null or default Oracle value): []: +DATADR
Validating ... please wait

The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
audit_file_dest                         /u01/app/oracle/admin/DEV/adump
compatible                              11.2.0.4.0
db_block_size                           8192
db_create_file_dest                     +DATADR
db_domain
db_name                                 DEV
db_recovery_file_dest                   +DATA
db_recovery_file_dest_size              4294967296
diagnostic_dest                         /u01/app/oracle
dispatchers                             (PROTOCOL=TCP) (SERVICE=DEVXDB)
log_archive_format                      %t_%s_%r.dbf
nls_territory                           NEW ZEALAND
open_cursors                            300
pga_aggregate_target                    157286400
processes                               150
remote_login_passwordfile               EXCLUSIVE
sga_max_size                            683671552
sga_target                              683671552
spfile                                  +DATA
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]: 2

WARNING: Do NOT use single or double quotes to enclose parameter values!
Separate multiple values with a comma. If a comma is part of a value, escape it
with a backslash.
If a comma is part of a value, escape it with a backslash.

Enter full parameter name: []: db_recovery_file_dest
   1 - Remove from the standby parameter file
   2 - New value in the standby parameter file

Please enter your choice: []: 2

Enter new value (leave blank to set to null or default Oracle value): []: +DG
Validating ... please wait

The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
audit_file_dest                         /u01/app/oracle/admin/DEV/adump
compatible                              11.2.0.4.0
db_block_size                           8192
db_create_file_dest                     +DATADR
db_domain
db_name                                 DEV
db_recovery_file_dest                   +DG
db_recovery_file_dest_size              4294967296
diagnostic_dest                         /u01/app/oracle
dispatchers                             (PROTOCOL=TCP) (SERVICE=DEVXDB)
log_archive_format                      %t_%s_%r.dbf
nls_territory                           NEW ZEALAND
open_cursors                            300
pga_aggregate_target                    157286400
processes                               150
remote_login_passwordfile               EXCLUSIVE
sga_max_size                            683671552
sga_target                              683671552
spfile                                  +DATA
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]: 2

WARNING: Do NOT use single or double quotes to enclose parameter values!
Separate multiple values with a comma. If a comma is part of a value, escape it
with a backslash.
If a comma is part of a value, escape it with a backslash.

Enter full parameter name: []: spfile
   1 - Remove from the standby parameter file
   2 - New value in the standby parameter file

Please enter your choice: []: 2
Leave blank to create spfile spfileDEV.ora in a default operating system
location.
Alternatively provide a valid ASM diskgroup name to create spfile
spfileDEV.ora.
Filesystem locations are not accepted.
Avilable ASM Diskgroups on standby server:
  +ACFSDG
  +CRS_VOT
  +DATADR
  +DG

Spfile ASM location: []: +DATADR

The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
audit_file_dest                         /u01/app/oracle/admin/DEV/adump
compatible                              11.2.0.4.0
db_block_size                           8192
db_create_file_dest                     +DATADR
db_domain
db_name                                 DEV
db_recovery_file_dest                   +DG
db_recovery_file_dest_size              4294967296
diagnostic_dest                         /u01/app/oracle
dispatchers                             (PROTOCOL=TCP) (SERVICE=DEVXDB)
log_archive_format                      %t_%s_%r.dbf
nls_territory                           NEW ZEALAND
open_cursors                            300
pga_aggregate_target                    157286400
processes                               150
remote_login_passwordfile               EXCLUSIVE
sga_max_size                            683671552
sga_target                              683671552
spfile                                  +DATADR
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

-------------------------------------------------------------------------------

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]: No
Transportable media will be used: N
Is this correct? <Yes/No> [Yes]: Yes

-------------------------------------------------------------------------------
A temporary location must be specified on kiwi91 where the database will be
backed up to first.
This location must be big enough to hold RMAN backup of the whole database
(1.90GB).

Specify the location on this server: [/usr/tmp]:
Directory for temporary location will be: /usr/tmp
Is this correct? <Yes/No> [Yes]: Yes

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

Specify location on remote server: [/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]: 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]: 2
Primary location: +DATA
Avilable ASM Diskgroups on standby server:
  +ACFSDG
  +CRS_VOT
  +DATADR
  +DG

Provide ASM Diskgroup name: []: +DATADR

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

-------------------------------------------------------------------------------
Primary                   ===> Standby
-------------------------------------------------------------------------------
+DATA                     ===> +DATADR

-------------------------------------------------------------------------------
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

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]: 2
Primary location: +DATA
Avilable ASM Diskgroups on standby server:
  +ACFSDG
  +CRS_VOT
  +DATADR
  +DG

Provide ASM Diskgroup name: []: +DG

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

-------------------------------------------------------------------------------
Primary                   ===> Standby
-------------------------------------------------------------------------------
+DATA                     ===> +DG

-------------------------------------------------------------------------------
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

-------------------------------------------------------------------------------
=>Create standby database template for DEV1 using provided answers? <Yes/No>
[Yes]: Yes
What would you like to do:
   1 - Continue with creating a standby database
   2 - Terminate creating a standby database. The saved template will be
       available for future use
   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.
|
>>> Creating standby control file... - done.

Backup of primary database completed.

>>> Transferring backup from kiwi91 to kiwi81...

  > Transferring 'dbv_DEV1_csd_dbf_1_01r2eto1_1_1.rman' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [57417 KB/s] - done.
  > Transferring 'dbv_DEV1_csd_dbf_1_02r2etor_1_1.rman' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [55038 KB/s] - done.
  > Transferring 'dbv_DEV1_csd_dbf_2_03r2etp1_1_1.rman' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [47628 KB/s] - done.
  > Transferring 'dbv_DEV1_csd_dbf_3_04r2etpl_1_1.rman' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [42419 KB/s] - done.
  > Transferring 'dbv_DEV1_csd_dbf_4_05r2etpv_1_1.rman' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [65683 KB/s] - done.
  > Transferring 'dbv_DEV1_csd_dbf_5_06r2etq9_1_1.rman' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [31151 KB/s] - done.

>>> Creating standby database parameter file... - done.

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

>>> Starting standby database DEV on kiwi81 mount... - done.

>>> Creating an ASM standby spfile on kiwi81 ... - done.

>>> Restoring datafiles on kiwi81...

    Restoring datafile 1 - done.
    Restoring datafile 2 - done.
    Restoring datafile 3 - done.
    Restoring datafile 4 - done.
    Restoring datafile 5 - done.
|
>>> Renaming standby redo logs and tempfiles on kiwi81... - 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 kiwi81 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.54.15715)
           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

oracle@kiwi91[/usr/dbvisit/standby]:


 
 

 

Reviewing the standby database server (kiwi81) we can see the following:

The Instance DEV is running:

oracle@kiwi81[/usr/dbvisit/standby]: ps -ef|grep DEV
oracle    1921     1  0 16:44 ?        00:00:00 ora_pmon_DEV
oracle    1923     1  0 16:44 ?        00:00:00 ora_psp0_DEV
oracle    1928     1  0 16:44 ?        00:00:04 ora_vktm_DEV
oracle    1932     1  0 16:44 ?        00:00:00 ora_gen0_DEV
oracle    1934     1  0 16:44 ?        00:00:00 ora_diag_DEV
oracle    1937     1  0 16:44 ?        00:00:00 ora_dbrm_DEV
oracle    1939     1  0 16:44 ?        00:00:00 ora_ping_DEV
oracle    1941     1  0 16:44 ?        00:00:00 ora_acms_DEV
oracle    1943     1  0 16:44 ?        00:00:00 ora_dia0_DEV
oracle    1945     1  0 16:44 ?        00:00:00 ora_lmon_DEV
oracle    1947     1  0 16:44 ?        00:00:00 ora_lmd0_DEV
oracle    1949     1  0 16:44 ?        00:00:00 ora_rms0_DEV
oracle    1951     1  0 16:44 ?        00:00:00 ora_lmhb_DEV
oracle    1953     1  0 16:44 ?        00:00:00 ora_mman_DEV
oracle    1955     1  0 16:44 ?        00:00:00 ora_dbw0_DEV
oracle    1957     1  0 16:44 ?        00:00:00 ora_lgwr_DEV
oracle    1959     1  0 16:44 ?        00:00:00 ora_ckpt_DEV
oracle    1961     1  0 16:44 ?        00:00:00 ora_smon_DEV
oracle    1963     1  0 16:44 ?        00:00:00 ora_reco_DEV
oracle    1965     1  0 16:44 ?        00:00:00 ora_rbal_DEV
oracle    1967     1  0 16:44 ?        00:00:00 ora_asmb_DEV
oracle    1969     1  0 16:44 ?        00:00:00 ora_mmon_DEV
oracle    1977     1  0 16:44 ?        00:00:00 ora_mmnl_DEV
oracle    1979     1  0 16:44 ?        00:00:00 ora_d000_DEV
oracle    1981     1  0 16:44 ?        00:00:00 ora_mark_DEV
oracle    1983     1  0 16:44 ?        00:00:00 ora_s000_DEV
oracle    2000     1  0 16:44 ?        00:00:00 ora_o000_DEV
oracle    2044     1  0 16:44 ?        00:00:00 ora_arc0_DEV
oracle    2046     1  0 16:44 ?        00:00:00 ora_arc1_DEV
oracle    2048     1  0 16:44 ?        00:00:00 ora_arc2_DEV
oracle    2050     1  0 16:44 ?        00:00:00 ora_arc3_DEV
oracle    2068     1  0 16:44 ?        00:00:00 ora_o001_DEV
oracle    7305 27451  0 16:52 pts/0    00:00:00 grep DEV

 

The database files in ASM (using asmcmd command utility to list)

 

ASMCMD> find . *
+DATADR/DEV/
+DATADR/DEV/CONTROLFILE/
+DATADR/DEV/CONTROLFILE/current.267.908556215
+DATADR/DEV/DATAFILE/
+DATADR/DEV/DATAFILE/SYSAUX.266.908556303
+DATADR/DEV/DATAFILE/SYSTEM.263.908556267
+DATADR/DEV/DATAFILE/UNDOTBS1.265.908556323
+DATADR/DEV/DATAFILE/UNDOTBS2.262.908556343
+DATADR/DEV/DATAFILE/USERS.261.908556353
+DATADR/DEV/onlinelog/
+DATADR/DEV/parameterfile/
+DATADR/DEV/parameterfile/spfile.260.908556237
+DATADR/DEV/parameterfile/spfileDEV.ora
+DATADR/DEV/tempfile/
ASMCMD> cd +DG
ASMCMD> find . *
+DG/DEV/
+DG/DEV/CONTROLFILE/
+DG/DEV/CONTROLFILE/current.262.908556215
+DG/DEV/onlinelog/
ASMCMD>

 

 

Running Dbvisit Standby The First Time

Once the standby database is created, you will notice that you have a single instance database running on kiwi81 called DEV.

 

It is important that before you continue that you run Dbvisit Standby on both primary nodes to ship logs to the standby followed by applying logs on the standby database.

 

Sending Logs

 

From Primary RAC node 1: kiwi91 

oracle@kiwi91[/usr/dbvisit/standby]: ./dbvisit DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 11100)
dbvisit started on kiwi91: Thu Apr  7 16:51:07 2016 ()
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)...

>>> Note FORCE_LOGGING is disabled in the primary database.

>>> Sending heartbeat message... - done.
>>> Checking Dbvisit Standby for configurational differences between kiwi91 and kiwi81...

    No configurational differences found between kiwi91 and kiwi81.

>>> Log file(s) for DEV1 will be transferred from kiwi91 to kiwi81...

  > Transferring 'thread_1_seq_63.299.908556377.gz' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [22072 KB/s] - done.

    1 archive log transfer to kiwi81 for DEV1 completed.
    Last sequence was 63 thread 1.
    No Mail sent as SEND_MAIL_FLAG = N

>>> Dbvisit Archive Management Module (AMM)

    Config: number of archives to keep      = 0
    Config: number of days to keep archives = 7
    Config: archive backup count            = 0
    Config: diskspace full threshold        = 80%

    Current disk percent full (+DATA/dev/archivelog/2016_04_07) = 53%

    Number of archive logs deleted = 1

=============================================================
dbvisit ended on kiwi91: Thu Apr  7 16:51:31 2016
=============================================================
 

 

From Primary RAC node 2: kiwi92

oracle@kiwi92[/usr/dbvisit/standby]: ./dbvisit DEV2
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 11412)
dbvisit started on kiwi92: Thu Apr  7 16:51:27 2016 ()
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)...

>>> Note FORCE_LOGGING is disabled in the primary database.

>>> Sending heartbeat message... - done.
>>> Checking Dbvisit Standby for configurational differences between kiwi92 and kiwi81...

Waiting for 5 seconds (RETRIES_WAIT_IN_SEC) until retry.
    Dbvisit Standby configurational differences found between kiwi92 and kiwi81...

  > Transferring 'dbv_DEV2.env' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [9747 KB/s] - done.

>>> Log file(s) for DEV2 will be transferred from kiwi92 to kiwi81...

  > Transferring 'thread_2_seq_13.298.908556377.gz' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [86189 KB/s] - done.

    1 archive log transfer to kiwi81 for DEV2 completed.
    Last sequence was 13 thread 2.
    No Mail sent as SEND_MAIL_FLAG = N

>>> Dbvisit Archive Management Module (AMM)

    Config: number of archives to keep      = 0
    Config: number of days to keep archives = 7
    Config: archive backup count            = 0
    Config: diskspace full threshold        = 80%

    Current disk percent full (+DATA/dev/archivelog/2016_04_07) = 53%

    Number of archive logs deleted = 0

=============================================================
dbvisit ended on kiwi92: Thu Apr  7 16:51:53 2016
=============================================================

 

Applying Logs

The logs on the standby can be applied using either one of the DDC files.  Example:

oracle@kiwi81[/usr/dbvisit/standby]: ./dbvisit DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 7428)
dbvisit started on kiwi81: Thu Apr  7 16:52:19 2016 ()
=============================================================

>>> Sending heartbeat message... - done.
>>> Log file(s) for DEV from kiwi91 will be applied to kiwi81
201604071652 - Log seq 63 thread 1 applied to standby database DEV.
201604071652 - Log seq 13 thread 2 applied to standby database DEV.
    No Mail sent as SEND_MAIL_FLAG_DR = N

>>> Dbvisit Archive Management Module (AMM)

    Config: number of archives to keep      = 0
    Config: number of days to keep archives = 7
    Config: diskspace full threshold        = 80%

Processing /u01/app/oracle/dbvisit_archdest/DEV...
    Archive log dir: /u01/app/oracle/dbvisit_archdest/DEV
    Total number of archive files   : 1
    Number of archive logs deleted = 0
    Current Disk percent full       : 54%

=============================================================
dbvisit ended on kiwi81: Thu Apr  7 16:52:22 2016
=============================================================
 

 

Running a Log Gap Report

This is to show the difference between the primary and standby database.  For more detail see the Log Gap Report section in the documentation

oracle@kiwi91[/usr/dbvisit/standby]: ./dbvisit -i DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 12147)
dbvisit started on kiwi91: Thu Apr  7 16:53:45 2016 ()
=============================================================

Dbvisit Standby log gap report for DEV1 at 201604071653 (thread 1):
-------------------------------------------------------------
Standby database on kiwi81 is at sequence: 63.
Primary database on kiwi91 is at log sequence: 64.
Primary database on kiwi91 is at archived log sequence: 63.
Dbvisit Standby last transfer log sequence: 63.
Dbvisit Standby last transfer at: 201604071651.

Archive log gap for DEV1:  0.
Transfer log gap for DEV1: 0.
Standby database time lag (HH:MI:SS): 00:07:30.
    No Mail sent as SEND_MAIL_FLAG = N

Dbvisit Standby log gap report for DEV2 at 201604071653 (thread 2):
-------------------------------------------------------------
Standby database on kiwi81 is at sequence: 12.
Primary database on kiwi92 is at log sequence: 14.
Primary database on kiwi92 is at archived log sequence: 13.
Dbvisit Standby last transfer log sequence: 13.
Dbvisit Standby last transfer at: 201604071651.

Archive log gap for DEV2:  1.
Transfer log gap for DEV2: 0.
Standby database time lag (HH:MI:SS): 00:07:30.
    No Mail sent as SEND_MAIL_FLAG = N

=============================================================
dbvisit ended on kiwi91: Thu Apr  7 16:53:48 2016
=============================================================

 

 

Convert Single Instance Standby to Oracle RAC Standby

In this example we have the Standby RAC configured between the two nodes kiwi81 and kiwi82

The Standby Database is called DEV and we will create the instances DEV1 (on kiwi81) and DEV2 (on kiwi82)

 

Step 1: Update the standby spfile

 

The first step is to update the spfile, the following commands are used.

Note that the SCAN listener address of kiwi812-scan is used with port 1521 - this must already be pre-configured.

 
alter system set cluster_database=true scope=spfile sid='*';
alter system set instance_number=1 scope=spfile sid='DEV1';
alter system set instance_number=2 scope=spfile sid='DEV2';
alter system set thread=1 scope=spfile sid='DEV1';
alter system set thread=2 scope=spfile sid='DEV2';
alter system set undo_tablespace='UNDOTBS1' scope=spfile sid='DEV1';
alter system set undo_tablespace='UNDOTBS2' scope=spfile sid='DEV2';
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.83)(PORT=1521))' scope=both sid='DEV1';
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.84)(PORT=1521))' scope=both sid='DEV2';
alter system set remote_listener='kiwi812-scan:1521' scope=both sid='*';

 

When executed, you can then shutdown the standby database, example:

oracle@kiwi81[/usr/dbvisit/standby]: . oraenv
ORACLE_SID = [oracle] ? DEV
The Oracle base remains unchanged with value /u01/app/oracle
 
oracle@kiwi81[/usr/dbvisit/standby]: sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 7 17:02:25 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> connect / as sysdba
Connected.

SQL> show parameter spfile

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
spfile				     string	 +DATADR/dev/parameterfile/spfi
						 ledev.ora
SQL>
SQL> alter system set cluster_database=true scope=spfile sid='*';
System altered.

SQL> alter system set instance_number=1 scope=spfile sid='DEV1';
System altered.

SQL> alter system set instance_number=2 scope=spfile sid='DEV2';
System altered.

SQL> alter system set thread=1 scope=spfile sid='DEV1';
System altered.

SQL> alter system set thread=2 scope=spfile sid='DEV2';
System altered.

SQL> alter system set undo_tablespace='UNDOTBS1' scope=spfile sid='DEV1';
System altered.

SQL> alter system set undo_tablespace='UNDOTBS2' scope=spfile sid='DEV2';
System altered.

SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.83)(PORT=1521))' scope=both sid='DEV1';
System altered.

SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.84)(PORT=1521))' scope=both sid='DEV2';
System altered.

SQL> alter system set remote_listener='kiwi812-scan:1521' scope=both sid='*';
System altered.

SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> exit
 

 

 

Step 2:  Update the parameter file and password file located in $ORACLE_HOME/dbs

 

The next step is to update the parameter file in $ORACLE_HOME/dbs and the password file.  

The following steps are followed:

  1. The current parameter file pointing to the spfile is copied to create a parameter file for instance DEV1
  2. The password file is copied to create orapwDEV1
  3. The parameter files are copied to the second RAC node (kiwi82) and renamed to initDEV2.ora and orapwDEV2 

 

The end result is that we have a parameter file and password file on each of the nodes which for their respective instances.

The steps executed are shown below:

 

oracle@kiwi81[/usr/dbvisit/standby]: cd $ORACLE_HOME/dbs


oracle@kiwi81[/u01/app/oracle/product/11.2.0/db_1/dbs]: ls
hc_DEV.dat  hc_PROD1.dat  initDEV.ora  orapwDEV


oracle@kiwi81[/u01/app/oracle/product/11.2.0/db_1/dbs]: cat initDEV.ora
SPFILE='+DATADR/DEV/parameterfile/spfileDEV.ora'


oracle@kiwi81[/u01/app/oracle/product/11.2.0/db_1/dbs]: cp initDEV.ora initDEV1.ora


oracle@kiwi81[/u01/app/oracle/product/11.2.0/db_1/dbs]: cp orapwDEV orapwDEV1

oracle@kiwi81[/u01/app/oracle/product/11.2.0/db_1/dbs]: scp initDEV1.ora kiwi82:/u01/app/oracle/product/11.2.0/db_1/dbs/initDEV2.ora
initDEV1.ora                                                                                                              100%   49     0.1KB/s   00:00

oracle@kiwi81[/u01/app/oracle/product/11.2.0/db_1/dbs]: scp orapwDEV1 kiwi82:/u01/app/oracle/product/11.2.0/db_1/dbs/orapwDEV2
orapwDEV1                                                                                                                 100% 1536     1.5KB/s   00:00
oracle@kiwi81[/u01/app/oracle/product/11.2.0/db_1/dbs]:

 

Step 3:  Add The Standby Database as a Cluster Resource

 

The following commands are executed to add the database to clusterware:

 

srvctl add database -d DEV -o /u01/app/oracle/product/11.2.0/db_1 -c RAC -a "DATADR,DG" -p +DATADR/dev/parameterfile/spfiledev.ora
srvctl add instance -d DEV -i DEV1 -n kiwi81
srvctl add instance -d DEV -i DEV2 -n kiwi82
srvctl config database -d DEV
 

 

The Example output is as follow:

 

oracle@kiwi81[/home/oracle]: srvctl add database -d DEV -o /u01/app/oracle/product/11.2.0/db_1 -c RAC -a "DATADR,DG" -p +DATADR/dev/parameterfile/spfiledev.ora
oracle@kiwi81[/home/oracle]: srvctl add instance -d DEV -i DEV1 -n kiwi81
oracle@kiwi81[/home/oracle]: srvctl add instance -d DEV -i DEV2 -n kiwi82
oracle@kiwi81[/home/oracle]: srvctl config database -d DEV
Database unique name: DEV
Database name:
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATADR/dev/parameterfile/spfiledev.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: DEV
Database instances: DEV1,DEV2
Disk Groups: DATADR,DG
Mount point paths:
Services:
Type: RAC
Database is administrator managed

 

Step 4: Start the Standby Database using SRVCTL and review the status

We can now use the SRVCTL command line utility to start the standby database as a cluster database in a mounted state:

 

oracle@kiwi81[/home/oracle]: srvctl start database -d DEV -o mount
oracle@kiwi81[/home/oracle]: srvctl status database -d DEV
Instance DEV1 is running on node kiwi81
Instance DEV2 is running on node kiwi82
 

 

Reviewing the standby database from SQL*Plus:

SQL> select instance_number, instance_name, host_name, thread# from gv$instance order by 1;

INSTANCE_NUMBER INSTANCE_NAME	 HOST_NAME							     THREAD#
--------------- ---------------- ---------------------------------------------------------------- ----------
	      1 DEV1		 kiwi81.oraclekiwi.co.nz						   1
	      2 DEV2		 kiwi82.oraclekiwi.co.nz						   2


SQL> select controlfile_type from v$database;

CONTROL
-------
STANDBY

 

Update Dbvisit Standby - Configuration File

The next step is to update the DDC files on the primary nodes to use ORACLE_SID_DEST = DEV1

Edit both dbv_DEV1.env (kiwi91) and dbv_DEV2.env (kiwi92) and change:

 

ORACLE_SID_DEST = DEV

 

to

 

ORACLE_SID_DEST = DEV1

 

Once the above is complete, run Dbvisit Standby on both primary nodes to ship the DDC files to the standby (including the latest archive logs), example:

 

Primary node 1 - kiwi91

oracle@kiwi91[/usr/dbvisit/standby]: ./dbvisit DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 30594)
dbvisit started on kiwi91: Thu Apr  7 17:52:31 2016 ()
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)...

>>> Note FORCE_LOGGING is disabled in the primary database.

    Waiting 3 seconds for log switch completion...

First time Dbvisit Standby runs, Dbvisit Standby configuration will be copied to kiwi81...
  > Transferring 'dbv_DEV1.env' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [12455 KB/s] - done.
Contacting Standby Database DEV1 on kiwi81...
Next standby sequence required for recovery (64) for thread 1.

>>> Log file(s) for DEV1 will be transferred from kiwi91 to kiwi81...

  > Transferring 'thread_1_seq_64.300.908556965.gz' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [14218 KB/s] - done.
  > Transferring 'thread_1_seq_65.296.908560291.gz' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [23554 KB/s] - done.

    2 archive log transfers to kiwi81 for DEV1 completed.
    Last sequence was 65 thread 1.
    No Mail sent as SEND_MAIL_FLAG = N

>>> Dbvisit Archive Management Module (AMM)

    Config: number of archives to keep      = 0
    Config: number of days to keep archives = 7
    Config: archive backup count            = 0
    Config: diskspace full threshold        = 80%

    Current disk percent full (+DATA/dev/archivelog/2016_04_07) = 53%

    Number of archive logs deleted = 0

=============================================================
dbvisit ended on kiwi91: Thu Apr  7 17:52:58 2016
=============================================================

oracle@kiwi91[/usr/dbvisit/standby]:

 

Primary Node 2: kiwi92

oracle@kiwi92[/usr/dbvisit/standby]: ./dbvisit DEV2
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 31189)
dbvisit started on kiwi92: Thu Apr  7 17:52:58 2016 ()
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)...

>>> Note FORCE_LOGGING is disabled in the primary database.

    Waiting 3 seconds for log switch completion...

First time Dbvisit Standby runs, Dbvisit Standby configuration will be copied to kiwi81...
  > Transferring 'dbv_DEV2.env' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [12138 KB/s] - done.
Contacting Standby Database DEV1 on kiwi81...
Next standby sequence required for recovery (13) for thread 2.

>>> Log file(s) for DEV2 will be transferred from kiwi92 to kiwi81...

  > Transferring 'thread_2_seq_13.298.908556377.gz' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [30779 KB/s] - done.
  > Transferring 'thread_2_seq_14.297.908556961.gz' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [6449 KB/s] - done.
  > Transferring 'thread_2_seq_15.301.908560291.gz' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [26817 KB/s] - done.
  > Transferring 'thread_2_seq_16.302.908560361.gz' to server kiwi81:7890
    Progress: 0%...20%...40%...60%...80%...100% [6092 KB/s] - done.

    4 archive log transfers to kiwi81 for DEV2 completed.
    Last sequence was 16 thread 2.
    No Mail sent as SEND_MAIL_FLAG = N

>>> Dbvisit Archive Management Module (AMM)

    Config: number of archives to keep      = 0
    Config: number of days to keep archives = 7
    Config: archive backup count            = 0
    Config: diskspace full threshold        = 80%

    Current disk percent full (+DATA/dev/archivelog/2016_04_07) = 53%

    Number of archive logs deleted = 0

=============================================================
dbvisit ended on kiwi92: Thu Apr  7 17:53:37 2016
=============================================================

oracle@kiwi92[/usr/dbvisit/standby]:

 

We can now apply logs to the standby database (which is full RAC Enabled) from the first node (kiwi81) using for example DDC - DEV1

The srvctl status command with "-v" flag is used to show that the standby database is running on both nodes.

But remember recovery will only be happening from instance 1:

 

Standby Server - kiwi81

oracle@kiwi81[/usr/dbvisit/standby]: srvctl status database -d DEV -v
Instance DEV1 is running on node kiwi81. Instance status: Mounted (Closed).
Instance DEV2 is running on node kiwi82. Instance status: Mounted (Closed).
 

oracle@kiwi81[/usr/dbvisit/standby]: ./dbvisit DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 29166)
dbvisit started on kiwi81: Thu Apr  7 17:56:41 2016 ()
=============================================================

>>> Log file(s) for DEV1 from kiwi91 will be applied to kiwi81
201604071756 - Log seq 64 thread 1 applied to standby database DEV1.
201604071756 - Log seq 13 thread 2 applied to standby database DEV1.
201604071756 - Log seq 14 thread 2 applied to standby database DEV1.
201604071756 - Log seq 64 thread 1 applied to standby database DEV1.
201604071756 - Log seq 15 thread 2 applied to standby database DEV1.
201604071756 - Log seq 64 thread 1 applied to standby database DEV1.
201604071756 - Log seq 65 thread 1 applied to standby database DEV1.
201604071756 - Log seq 15 thread 2 applied to standby database DEV1.
    No Mail sent as SEND_MAIL_FLAG_DR = N

>>> Dbvisit Archive Management Module (AMM)

    Config: number of archives to keep      = 0
    Config: number of days to keep archives = 7
    Config: diskspace full threshold        = 80%

Processing /u01/app/oracle/dbvisit_archdest/DEV...
    Archive log dir: /u01/app/oracle/dbvisit_archdest/DEV
    Total number of archive files   : 5
    Number of archive logs deleted = 0
    Current Disk percent full       : 54%

=============================================================
dbvisit ended on kiwi81: Thu Apr  7 17:56:46 2016
=============================================================

oracle@kiwi81[/usr/dbvisit/standby]: srvctl status database -d DEV -v
Instance DEV1 is running on node kiwi81. Instance status: Mounted (Closed).
Instance DEV2 is running on node kiwi82. Instance status: Mounted (Closed).

 

 

Performing a Graceful Switchover

Before we can execute the graceful switchover process between node 1 (kiwi91) on the primary and node 1 on the standby (kiwi81), we need to stop the second instance on the standby and make sure the log gap report is 1 or less.

 

Step 1: Stop the standby 2nd instance

 

oracle@kiwi81[/usr/dbvisit/standby]: srvctl stop instance -d DEV -i DEV2
oracle@kiwi81[/usr/dbvisit/standby]: srvctl status database -d DEV -v
Instance DEV1 is running on node kiwi81. Instance status: Mounted (Closed).
Instance DEV2 is not running on node kiwi82
oracle@kiwi81[/usr/dbvisit/standby]:

 

Step 2: Run a log gap report

The log gap report is executed on the first node - kiwi91 using the "./dbvisit -i DDC" command:

 

oracle@kiwi91[/usr/dbvisit/standby]: ./dbvisit -i DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 3615)
dbvisit started on kiwi91: Thu Apr  7 18:04:03 2016 ()
=============================================================

Dbvisit Standby log gap report for DEV1 at 201604071804 (thread 1):
-------------------------------------------------------------
Standby database on kiwi81 is at sequence: 75.
Primary database on kiwi91 is at log sequence: 77.
Primary database on kiwi91 is at archived log sequence: 76.
Dbvisit Standby last transfer log sequence: 76.
Dbvisit Standby last transfer at: 201604071802.

Archive log gap for DEV1:  1.
Transfer log gap for DEV1: 0.
Standby database time lag (HH:MI:SS): 00:01:29.
    No Mail sent as SEND_MAIL_FLAG = N

Dbvisit Standby log gap report for DEV2 at 201604071804 (thread 2):
-------------------------------------------------------------
Standby database on kiwi81 is at sequence: 23.
Primary database on kiwi92 is at log sequence: 24.
Primary database on kiwi92 is at archived log sequence: 23.
Dbvisit Standby last transfer log sequence: 23.
Dbvisit Standby last transfer at: 201604071802.

Archive log gap for DEV2:  0.
Transfer log gap for DEV2: 0.
Standby database time lag (HH:MI:SS): 00:01:29.
    No Mail sent as SEND_MAIL_FLAG = N

=============================================================
dbvisit ended on kiwi91: Thu Apr  7 18:04:07 2016
=============================================================

From the above we can see that the gap on thread 1 is 1 and on thread 2 it is 0.  We can now start the Graceful Switchover process.

 

Step 3:  Start Graceful Switchover 

This process is started on both kiwi91 (primary node 1)  and kiwi82 (standby node 1).

The Graceful Switchover can take time depending on the network link and the amount and size of the redo logs.


From Primary node 1 (kiwi91)

oracle@kiwi91[/usr/dbvisit/standby]: ./dbv_oraStartStop switchover DEV1 1
...
...

 

From Standby node 2 (kiwi81)

oracle@kiwi81[/usr/dbvisit/standby]: ./dbv_oraStartStop switchover DEV1 1
...
...

 

Once the Graceful Switchover (GS) is complete, you will have a standby database instance running on kiwi91 (there will be no instance running on kiwi92 - it will be shutdown.  Example:

oracle@kiwi91[/usr/dbvisit/standby]: srvctl status database -d DEV
Instance DEV1 is running on node kiwi91
Instance DEV2 is not running on node kiwi92
oracle@kiwi91[/usr/dbvisit/standby]:

 

The instance running on kiwi81 is now the primary database database instance.  The database instance can be updated to run again as a RAC instance as follow:

 

alter system set cluster_database_instances=2 scope=spfile;
alter system set cluster_database=true scope=spfile;

 

 

On the new primary kiwi81

oracle@kiwi81[/usr/dbvisit/standby]: . oraenv
ORACLE_SID = [DEV1] ? DEV1
The Oracle base remains unchanged with value /u01/app/oracle
oracle@kiwi81[/usr/dbvisit/standby]: sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 7 18:47:24 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> show parameter cluster

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
cluster_database		     boolean	 FALSE
cluster_database_instances	     integer	 1
cluster_interconnects		     string

SQL> select controlfile_type from v$database;

CONTROL
-------
CURRENT

SQL> alter system set cluster_database_instances=2 scope=spfile;

System altered.

SQL> alter system set cluster_database=true scope=spfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
 

oracle@kiwi81[/usr/dbvisit/standby]: srvctl start database -d DEV
oracle@kiwi81[/usr/dbvisit/standby]: srvctl status database -d DEV -v
Instance DEV1 is running on node kiwi81. Instance status: Open.
Instance DEV2 is running on node kiwi82. Instance status: Open.
 

 

Update Dbvisit Standby -

The second DDC file on the standby server dbv_DEV2.env can now be copied to the secondary primary node - kiwi82, example:

oracle@kiwi81[/usr/dbvisit/standby]: scp conf/dbv_DEV2.env kiwi82:/usr/dbvisit/standby/conf/
dbv_DEV2.env                                                                                                              100%   40KB  40.5KB/s   00:00
oracle@kiwi81[/usr/dbvisit/standby]:

 

Once the file are on the second primary node kiwi82, you must edit the DDC file by updating the following parameters:

SOURCE=kiwi92
DESTINATION=kiwi81

 

to

 

SOURCE = kiwi82
DESTINATION = kiwi91

 

You can now run Dbvisit as normal on both kiwi81 and kiwi82 to send logs to the standby node kiwi91.

 

Optional - set RAC_TAKEOVER_FORCE

Another option you can review is to send logs from only one RAC primary node, shipping the archive logs for both instances.

This can be done by setting the RAC_TAKEOVER_FORCE parameter in the dbv_DEV1.env DDC file to Y (YES).  Example:

[15 RAC Settings]
RAC = Y
RAC_TAKEOVER = Y
RAC_TAKEOVER_SID = DEV2
RAC_TAKEOVER_FORCE = Y

 

Running Dbvisit Standby now on the new primary node kiwi81, logs will be shipped for both threads:

oracle@kiwi81[/usr/dbvisit/standby]: ./dbvisit -R DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 21310)
dbvisit started on kiwi81: Thu Apr  7 19:04:00 2016 ()
=============================================================

>>> Note FORCE_LOGGING is disabled in the primary database.

    Waiting 3 seconds for log switch completion...

Resynch option given. Dbvisit Standby configuration will be copied to kiwi91...
  > Transferring 'dbv_DEV1.env' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [12894 KB/s] - done.
Contacting Standby Database DEV1 on kiwi91...
Next standby sequence required for recovery (80) for thread 1.

>>> Log file(s) for DEV1 will be transferred from kiwi81 to kiwi91...

  > Transferring 'thread_1_seq_80.261.908563819.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [34678 KB/s] - done.
  > Transferring 'thread_1_seq_81.264.908563823.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [64 KB/s] - done.
  > Transferring 'thread_1_seq_82.263.908564347.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [6579 KB/s] - done.
  > Transferring 'thread_1_seq_83.270.908564477.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [12607 KB/s] - done.
  > Transferring 'thread_1_seq_84.268.908564645.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [4641 KB/s] - done.

    5 archive log transfers to kiwi91 for DEV1 completed.
    Last sequence was 84 thread 1.
    No Mail sent as SEND_MAIL_FLAG = N
>>> Note FORCE_LOGGING is disabled in the primary database.

Contacting Standby Database DEV1 on kiwi91...
Next standby sequence required for recovery (27) for thread 2.

>>> Log file(s) for DEV2 will be transferred from kiwi82 to kiwi91...

  > Transferring 'thread_2_seq_27.271.908564347.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [5873 KB/s] - done.
  > Transferring 'thread_2_seq_28.269.908564477.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [7413 KB/s] - done.
  > Transferring 'thread_2_seq_29.267.908564645.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [2166 KB/s] - done.

    3 archive log transfers to kiwi91 for DEV2 completed.
    Last sequence was 29 thread 2.
    No Mail sent as SEND_MAIL_FLAG = N

>>> Dbvisit Archive Management Module (AMM)

Dbvisit Archive Management Module (AMM) not turned on

=============================================================
dbvisit ended on kiwi81: Thu Apr  7 19:04:34 2016
=============================================================

 

Logs are applied to the standby on kiwi91:


oracle@kiwi91[/usr/dbvisit/standby]: ./dbvisit DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 25084)
dbvisit started on kiwi91: Thu Apr  7 19:08:22 2016 ()
=============================================================

>>> Log file(s) for DEV1 from kiwi81 will be applied to kiwi91
201604071908 - Log seq 80 thread 1 applied to standby database DEV1.
201604071908 - Log seq 81 thread 1 applied to standby database DEV1.
201604071908 - Log seq 27 thread 2 applied to standby database DEV1.
201604071908 - Log seq 82 thread 1 applied to standby database DEV1.
201604071908 - Log seq 27 thread 2 applied to standby database DEV1.
201604071908 - Log seq 83 thread 1 applied to standby database DEV1.
201604071908 - Log seq 27 thread 2 applied to standby database DEV1.
201604071908 - Log seq 28 thread 2 applied to standby database DEV1.
201604071908 - Log seq 83 thread 1 applied to standby database DEV1.
201604071908 - Log seq 84 thread 1 applied to standby database DEV1.
201604071908 - Log seq 28 thread 2 applied to standby database DEV1.
201604071908 - Log seq 29 thread 2 applied to standby database DEV1.
201604071908 - Log seq 84 thread 1 applied to standby database DEV1.
    No Mail sent as SEND_MAIL_FLAG_DR = N

>>> Dbvisit Archive Management Module (AMM)

    Config: number of archives to keep      = 0
    Config: number of days to keep archives = 7
    Config: diskspace full threshold        = 80%

Processing /u01/app/oracle/dbvisit_archdest/DEV...
    Archive log dir: /u01/app/oracle/dbvisit_archdest/DEV
    Total number of archive files   : 7
    Number of archive logs deleted = 0
    Current Disk percent full       : 56%

=============================================================
dbvisit ended on kiwi91: Thu Apr  7 19:08:30 2016
=============================================================

 

Log Gap Report shows everything is up to date:

oracle@kiwi81[/usr/dbvisit/standby]: ./dbvisit -i DEV1
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 23654)
dbvisit started on kiwi81: Thu Apr  7 19:10:09 2016 ()
=============================================================

Dbvisit Standby log gap report for DEV1 at 201604071910 (thread 1):
-------------------------------------------------------------
Standby database on kiwi91 is at sequence: 84.
Primary database on kiwi81 is at log sequence: 85.
Primary database on kiwi81 is at archived log sequence: 84.
Dbvisit Standby last transfer log sequence: 84.
Dbvisit Standby last transfer at: 201604071904.

Archive log gap for DEV1:  0.
Transfer log gap for DEV1: 0.
Standby database time lag (HH:MI:SS): 00:06:06.
    No Mail sent as SEND_MAIL_FLAG = N

Dbvisit Standby log gap report for DEV2 at 201604071910 (thread 2):
-------------------------------------------------------------
Standby database on kiwi91 is at sequence: 28.
Primary database on kiwi82 is at log sequence: 30.
Primary database on kiwi82 is at archived log sequence: 29.
Dbvisit Standby last transfer log sequence: 29.
Dbvisit Standby last transfer at: 201604071904.

Archive log gap for DEV2:  1.
Transfer log gap for DEV2: 0.
Standby database time lag (HH:MI:SS): 00:06:09.
    No Mail sent as SEND_MAIL_FLAG = N

=============================================================
dbvisit ended on kiwi81: Thu Apr  7 19:10:13 2016
=============================================================

 

You can now perform a Graceful Switchover (GS) back to the original configuration by running the ./dbv_oraStartStop switchover DDC <key> command.

 

Example Graceful Switchover Back from Oracle RAC (kiwi81 and kiwi82) to (kiwi91).  Remember the switchover command must be executed on both the primary and standby node.  In this case the standby instance was only running on kiwi91 - so no need to shutdown the second instance on kiwi92 as it was not running.

Below is a sample output from the Graceful Switchover command when executed on kiwi81.

oracle@kiwi81[/usr/dbvisit/standby]: ./dbv_oraStartStop switchover DEV1 2
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 24731)
dbv_oraStartStop started on kiwi81: Thu Apr  7 19:13:12 2016 ()
=============================================================

=============================================================
Graceful Switchover starting on Primary Database DEV1.
Timestamp: 201604071913.

>>> RAC Database DEV will be shutdown and restarted as single instance <<<
Ensure Dbvisit is no longer scheduled.

Obtaining archive log gap....
Contacting Standby Database DEV1 on kiwi91...
Next standby sequence required for recovery (85) for thread 1.

Archive Log Gap for thread 1 is: 0. This is correct to continue.
Contacting Standby Database DEV1 on kiwi91...
Next standby sequence required for recovery (29) for thread 2.

Archive Log Gap for thread 2 is: 1. This is correct to continue.

Please enter unique key to begin graceful switchover for database DEV1.
The same key must be entered on both primary and standby server.

Please start command: dbv_oraStartStop switchover DEV1
on kiwi91 if not already started.

Batch key will be used: 2
Key 2 entered.

Contacting kiwi91 to ensure the same unique key is entered for DEV1.
Waiting for Key 1 on kiwi91...
Checkpoint 1 completed. Key found on kiwi91
Waiting for Checkpoint 2 on kiwi91...
Checkpoint 2 completed. Key found on kiwi91
Waiting for Checkpoint 3 on kiwi91...
Checkpoint 3 completed. Key found on kiwi91
Regular Database DEV1 shutdown successfully.
Starting Regular Database DEV1...
Regular Database DEV1 started restrict.
Performing Oracle Checkpoint.
    Waiting 3 seconds for log switch completion...

Creating standby control file as '/usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.standbycontrolfile'...
Waiting for Checkpoint 4 on kiwi91...
Checkpoint 4 completed. Key found on kiwi91
Copying new archives for DEV1 to kiwi91...
Compressing  thread_1_seq_85.266.908565303...
  > Transferring 'thread_1_seq_85.266.908565303.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [15294 KB/s] - done.
Compressing  thread_2_seq_29.267.908564645...
  > Transferring 'thread_2_seq_29.267.908564645.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [3734 KB/s] - done.
Compressing  thread_2_seq_30.265.908565267...
  > Transferring 'thread_2_seq_30.265.908565267.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [17527 KB/s] - done.
Shutting down regular Database DEV1...
Regular Database DEV1 shutdown successfully.
Copying subsequent new archives for DEV1 to kiwi91...
Copying redo logs ... this may take a while...
Compressing  X.dbvisit.2.DEV1.redo_1.log...
  > Transferring 'X.dbvisit.2.DEV1.redo_1.log.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [116545 KB/s] - done.
Compressing  X.dbvisit.2.DEV1.redo_2.log...
  > Transferring 'X.dbvisit.2.DEV1.redo_2.log.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [62454 KB/s] - done.
Compressing  X.dbvisit.2.DEV1.redo_3.log...
  > Transferring 'X.dbvisit.2.DEV1.redo_3.log.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [31124 KB/s] - done.
Compressing  X.dbvisit.2.DEV1.redo_4.log...
  > Transferring 'X.dbvisit.2.DEV1.redo_4.log.gz' to server kiwi91:7890
    Progress: 0%...20%...40%...60%...80%...100% [74331 KB/s] - done.
Waiting for Checkpoint 5 on kiwi91...
Checkpoint 5 completed. Key found on kiwi91
Backing up current control files for DEV1 kiwi81...
Database DEV1 on kiwi81 is already down. No action taken.
Starting Regular Database DEV1...
Regular Database DEV1 started nomount.
Control file backed up as /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.controlfile.
Shutting down standby Database DEV1...
Standby Database DEV1 shutdown successfully.
Waiting for Checkpoint 6 on kiwi91...
Checkpoint 6 completed. Key found on kiwi91
Waiting for Checkpoint 7 on kiwi91...
Checkpoint 7 completed. Key found on kiwi91
Waiting for Checkpoint 8 on kiwi91...
Checkpoint 8 completed. Key found on kiwi91
Waiting for Checkpoint 9 on kiwi91...
Checkpoint 9 completed. Key found on kiwi91
Waiting for Checkpoint 10 on kiwi91...
Checkpoint 10 completed. Key found on kiwi91
Waiting for Checkpoint 11 on kiwi91...
Checkpoint 11 completed. Key found on kiwi91
Waiting for Checkpoint 12 on kiwi91...
Checkpoint 12 completed. Key found on kiwi91
Database DEV1 on kiwi81 is already down. No action taken.
Starting Regular Database DEV1...
Regular Database DEV1 started nomount.
STANDBY control file(s) restored from /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.standbycontrolfile.
Shutting down standby Database DEV1...
Standby Database DEV1 shutdown successfully.
Starting Standby Database DEV1...
Standby Database DEV1 started .
Waiting for Checkpoint 13 on kiwi91...
Checkpoint 13 completed. Key found on kiwi91
Waiting for Checkpoint 14 on kiwi91...
Checkpoint 14 completed. Key found on kiwi91
File /usr/dbvisit/standby/conf/dbv_DEV1.env copied to /usr/dbvisit/standby/conf/dbv_DEV1.env.201604071913.
Dbvisit Database configuration (DDC) file /usr/dbvisit/standby/conf/dbv_DEV1.env has been updated and variables have been reversed between primary and
standby server.

SOURCE=kiwi91 DESTINATION=kiwi81.

Waiting for Checkpoint 15 on kiwi91...
Checkpoint 15 completed. Key found on kiwi91
Waiting for Checkpoint 16 on kiwi91...
Checkpoint 16 completed. Key found on kiwi91
Standby file +DATADR/dev/onlinelog/redo_1_1.log renamed to +DATADR in database DEV1.
Standby file +DATADR/dev/onlinelog/redo_1_2.log renamed to +DATADR in database DEV1.
Standby file +DATADR/dev/onlinelog/redo_2_1.log renamed to +DATADR in database DEV1.
Standby file +DATADR/dev/onlinelog/redo_2_2.log renamed to +DATADR in database DEV1.
Standby file +DATADR/dev/onlinelog/redo_3_1.log renamed to +DATADR in database DEV1.
Standby file +DATADR/dev/onlinelog/redo_3_2.log renamed to +DATADR in database DEV1.
Standby file +DATADR/dev/onlinelog/redo_4_1.log renamed to +DATADR in database DEV1.
Standby file +DATADR/dev/onlinelog/redo_4_2.log renamed to +DATADR in database DEV1.
Shutting down standby Database DEV1...
Standby Database DEV1 shutdown successfully.
Starting Standby Database DEV1...
Standby Database DEV1 started .
Waiting for Checkpoint 17 on kiwi91...
Checkpoint 17 completed. Key found on kiwi91
Waiting for Checkpoint 18 on kiwi91...
Checkpoint 18 completed. Key found on kiwi91

Graceful switchover completed.

This database (DEV1) is now a standby database.

To keep this new standby database in synch,
reschedule Dbvisit as per normal:
	dbvisit DEV1
=============================================================
dbv_oraStartStop ended on kiwi81: Thu Apr  7 19:19:30 2016
=============================================================

 

Example output from kiwi91:

oracle@kiwi91[/usr/dbvisit/standby]: ./dbv_oraStartStop switchover DEV1 2
=============================================================
Dbvisit Standby Database Technology (7.0.54.15715) (pid 26734)
dbv_oraStartStop started on kiwi91: Thu Apr  7 19:13:03 2016 ()
=============================================================

=============================================================
Graceful Switchover starting on Standby Database DEV1.
Timestamp: 201604071913.
Database DEV1 will be shutdown and restarted!
Ensure Dbvisit is no longer scheduled.

Please enter unique key to begin graceful switchover for database DEV1.
The same key must be entered on both primary and standby server.

Please start command: dbv_oraStartStop switchover DEV1
on kiwi81 if not already started.

Batch key will be used: 2
Key 2 entered.

Contacting kiwi81 to ensure the same unique key is entered for DEV1.
Waiting for Key 1 on kiwi81...
Checkpoint 1 completed. Key found on kiwi81
Waiting for Checkpoint 2 on kiwi81...
Checkpoint 2 completed. Key found on kiwi81
Init parameter CLUSTER_DATABASE parameter is set to TRUE.
To proceed with switchover CLUSTER_DATABASE will be set to FALSE.
Database uses spfile +DATA/dev/spfiledev.ora.
CLUSTER_DATABASE will be set to FALSE in spfile.
Waiting for Checkpoint 3 on kiwi81...
Checkpoint 3 completed. Key found on kiwi81
Tempfiles dropped.
Waiting for Checkpoint 4 on kiwi81...
Checkpoint 4 completed. Key found on kiwi81
Shutting down standby Database DEV1...
Standby Database DEV1 shutdown successfully.
Waiting for Checkpoint 5 on kiwi81...
Checkpoint 5 completed. Key found on kiwi81
Uncompressing 1_85_884290120.arc.gz...
Rename 2_29_884290120.arc to 2_29_884290120.arc.201604071913...
Uncompressing 2_29_884290120.arc.gz...
Uncompressing 2_30_884290120.arc.gz...
Uncompressing X.dbvisit.2.DEV1.redo_1.log.gz...
Uncompressing X.dbvisit.2.DEV1.redo_2.log.gz...
Uncompressing X.dbvisit.2.DEV1.redo_3.log.gz...
Uncompressing X.dbvisit.2.DEV1.redo_4.log.gz...
Waiting for Checkpoint 6 on kiwi81...
Checkpoint 6 completed. Key found on kiwi81
Waiting for Checkpoint 7 on kiwi81...
Checkpoint 7 completed. Key found on kiwi81
Backing up current control files for DEV1 kiwi91...
Database DEV1 on kiwi91 is already down. No action taken.
Starting Standby Database DEV1...
Standby Database DEV1 started nomount.
Control file backed up as /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.stdby_ctl_bck.
Shutting down standby Database DEV1...
Standby Database DEV1 shutdown successfully.
Waiting for Checkpoint 8 on kiwi81...
Checkpoint 8 completed. Key found on kiwi81
Starting Standby Database DEV1...
Standby Database DEV1 started nomount.
PRIMARY control file(s) restored from /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.controlfile.
Mount Database DEV1...
Database DEV1 mounted.
Copying redo log /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.redo_1.log to +DATA/DEV/onlinelog/redo_1_1.log
File +DATADR/dev/onlinelog/redo_1_1.log renamed to +DATA/DEV/onlinelog/redo_1_1.log.

Copying redo log /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.redo_1.log to +DATA/DEV/onlinelog/redo_1_2.log
File +DATADR/dev/onlinelog/redo_1_2.log renamed to +DATA/DEV/onlinelog/redo_1_2.log.

Copying redo log /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.redo_2.log to +DATA/DEV/onlinelog/redo_2_1.log
File +DATADR/dev/onlinelog/redo_2_1.log renamed to +DATA/DEV/onlinelog/redo_2_1.log.

Copying redo log /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.redo_2.log to +DATA/DEV/onlinelog/redo_2_2.log
File +DATADR/dev/onlinelog/redo_2_2.log renamed to +DATA/DEV/onlinelog/redo_2_2.log.

Copying redo log /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.redo_3.log to +DATA/DEV/onlinelog/redo_3_1.log
File +DATADR/dev/onlinelog/redo_3_1.log renamed to +DATA/DEV/onlinelog/redo_3_1.log.

Copying redo log /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.redo_3.log to +DATA/DEV/onlinelog/redo_3_2.log
File +DATADR/dev/onlinelog/redo_3_2.log renamed to +DATA/DEV/onlinelog/redo_3_2.log.

Copying redo log /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.redo_4.log to +DATA/DEV/onlinelog/redo_4_1.log
File +DATADR/dev/onlinelog/redo_4_1.log renamed to +DATA/DEV/onlinelog/redo_4_1.log.

Copying redo log /usr/dbvisit/standby/tmp/GS/DEV1/X.dbvisit.2.DEV1.redo_4.log to +DATA/DEV/onlinelog/redo_4_2.log
File +DATADR/dev/onlinelog/redo_4_2.log renamed to +DATA/DEV/onlinelog/redo_4_2.log.

Waiting for Checkpoint 9 on kiwi81...
Checkpoint 9 completed. Key found on kiwi81
Recovering new primary database...
Catalog archivelog '/u01/app/oracle/dbvisit_archdest/DEV/1_85_884290120.arc'...
Catalog archivelog '/u01/app/oracle/dbvisit_archdest/DEV/2_29_884290120.arc'...
Catalog archivelog '/u01/app/oracle/dbvisit_archdest/DEV/2_30_884290120.arc'...
Completed.
Waiting for Checkpoint 10 on kiwi81...
Checkpoint 10 completed. Key found on kiwi81
Archive log all for Database DEV1...
Completed.
Tempfiles dropped.
Waiting for Checkpoint 11 on kiwi81...
Checkpoint 11 completed. Key found on kiwi81
Open Database DEV1...
Database DEV1 opened.
Waiting for Checkpoint 12 on kiwi81...
Checkpoint 12 completed. Key found on kiwi81
Waiting for Checkpoint 13 on kiwi81...
Checkpoint 13 completed. Key found on kiwi81
Waiting for Checkpoint 14 on kiwi81...
Checkpoint 14 completed. Key found on kiwi81
File /usr/dbvisit/standby/conf/dbv_DEV1.env copied to /usr/dbvisit/standby/conf/dbv_DEV1.env.201604071913.
Dbvisit Database configuration (DDC) file /usr/dbvisit/standby/conf/dbv_DEV1.env has been updated and variables have been reversed between primary and standby server.

SOURCE=kiwi91 DESTINATION=kiwi81.

Waiting for Checkpoint 15 on kiwi81...
Checkpoint 15 completed. Key found on kiwi81
Tempfiles created.

FORCE LOGGING is left turned off in the primary database DEV1 on kiwi91.
Waiting for Checkpoint 16 on kiwi81...
Checkpoint 16 completed. Key found on kiwi81
Compressing  1_85_884290120.arc...
Compressing  2_29_884290120.arc...
Compressing  2_30_884290120.arc...
Waiting for Checkpoint 17 on kiwi81...
Checkpoint 17 completed. Key found on kiwi81
Waiting for Checkpoint 18 on kiwi81...
Checkpoint 18 completed. Key found on kiwi81

Graceful switchover completed.

This database (DEV1) is now the primary database.

You may consider re-creating a password file to make sure all sysdba passwords are preserved.
To keep the standby database on kiwi81 in synch with this primary database,
reschedule Dbvisit as per normal:
	dbvisit DEV1

Init parameter CLUSTER_DATABASE parameter is set to FALSE. To change single instance database to RAC database set:
SQL>alter system set cluster_database = true scope = spfile;
SQL>alter system set cluster_database_instances = x scope = spfile;
and restart all instances.
=============================================================
dbv_oraStartStop ended on kiwi91: Thu Apr  7 19:19:29 2016
=============================================================

 

To complete the process, you have to run the two commands as shown, followed by restarting the instances, example:

 

On the new primary kiwi91:

oracle@kiwi91[/home/oracle]: . oraenv
ORACLE_SID = [oracle] ? DEV1
The Oracle base remains unchanged with value /u01/app/oracle
oracle@kiwi91[/home/oracle]: sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 7 19:24:48 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> alter system set cluster_database=true scope=spfile;
System altered.

SQL> alter system set cluster_database_instances=2 scope=spfile;
System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options


oracle@kiwi91[/home/oracle]: srvctl start database -d DEV

oracle@kiwi91[/home/oracle]: srvctl status database -d DEV -v
Instance DEV1 is running on node kiwi91. Instance status: Open.
Instance DEV2 is running on node kiwi92. Instance status: Open.

 

On the standby database kiwi81:

oracle@kiwi81[/usr/dbvisit/standby]: sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 7 19:28:14 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> alter system set cluster_database=true scope=spfile;
System altered.

SQL> alter system set cluster_database_instances=2 scope=spfile;
System altered.

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

oracle@kiwi81[/usr/dbvisit/standby]: srvctl start database -d DEV -o mount

oracle@kiwi81[/usr/dbvisit/standby]: srvctl status database -d DEV -v
Instance DEV1 is running on node kiwi81. Instance status: Mounted (Closed).
Instance DEV2 is running on node kiwi82. Instance status: Mounted (Closed).

 

 

You can now run dbvisit standby as normal to send/apply logs.