Create Standby Database using Transportable Media option - CLI

This section will show you an example on how to Create Standby database using Transportable Media option using Dbvisit Command Line Interface:

In this example the setup is as follow

  • Dbvisit Standby version used: 6.0.60
  • Operating System - Oracle Linux 5.10
  • Oracle Database version 11.2.0.4
  • Oracle Grid Infrastructure 11.2.0.4
  • Database Name: testdb
  • Primary Server: dbvlin803
  • Standby Server: dbvlin804
  • Dbvisit Standby ARCHDEST: /u01/app/oracle/dbvisit_archive
  • Transportable Media Location: /standby_nfs/backup

 

Important

  • Creating a standby database is performed on the primary server.
  • You must have a DDC file already created before you proceed with CSD.
  • Dbvisit Standby is making use of a directory referred to as the ARCHDEST. This location is specific to Dbvisit Standby and is not - and should not, be seen as the same as the Oracle Database Archive destinations.

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

 

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

 

On Primary Server:

oracle@dbvlin803[/usr/local/dbvisit/standby]: ./dbvisit_setup

=========================================================
     Dbvisit Standby Database Technology (6.0.60.11060)
           http://www.dbvisit.com
=========================================================
=>dbvisit_setup only needs to be run on the primary server.
Is this the primary server? <Yes/No> [Yes]: Yes
=========================================================
     Dbvisit Standby Database Technology (6.0.60.11060)
           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)   testdb
2)   Return to menu
Please enter choice : 1
Is this correct? <Yes/No> [Yes]: Yes
Database testdb is up.

Checking Dbvisit Standby configurational differences between dbvlin803 and dbvlin804...
No Dbvisit Standby configurational differences found between dbvlin803 and dbvlin804.

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

Total database size for testdb is 2.00GB

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

-------------------------------------------------------------------------------
Do you want to create an ASM standby database (with all or some database files
in ASM storage)? [No]: No
Standby database will be ASM: N

Is this correct? <Yes/No> [Yes]: Yes
-------------------------------------------------------------------------------
You can create a standby database by transferring the database files directly
to the standby server,or by copying them to a temporary local location first. 
By using a temporary location the time taken to place the database in backup 
mode is reduced.
If the database is very large then use a temporary location (answer No).
If either a primary or a standby database is ASM, you have to use a temporary
location (answer No).

Do you want to copy database files directly to the standby server? [Yes]: No
Database files will be copied to standby server using temporary location on
dbvlin803.

Is this correct? <Yes/No> [Yes]: Yes
-------------------------------------------------------------------------------
Use ssh compression to compress the database files during transfer? [Yes]: Yes
Database files will be compressed during transfer: Y

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
 
-------------------------------------------------------------------------------
The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
audit_file_dest                         /u01/app/oracle/admin/testdb/adump
compatible                              11.2.0.4.0
control_files                           /u01/app/oracle/oradata/testdb/control01.ctl, /u01/app/oracle/fast_recovery_area/testdb/control02.ctl
db_block_size                           8192
db_name                                 testdb
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=testdbXDB)
memory_max_target                       683671552
memory_target                           683671552
open_cursors                            300
processes                               150
remote_login_passwordfile               EXCLUSIVE
spfile                                  OS default
standby_file_management                 MANUAL
undo_tablespace                         UNDOTBS1
-------------------------------------------------------------------------------
What would you like to do:
   1 - Proceed with creating the standby database
   2 - Edit oracle database parameters for the standby database pfile/spfile
   3 - Terminate processing
   Please enter your choice [1]: 1

Validating oracle database parameters... please wait
SUCCEEDED
-------------------------------------------------------------------------------
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]: Yes
Transportable media will be used: Y

Is this correct? <Yes/No> [Yes]: Yes
-------------------------------------------------------------------------------
A transportable media location must be specified on dbvlin803 where the
database will be backed up to first.
This location must be big enough to hold RMAN backup of the whole database
(2.00GB).

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

Directory for transportable media location will be: /standby_nfs/backup

Is this correct? <Yes/No> [Yes]: Yes
-------------------------------------------------------------------------------
Please specify the transportable media location on dbvlin804. This is where the
backup of the database will be found after plugging the transportable media
into the remote server.

Specify location on remote server: [/standby_nfs/backup]: /standby_nfs/backup

Directory for transportable media will be: /standby_nfs/backup

Is this correct? <Yes/No> [Yes]: Yes
  • Make Sure that you provide "Transportable media will be used: Y" , since we will be using Transportable Media.
  • Also provide the media locations for both Source and Target Server.
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/testdb        ===> /u01/app/oracle/oradata/testdb
-------------------------------------------------------------------------------
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.
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/fast_recovery_area/TESTDB/onlinelog ===> /u01/app/oracle/fast_recovery_area/TESTDB/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]: 1

Standby locations validated.
-------------------------------------------------------------------------------

=>Create standby database template for testdb 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]: 1

Creating standby database...

RMAN backup tag 'dbv_testdb_csd' deleted.
Backing up datafile 1...
Backing up datafile 2...
Backing up datafile 3...
Backing up datafile 4...
Backing up datafile 5...
Backing up datafile 6...

Creating standby controlfile controlfile as '/standby_nfs/backup/dbv_testdb_csd_stdby.ctl'...

Creating standby parameter file...

Backup of primary database completed.

Requested stop point has been reached. Database has been backed up to
/standby_nfs/backup.
 
Please complete the folllowing steps:
1 - Unplug Transportable Media (/standby_nfs/backup) from this server
(dbvlin803).
2 - Manually move Transportable Media to standby server (dbvlin804).
3 - Plug in Transportable Media to standby server (dbvlin804).
4 - Ensure Transportable Media can be found in /standby_nfs/backup (on
dbvlin804).
5 - Restart the process on this server (dbvlin803).
To resume the creation of the standby database choose Restart under the Create
Standby Database option.

Dbvisit Standby will provide the option to re-start this process from the stop
point.
Please press <Enter> to continue...

Now Unplug the Transportable Media from Source Server and plug to Target Server. Once this is done, Please restart the CSD process on Primary.

On Primary:
 
oracle@dbvlin803[/usr/local/dbvisit/standby]: ./dbvisit_setup

=========================================================
     Dbvisit Standby Database Technology (6.0.60.11060)
           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 (6.0.60.11060)
           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)   testdb
2)   Return to menu
Please enter choice : 1
Is this correct? <Yes/No> [Yes]:

Database testdb is up.
Checking Dbvisit Standby configurational differences between dbvlin803 and dbvlin804...
No Dbvisit Standby configurational differences found between dbvlin803 and dbvlin804.
Checking Oracle installation on dbvlin804 in
/u01/app/oracle/product/11.2.0/db_1/bin/oracle...

Total database size for testdb is 2.00GB
What would you like to do:
   1 - Create standby database (and optionally save settings in template)
   2 - Restart the uncompleted creation of standby database
   3 - Create standby database using existing template (previously saved)
   4 - Help
   5 - Terminate processing
   Please enter your choice [2]: 2

What would you like to do:
   1 - Restart the uncompleted creation of standby database
   2 - View status of the uncompleted creation of standby database
   3 - Return to the previous menu
   Please enter your choice [1]: 1


Creating standby database...
Shutting down standby database on dbvlin804...
Standby database testdb on dbvlin804 shutdown.


Remote spfile /u01/app/oracle/product/11.2.0/db_1/dbs/spfiletestdb.ora backed
as /u01/app/oracle/product/11.2.0/db_1/dbs/spfiletestdb.ora.201407091402.
Remote spfile /u01/app/oracle/product/11.2.0/db_1/dbs/spfiletestdb.ora deleted.

Spfile  created on remote server.

Restoring standby control files...
Standby control files restored.
Starting Standby Database testdb...
Standby Database testdb started .
Standby database testdb on dbvlin804 mounted.

Restore datafile 1...
Restore datafile 2...
Restore datafile 3...
Restore datafile 4...
Restore datafile 5...
Restore datafile 6...
Performing Oracle Checkpoint.
Waiting 3 seconds for log switch completion...
Standby database created.


To complete creating standby database, run dbvisit on the primary server, then
on the standby, to ensure the standby database is in sync with primary.


Please press <Enter> to continue...
=========================================================
     Standby Database creation on dbvlin804 completed.
Next steps:
1) Exit out of dbvisit_setup.
2) Run Dbvisit on this server with command:
        dbvisit database_name
3) Run Dbvisit on standby server with command:
       (cd /usr/local/dbvisit/standby)
       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...

 

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

 

Run Dbvisit on Primary to send the logs:

oracle@dbvlin803[/usr/local/dbvisit/standby]: ./dbvisit testdb

=============================================================
Dbvisit Standby Database Technology (6.0.60.12001) (pid 28246)
dbvisit started on dbvlin803: Wed Jul  9 14:11:04 2014 ()
=============================================================
Obtaining information from standby database (RUN_INSPECT=Y)...

Sending heartbeat message...
==> Scheduler message sent.

Checking Dbvisit Standby configurational differences between dbvlin803 and dbvlin804...
No Dbvisit Standby configurational differences found between dbvlin803 and dbvlin804.
Log file(s) for testdb will be transferred from dbvlin803 to dbvlin804...


Transferring o1_mf_1_114_9vs8w4cq_.arc.gz to host dbvlin804:o1_mf_1_114_9vs8w4cq_.arc.gz
201407091411 - 1 Log transfer to dbvlin804 for testdb completed.
	 Last sequence was 114.


Dbvisit Archive Management Module (AMM)
(Number to keep: 0) (Days to keep: 7) (Archive backup count: 0) (Diskspace full threshold: 80%)
Current Disk percent full (/u01/app/oracle/fast_recovery_area)      : 83%
Situation is critical! Threshold of 80% on /u01/app/oracle/fast_recovery_area is less than current available space 83%.
Situation is critical! Threshold of 80% (on /u01/app/oracle/fast_recovery_area) is less than current available space 83%.
Not allowed to remove oldest archives from /u01/app/oracle/fast_recovery_area, because DELETE_ARCHSOURCE=N.
Number of archive logs deleted         : 0


=============================================================
dbvisit ended on dbvlin803: Wed Jul  9 14:11:27 2014
=============================================================

 

Run Dbvisit now on the standby to apply the logs:

oracle@dbvlin804[/usr/local/dbvisit/standby]: ./dbvisit testdb

=============================================================
Dbvisit Standby Database Technology (6.0.60.12001) (pid 12512)
dbvisit started on dbvlin804: Wed Jul  9 14:12:30 2014 ()
=============================================================

Log file(s) for testdb from dbvlin803 will be applied to dbvlin804...
Sending heartbeat message...
==> Scheduler message sent.


201407091412 - Log seq 114 thread 1 applied to standby database testdb.


Dbvisit Archive Management Module (AMM)
(Number to keep: 0) (Days to keep: 7) (Diskspace full threshold: 80%)
Processing /u01/app/oracle/dbvisit_archive/standby6_archives...
Archive log dir: /u01/app/oracle/dbvisit_archive/standby6_archives
Total number of archive files   : 3
Number of archive logs deleted         : 0
Current Disk percent full       : 92%
Situation is critical! Threshold of 80% (on /u01/app/oracle/dbvisit_archive/standby6_archives) is less than current available
space 92%.
Not allowed to remove oldest archives from /u01/app/oracle/dbvisit_archive/standby6_archives, because DELETE_ARCHDEST=N.

=============================================================
dbvisit ended on dbvlin804: Wed Jul  9 14:12:38 2014
=============================================================