Automation - Installation, CSD, Sync and Repository

This section will provide you with more information regarding the automation options (Batch) processes that is available in Dbvisit Standby.

Please note that this is for Unix based Dbvisit Standby configurations only.


Automate Dbvisit Standby software installation

Note: Please make sure that succeeding steps 1-3 are followed correctly before running the installer in batch mode.

These are exactly the same steps detailed here - https://dbvisit.atlassian.net/wiki/display/UGDS7/Install+Dbvisit+Standby+-+Linux when installing via interactive mode.


Step 1 - Create DBVISIT_BASE directory

Create the “Dbvisit Base” directory. This is the directory into which Dbvisit Standby will be installed. The default location is /usr/dbvisit. This directory should be owned by the Oracle Database software owner.

 

Example: 

root@dbvlab101[/usr]: cd /usr
root@dbvlab101[/usr]: mkdir dbvisit
root@dbvlab101[/usr]: chown -R oracle:oinstall dbvisit
root@dbvlab101[/usr]: ls -ld dbvisit
drwxr-xr-x 7 oracle oinstall 4096 Nov 10 14:09 dbvisit

 

Step 2 - Download Latest Dbvisit Standby (version 7.0.x)

Download the latest software. The first step is to download the latest available version from the Dbvisit web site http://www.dbvisit.com. Once the software is downloaded, you can copy it to a temporary location on your server.

 

Example: 

oracle@dbvlab101[/home/oracle/7.46]: ls -l
total 98648
-rw-r--r-- 1 oracle oinstall 48656799 Oct  5 13:44 dbvisit-standby7.0.46-el6.zip

 

Step 3 - Extract Installation Files

Extract the software downloaded in the previous step as well as updating the install-dbvisit file permission to allow the execution option. First use "unzip" to uncompress the downloaded software package, followed by using the "tar -xf" command to extract the archive.  

 

Example:

oracle@dbvlab101[/home/oracle/7.46]: unzip dbvisit-standby7.0.46-el6.zip
Archive:  dbvisit-standby7.0.46-el6.zip
  inflating: dbvisit-standby7.0.46-el6.tar
oracle@dbvlab101[/home/oracle/7.46]:
oracle@dbvlab101[/home/oracle/7.46]: tar -xf dbvisit-standby7.0.46-el6.tar
oracle@dbvlab101[/home/oracle/7.46]:
oracle@dbvlab101[/home/oracle/7.46]: ls -lrt
total 98648
-rw-r--r-- 1 oracle oinstall   110756 Oct  5 12:46 README.txt
drwxr-xr-x 6 oracle oinstall     4096 Oct  5 12:46 dbvisit
-rw-r--r-- 1 oracle oinstall 52234240 Oct  5 12:46 dbvisit-standby7.0.46-el6.tar
-rw-r--r-- 1 oracle oinstall 48656799 Oct  5 13:44 dbvisit-standby7.0.46-el6.zip

 

Step 4 - Run Installation in Batch Mode

 Run the installer in batch mode. This eliminates the software from prompting the user for values during installation.

 

Command:

./install-dbvisit --batch-install \
 --install-dir /usr/dbvisit \
 --dbvserver-protocol https \ 
 --dbvserver-port 8443 \
 --dbvserver-username admin \
 --dbvserver-password admin \
 --dbvserver-start y \
 --dbvnet-port 7890 \
 --dbvnet-password admin \
 --dbvnet-start y

 

 

In the example below, the command is executed inside the installer directory where install-dbvisit executable is located.

 

oracle@dbvlab101[/home/oracle/7.46/dbvisit/installer]: ls -lrt
total 6480
-rwxr-xr-x 1 oracle oinstall 6633180 Oct  5 12:46 install-dbvisit
 
oracle@dbvlab101[/home/oracle/7.46/dbvisit/installer]: ./install-dbvisit --batch-install \
oracle@dbvlab101 --> --install-dir /usr/dbvisit \
oracle@dbvlab101 --> --dbvserver-protocol https \
oracle@dbvlab101 --> --dbvserver-port 8443 \
oracle@dbvlab101 --> --dbvserver-username admin \
oracle@dbvlab101 --> --dbvserver-password admin \
oracle@dbvlab101 --> --dbvserver-start y \
oracle@dbvlab101 --> --dbvnet-port 7890 \
oracle@dbvlab101 --> --dbvnet-password admin \
oracle@dbvlab101 --> --dbvnet-start yes \
oracle@dbvlab101 --> --bug-track no
 
-------------------------------------------------------------------------------
    Thank you. Configuration is complete. Installation will commence now.
-------------------------------------------------------------------------------
 
>>> Installing Standby - the Dbvisit disaster recovery software...
 
    Installing product files...
    Updating and migrating existing DDC files in /usr/dbvisit...
    > Removing old DDC files with appended timestamps
    Updating and migrating existing DDC files in /usr/dbvisit/standby...
    > Removing old DDC files with appended timestamps
    Removing old product files...
 
    Dbvisit Standby installation complete.
 
>>> Installing Dbvnet - the Dbvisit network layer...
 
    Shutting down running Dbvnet daemon (PID 10277), please wait...
 
*** Dbvnet could not be shut down. Please stop this daemon manually. Thank
*** you.
 
>>> Adjusting init script templates for product dbvnet...
 
    Please find some init script templates in the following directory:
 
    /usr/dbvisit/dbvnet/conf/init.d
 
    These templates will allow your Systems Administrator to automatically
    start Dbvserver after a database server reboot.
 
    Templates are available for Sun Solaris, IBM AIX, and the Linux flavours
    OpenSuSE, RedHat/Centos/Fedora & Debian/Ubuntu.
 
>>> Starting Dbvnet daemon, please wait...
 
    Dbvnet is up and running on the following ip address and port:
 
    niop://10.0.2.41:7890
 
>>> Installing Dbvserver - the Dbvisit web interface...
 
    Shutting down running Dbvserver daemon (PID 2699), please wait...
 
*** Dbvserver could not be shut down. Please stop this daemon manually.
*** Thank you.
 
>>> Adjusting init script templates for product dbvserver...
 
    Please find some init script templates in the following directory:
 
    /usr/dbvisit/dbvserver/conf/init.d
 
    These templates will allow your Systems Administrator to automatically
    start Dbvserver after a database server reboot.
 
    Templates are available for Sun Solaris, IBM AIX, and the Linux flavours
    OpenSuSE, RedHat/Centos/Fedora & Debian/Ubuntu.
 
>>> Starting Dbvserver daemon, please wait...
 
    Dbvserver is up and running. Please point your browser to the
    following URL to log in to the Dbvisit web interface:
 
    https://10.0.2.41:8443
    Login user name is 'admin' (password 'admin')
 
>>> Dbvisit product and component installation is now complete.
 
>>> NEXT STEPS: CONFIGURE DBVISIT STANDBY VIA COMMAND LINE INTERFACE (CLI):
 
    cd /usr/dbvisit/standby
    ./dbvisit_setup
 
    Note: Dbvisit can also be configured and run through a (GUI) web browser.
          Dbvserver (dbvserverd) must be installed and started for this.
 
>>> IMPORTANT - PLEASE NOTE THE FOLLOWING REQUIREMENTS BEFORE CONTINUING:
 
    > The Dbvisit Standby, Dbvnet, and Dbvserver software must be installed
      on both the primary and standby servers.
    > For network communication between the primary and standby server
      via Dbvnet port number 7890 must not be blocked by your firewalls.
    > Dbvnet must be up and running on both the primary and standby servers
      at all times.
    > If you wish to use Dbvserver, the Dbvisit web interface, then please
      ensure port 8443 is open on your servers' firewalls, as well.
 
>>> Thank you for using Dbvisit software!

 

 

Create the Dbvisit Configuration File - DDC (Manual steps required)

Note:  Before you can proceed to the next steps, please ensure that a DDC file has been created on the primary.

The DDC file must be created inside the $DBVISIT_BASE/standby/conf directory (e.g. /usr/dbvisit/standby/conf).

 

To create the DDC file manually, you may follow these steps:

  • Take a copy of an existing DDC file from the $DBVISIT_BASE/standby/conf and rename it accordingly (dbv_<DDC>.env). 

    This might mean that you run through the setup once, to create a "golden" template for your site.  You can then use this template and only update the required parameters as needed for batch installations.

  • Find and replace key values in this "Template" DDC file.  Listed below are the important parameters to take into consideration during the DDC file creation. Please ensure that these parameters are set correctly.
    • ORACLE_SID =
    • ORACLE_SID_DEST =
    • SOURCE =
    • DESTINATION =
    • DBVISIT_BASE =
    • DBVISIT_BASE_DR =
    • ARCHDEST =
    • ORACLE_HOME =
    • OWNER =
    • DBUSER =
    • DBPASSWD =
    • RAC* =
    • RAC_TAKEOVER* =
    • RAC_TAKEOVER_SID* =

 

Note: * are RAC-specific parameters. Leave blank for single instance setup.

Important:  Please make sure that the ARCHDEST directory is created on both the primary and standby servers with appropriate permissions.

 

 

Automate the creation of the Dbvisit Standby Repository

As part of the Dbvisit Standby setup, The Dbvisit Standby Repository (DDR) creation is required on the primary database only, as this will create an Oracle account (e.g. dbvisit7) and all the repository tables and objects which will be owned by it.

These tables will be used to maintain internal records used by Dbvisit Standby, including information regarding the transfer process of archive logs to the standby database. Please note that Create Standby Database (CSD) process will fail if DDR has not been created successfully.

 

DDR creation command

The command below shows an example, where the USERS tablespace is specified as the default tablespace and the TEMP tablespace as the default temporary tablespace for the user.

For more detail please see - Managing DDR using Batch Mode

./dbvisit_setup --ddr --action install --ddc <DDC> --def_tbs USERS  --tmp_tbs TEMP

 

Example:

oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit_setup --ddr --action install --ddc dev --def_tbs USERS  --tmp_tbs TEMP
=============================================================
dbvisit_setup started in BATCH mode at 20151116 23:00
csd            =
ddc            = dev
restart        =
template       =
output_dir     =
web            =
ddr            = 1
INTERFACE_MODE = BATCH
=============================================================
./dbvisit_setup --ddr --action install --ddc dev --def_tbs USERS --tmp_tbs TEMP
User dbvisit7 created.
Grants to user dbvisit7 completed.
Dbvisit Database repository (DDR) for dbvisit7 created.
 
=============================================================
dbvisit_setup completed in BATCH mode at 20151116 23:00
=============================================================

 

 

Create Standby Database (CSD) Automation 

Before you can use the Batch option for the Create Standby Database (CSD) process, you must first create a CSD Template.  This is done by running the setup and going through all the CSD configuration steps and then saving the specified options as a Template.

An existing CSD template is required when executing the CSD batch mode command.

 

Please make sure to create and save the template by running the setup interactively and choose Option 7. Once the template is saved, exit from the setup.

 

Example creation of a CSD Template

 

In the example below, the Dbvisit Setup is executed and the Create Standby Database (option 7) is selected.  This process will then be followed to create the CSD Template.

 

oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit_setup
 
 
=========================================================
 
     Dbvisit Standby Database Technology (7.0.46.14489)
           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.46.14489)
           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)   dev
2)   Return to menu
 
Please enter choice : 1
 
Is this correct? <Yes/No> [Yes]:
Database dev is up.
 
Is this correct? <Yes/No> [Yes]:
Database dev is up.
 
>>> Checking Dbvisit Standby for configurational differences between dbvlab101 and
    dbvlab102...
 
Waiting for 5 seconds (RETRIES_WAIT_IN_SEC) until retry.
    Dbvisit Standby configurational differences found between dbvlab101 and dbvlab102...
 
  > Transferring 'dbv_dev.env' to server dbvlab102:7890
    Progress: 0%...20%...40%...60%...80%...100% [5404 KB/s] - done.
 
>>> Checking Oracle installation on dbvlab102 in
    /u01/app/oracle/product/11.2.0/db_1/bin/oracle...
 
>>> Checking primary datafiles on dbvlab101...
 
>>> Validating Dbvisit configuration file on dbvlab102...
 
>>> Checking if a database is up and running on dbvlab102...
 
    Checks completed OK.
>>> Total database size for dev is 1.31GB
 
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]:
 
-------------------------------------------------------------------------------
 
Do you want to create an ASM standby database (with all or some database files
in ASM storage)? [No]:
Standby database will be ASM: N
Is this correct? <Yes/No> [Yes]:
 
-------------------------------------------------------------------------------
 
Use network compression to compress the database files during transfer? [No]:
Database files will be compressed during transfer: N
Is this correct? <Yes/No> [Yes]:
 
-------------------------------------------------------------------------------
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]:
Dbvisit Standby will create missing filesystem directories automatically: Y
Is this correct? <Yes/No> [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
filesystem 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                     /u01/app/oracle/oradata
db_domain
db_name                                 dev
db_recovery_file_dest                   /u01/app/oracle/fast_recovery_area
db_recovery_file_dest_size              4385144832
diagnostic_dest                         /u01/app/oracle
dispatchers                             (PROTOCOL=TCP) (SERVICE=devXDB)
memory_target                           264241152
open_cursors                            300
processes                               150
remote_login_passwordfile               EXCLUSIVE
spfile                                  OS default
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]:
 
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]:
Transportable media will be used: N
Is this correct? <Yes/No> [Yes]:
 
-------------------------------------------------------------------------------
A temporary location must be specified on dbvlab101 where the database will be
backed up to first.
This location must be big enough to hold RMAN backup of the whole database
(1.31GB).
 
Specify the location on this server: [/usr/tmp]:
Directory for temporary location will be: /usr/tmp
Is this correct? <Yes/No> [Yes]:
 
-------------------------------------------------------------------------------
A temporary location must be specified on dbvlab102 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]:
 
-------------------------------------------------------------------------------
The creation of the standby database consists of 2 parts:
1) Backup database to temporary location.
2) Transfer backup from temporary location to standby server.
The process can be stopped after step 1 and then continued with step 2 at a
later date.
Do you want to the process to stop between these 2 steps? [No]:
Process will stop between steps: N
Is this correct? <Yes/No> [Yes]:
 
Primary database contains non-OMF datafiles and/or tempfiles.
Creation of non-OMF standby datafiles and/or tempfiles requires valid
filesystem locations on the standby server.
Review and confirm standby locations to create standby non-OMF datafiles and
tempfiles.
 
 
-------------------------------------------------------------------------------
Primary                              ===> Standby
-------------------------------------------------------------------------------
/u01/app/oracle/oradata/DEV/tempfile ===> /u01/app/oracle/oradata/DEV/tempfile
 
-------------------------------------------------------------------------------
What would you like to do:
   1 - Confirm standby location(s) are correct and continue
   2 - Provide different standby location(s)
   Please enter your choice [1]:
Standby locations validated.
 
 
Primary database contains non-OMF redo logs.
Creation of non-OMF redo logs Dbvisit Standby requires valid filesystem
locations on the standby server.
Review and confirm standby locations to create standby non-OMF redo logs.
 
 
-------------------------------------------------------------------------------
Primary                               ===> Standby
-------------------------------------------------------------------------------
/u01/app/oracle/oradata/DEV/onlinelog ===> /u01/app/oracle/oradata/DEV/onlinelog
 
-------------------------------------------------------------------------------
What would you like to do:
   1 - Confirm standby location(s) are correct and continue
   2 - Provide different standby location(s)
   Please enter your choice [1]:
Standby locations validated.
 
 
-------------------------------------------------------------------------------
=>Create standby database template for dev using provided answers? <Yes/No>
[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]: 2
 
Is this correct? <Yes/No> [No]: Yes
=========================================================
     Dbvisit Standby Database Technology (7.0.46.14489)
           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@dbvlab101[/usr/dbvisit/standby]:


 

Now that you already have an existing template, you can proceed with running the CSD batch command.

 

Create Standby Database (CSD) in batch mode - using a template

Note: As per example above the template was created and stored in the DDR.  This must be done before you can execute the command below.

 

The CSD Batch Command

./dbvisit_setup --csd --ddc <ddc> --template

 

Example (Single Instance)

 

oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit_setup --csd --ddc dev --template
=============================================================
dbvisit_setup started in BATCH mode at 20151116 22:18
csd            = 1
ddc            = dev
restart        =
template       = 1
output_dir     =
web            =
ddr            =
INTERFACE_MODE = BATCH
=============================================================
./dbvisit_setup --csd --ddc dev --template
Creating standby database see trace file /usr/dbvisit/standby/trace/22804_dbvisit_setup_csd_dev_201511162218.trc
>>> Checking Dbvisit Standby for configurational differences between dbvlab101 and
    dbvlab102...


    No configurational differences found between dbvlab101 and dbvlab102.


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


>>> Checking primary datafiles on dbvlab101...


>>> Validating Dbvisit configuration file on dbvlab102...


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


    Checks completed OK.
>>> Total database size for dev is 1.31GB


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


>>> Creating standby control file... - done.


Backup of primary database completed.


>>> Transferring backup from dbvlab101 to dbvlab102...


  > Transferring 'dbv_dev_csd_dbf_1_12qmeir0_1_1.rman' to server dbvlab102:7890
    Progress: 0%...20%...40%...60%...80%...100% [43507 KB/s] - done.
- done.
  > Transferring 'dbv_dev_csd_dbf_1_13qmeit1_1_1.rman' to server dbvlab102:7890
    Progress: 0%...20%...40%...60%...80%...100% [24272 KB/s] - done.
- done.
  > Transferring 'dbv_dev_csd_dbf_2_14qmeit7_1_1.rman' to server dbvlab102:7890
    Progress: 0%...20%...40%...60%...80%...100% [39616 KB/s] - done.
- done.
  > Transferring 'dbv_dev_csd_dbf_3_15qmeiud_1_1.rman' to server dbvlab102:7890
    Progress: 0%...20%...40%...60%...80%...100% [45445 KB/s] - done.
- done.
  > Transferring 'dbv_dev_csd_dbf_4_16qmeiug_1_1.rman' to server dbvlab102:7890
    Progress: 0%...20%...40%...60%...80%...100% [46481 KB/s] - done.
- done.


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


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


>>> Starting standby database dev on dbvlab102 mount... - done.


>>> Restoring datafiles on dbvlab102...


    Restoring datafile 1 - done.
    Restoring datafile 2 - done.
    Restoring datafile 3 - done.
    Restoring datafile 4 - done.


>>> Renaming standby redo logs and tempfiles on dbvlab102... - done.


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


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


Standby database created.


To complete creating standby database please run Dbvisit on the primary server first,
then on the standby server, to ensure the standby database is in sync with the primary
database.
=============================================================
dbvisit_setup completed in BATCH mode at 20151116 22:24
=============================================================  

   

At this point, you may run the default commands to send and apply logs.

Next Step: On the primary, execute: ./dbvisit <DDC> to send logs to standby.

 

Example:

 

=============================================================
oracle@dbvlab101[/usr/dbvisit/standby]: ./dbvisit dev
=============================================================
Dbvisit Standby Database Technology (7.0.46.14569) (pid 24500)
dbvisit started on dbvlab101: Mon Nov 16 22:53:03 2015 ()
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)...
>>> Note FORCE_LOGGING is disabled in the primary database.

    Waiting 3 seconds for log switch completion...

>>> Checking Dbvisit Standby for configurational differences between dbvlab101 and
    dbvlab102...

    No configurational differences found between dbvlab101 and dbvlab102.

>>> Log file(s) for dev will be transferred from dbvlab101 to dbvlab102...

  > Transferring 'o1_mf_1_201_c4m9wbdq_.arc.gz' to server dbvlab102:7890
    Progress: 0%...20%...40%...60%...80%...100% [4520 KB/s] - done.

    1 archive log transfer to dbvlab102 for dev completed.
    Last sequence was 201.

>>> 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 (/u01/app/oracle/fast_recovery_area) = 29%

    Number of archive logs deleted = 0
=============================================================
dbvisit ended on dbvlab101: Mon Nov 16 22:53:24 2015
=============================================================

 

 

On the standby, execute: ./dbvisit <DDC> to apply logs that have been transferred.

 

Example:

 

oracle@dbvlab102[/usr/dbvisit/standby]: ./dbvisit dev
=============================================================
Dbvisit Standby Database Technology (7.0.46.14569) (pid 11217)
dbvisit started on dbvlab102: Mon Nov 16 11:19:13 2015 ()
=============================================================

>>> Sending heartbeat message... - done.
>>> Log file(s) for dev from dbvlab101 will be applied to dbvlab102
201511161119 - Log seq 195 thread 1 applied to standby database dev.
201511161119 - Log seq 196 thread 1 applied to standby database dev.
201511161119 - Log seq 197 thread 1 applied to standby database dev.
201511161119 - Log seq 198 thread 1 applied to standby database dev.
201511161119 - Log seq 199 thread 1 applied to standby database dev.
201511161119 - Log seq 200 thread 1 applied to standby database dev.
201511161119 - Log seq 201 thread 1 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 /home/oracle/dbvisit_archdest/dev...
    Archive log dir: /home/oracle/dbvisit_archdest/dev
    Total number of archive files   : 163
    Number of archive logs deleted = 46
    Current Disk percent full       : 45%

=============================================================
dbvisit ended on dbvlab102: Mon Nov 16 11:19:25 2015
=============================================================



Automating - Synchronise (Sync) Standby Database

In the event of an unrecoverable archive log gap, for instance, an archive log is missing before it could be applied to standby, you may use Synchronise Standby Database option to resolve the issue.

What this process will do is roll the standby database forward, past the missing archive log gap point, allowing you to apply logs again without the rebuild of the standby database.

This option can also be used to repair logical corruption on the standby database due to nologging operations that was performed on the primary database.

This option can also be used if there is a large gap between the primary and standby databases.

 

Sync Standby Database Batch Command

 

dbvisit_setup --sync --ddc <DDC> --tmp_dir <tmp_dir> --tmp_dir_dest <tmp_dir_dest> [--sync_lag] [--sync_nologging] [--web] [--output_dir]

 

Example (Single Instance):

oracle@dbvlab101[/usr/dbvisit/standby]:   ./dbvisit_setup --sync --ddc dev --tmp_dir /usr/tmp/ --tmp_dir_dest /usr/tmp/ --sync_lag --sync_nologging


=============================================================
dbvisit_setup started in BATCH mode at 20151117 00:13
csd            =
ddc            = dev
restart        =
template       =
output_dir     =
web            =
ddr            =
INTERFACE_MODE = BATCH
=============================================================


./dbvisit_setup --sync --ddc dev --tmp_dir /usr/tmp/ --tmp_dir_dest /usr/tmp/ --sync_lag --sync_nologging
Synchronising standby database see trace file /usr/dbvisit/standby/trace/26412_dbvisit_setup_sync_dev_201511170013.trc

-------------------------------------------------------------------------------
Use RMAN incremental backups to synchronise a physical standby database
with the primary database. RMAN incremental backup of the primary
database will be created, starting at the current SCN of the standby,
which in turn will then be used to roll the standby database forward in
time.

RMAN incremental backups can be useful in case the physical standby
database:

     Is lagging far behind the primary database.
     Has widespread nologging changes.
     Has nologging changes on a subset of datafiles.

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


-------------------------------------------------------------------------------
SUMMARY
-------------------------------------------------------------------------------
PRIMARY
Current SCN:                       1796110             Time: 2015-11-17:00:11:05
Current sequence(s):
  Thread  1     Sequence 204
Last archived sequence(s):
  Thread  1     Sequence 203

STANDBY
Current SCN:                       1795399             Time: 2015-11-17:00:07:08
Next SCN required for recovery:    1795104             Time: 2015-11-17:00:05:32
Sequence(s) required for recovery:
  Thread  1     Sequence 203

No nonlogged transactions detected in standby datafiles.


-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Synchronising Standby Database
-------------------------------------------------------------------------------


Step 1 - Deleting previous incremental backup... - done.
Step 2 - Creating incremental backup of primary database... - done.
Step 3 - Creating standby control file... - done.
Step 4 - Transferring backup to standby server... - done.
Step 5 - Restoring standby control file... - done.
Step 6 - Cataloguing incremental backup in RMAN catalogue... - done.
Step 7 - Applying incremental backup to the standby database... - done.
Step 8 - Performing log switch on primary... - done.
Step 9 - Obtaining sync summary... - done.
Step 10 - Updating Dbvisit repository... - done.

-------------------------------------------------------------------------------
SUMMARY
-------------------------------------------------------------------------------
PRIMARY
Current SCN:                       1796280             Time: 2015-11-17:00:14:59
Current sequence(s):
  Thread  1     Sequence 205
Last archived sequence(s):
  Thread  1     Sequence 204

STANDBY
Current SCN:                       1796222             Time: 2015-11-17:00:14:03
Next SCN required for recovery:    1796180             Time: 2015-11-17:00:13:44
Sequence(s) required for recovery:
  Thread  1     Sequence 204

No nonlogged transactions detected in standby datafiles.

-------------------------------------------------------------------------------
To complete standby database sync run dbvisit on the primary, then on the standby server.

=============================================================
dbvisit_setup completed in BATCH mode at 20151117 00:15
=============================================================

 

Once the above is complete, you must run Dbvisit Standby on the primary server to ship the latest archive logs to the standby, followed by running Dbvisit Standby on the standby server to update the standby database.

If you do not perform these two steps and you attempt to open the standby database in read-only mode or activate it you will get an error.