Create Standby Database using Batch Mode

The standby database can be created in batch mode using an existing saved template. Template can be created by running dbvisit_setup interactively and choosing option 7.

 

dbvisit_setup --csd --ddc <ddc> --template

Where <ddc> is the Dbvisit Standby Database Configuration (DDC) file and is in most cases the same as the database or instance name.

In following example, standby database testdb is created in batch mode using saved template.

 

C:\Program Files (x86)\Dbvisit\Standby>dbvisit_setup.exe --csd --ddc testdb --template
=============================================================
dbvisit_setup started in BATCH mode at 20121130 04:04
csd = 1
ddc = testdb
restart =
template = 1
output_dir =
web =
ddr =
INTERFACE_MODE = BATCH
=============================================================
C:\Program Files (x86)\Dbvisit\Standby\dbvisit_setup.exe
Creating standby database see trace file 
C:\windows\temp\3036_dbvisit_setup_csd_testdb_201211300404.trc
Checking Dbvisit Standby configurational 
differences between DBVAWSWIN01 and DBVAWSWIN02...
No Dbvisit Standby configurational differences 
found between DBVAWSWIN01 and DBVAWSWIN02.
Checking Oracle installation on DBVAWSWIN02 in
C:\oracle\product\11.2.0\dbhome_1\bin\oracle.exe...
Total database size for testdb is 1.37GB
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...
Creating standby controlfile controlfile 
as 'C:\windows\temp\dbv_testdb_csd_stdby.ctl'...
Creating standby parameter file...
Backup of primary database completed.
Transfer C:\windows\temp\DBV_TESTDB_CSD_1_09NRITJ5_1_1.RMAN to host ...
Transfer C:\windows\temp\DBV_TESTDB_CSD_1_0ANRITKJ_1_1.RMAN to host ...
Transfer C:\windows\temp\DBV_TESTDB_CSD_2_0BNRITKP_1_1.RMAN to host ...
Transfer C:\windows\temp\DBV_TESTDB_CSD_3_0CNRITLM_1_1.RMAN to host ...
Transfer C:\windows\temp\DBV_TESTDB_CSD_4_0DNRITLQ_1_1.RMAN to host ...
Transfer C:\windows\temp\DBV_TESTDB_CSD_5_0ENRITLV_1_1.RMAN to host ...
Shutting down standby database on DBVAWSWIN02...
Standby database testdb on DBVAWSWIN02 shutdown.
Checking Windows service OracleServicetestdb on DBVAWSWIN02...
Service OracleServicetestdb created on AMAZONA-61H9IOP.
Windows Service OracleServicetestdb already started.
Shutting down standby database on DBVAWSWIN02...
Standby database testdb on DBVAWSWIN02 shutdown.
Spfile created on remote server.
Restoring standby control files...
Standby control files restored.
Windows Service OracleServicetestdb already started.
Starting Standby Database testdb...
Standby Database testdb started .
Standby database testdb on DBVAWSWIN02 mounted.
Restore datafile 1...
Restore datafile 2...
Restore datafile 3...
Restore datafile 4...
Restore datafile 5...
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.
=============================================================
dbvisit_setup completed in BATCH mode at 20121130 04:16
=============================================================
Please press enter to exit... 

You can also restart uncompleted creation of a standby database in batch mode using ---restart flag.

 

dbvisit_setup --csd --ddc <ddc> --restart

--restart and --template are incompatible