The example below shows how to create standby database on the fly (by direct transfer to the standby server). Creating a standby database is performed on the primary server (primary node).
For a complete overview of creating the standby database, please see Creating Standby Databases automatically with Dbvisit Standby.
1. Go to the Dbvisit Standby install directory. Start the Dbvisit Standby setup utility.
dbvisit_setup
2. To create a standby database, choose option 7.
=========================================================
Dbvisit Standby Database Technology
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)
9) Uninstall Dbvisit Database repository (DDR)
E) Exit
=========================================================
Please enter choice : 7
3. Choose the primary database to create a standby for. Only Dbvisit Standby configured databases will be shown :
=>Creating Standby Database.
Primary database will NOT be shutdown.
For which primary database do you want to create a standby database?
The following Oracle database(s) have a Dbvisit Database configuration (DDC) file on this server:
SID
===
1) dbvisitp
2) dbvlx102
3) Return to menu
Please enter choice : 1
Is this correct? <Yes/No> [Yes]:
4. The primary database must be up and running for the setup to proceed. Total size of the primary database is calculated and displayed. The Dbvisit Standby installation files are also copied to the standby server initially. If uncompleted creation of the standby database is detected, a restart option will be available. Standby database can also be created using a saved template:
Database dbvisitp is up.
Checking Dbvisit configurational differences between dbvisit31 and dbvisit32...
No Dbvisit configurational differences found between dbvisit31 and dbvisit32.
Checking Oracle installation on dbvisit32 in
/oracle/orabase/product/10.1.0/Db_1/bin/oracle...
Total database size for dbvisitp is 20GB
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
Starting creation of standby database.
5. An ASM (for Oracle version 10.2 or higher) or normal file system standby database can be created:
------------------------------------------------------------------------------
Do you want to create an ASM standby database (with all or some database files
in ASM storage)? [No]: n
Standby database will be ASM: N
Is this correct? <Yes/No> [Yes]:
6. It is possible to transfer datafiles directly to the standby server, but only if both primary and standby databases are filesystem, and the primary database does not contain Oracle Managed Files (OMF):
------------------------------------------------------------------------------
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]:
Database files will be copied directly to the standby server: Y
Is this correct? <Yes/No> [Yes]: Y
7. It is possible to use secure shell (SSH) compression "on the fly" during transfer of the database files. Using SSH compression may speed up the transfer if the network is slow, however it may take additional CPU cycles:
------------------------------------------------------------------------------
Use ssh compression to compress the database files during transferring? [Yes]:
Database files will be compressed during transferring: Yes
Is this correct? <Yes/No> [Yes]:
8. It is possible to create missing filesystem directories on the standby server automatically:
------------------------------------------------------------------------------
Dbvisit Standby has functionality to create missing filesystem directories on the standby server automatically.
Do you want Dbvisit Standby to create missing filesystem directories on the standby automatically? [Yes]: Dbvisit
will create missing filesystem directories automatically: Y
Is this correct? <Yes/No> [Yes]:
9. Oracle database parameters for the standby database can be customised:
------------------------------------------------------------------------------
The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
db_block_size 8192
db_file_multiblock_read_count 16
db_name dbvisitp
dispatchers (PROTOCOL=TCP) (SERVICE=dbvisitpXDB)
job_queue_processes 10
log_archive_dest
log_archive_dest_1 location=/oracle/oraarch/dbvisitp
log_archive_format %t_%s_%R.log
nls_language German
nls_territory germany
open_cursors 300
pga_aggregate_target 16777216
plsql_compiler_flags NATIVE, NON_DEBUG
processes 150
remote_login_passwordfile EXCLUSIVE
-------------------------------------------------------------------------------
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
10. It is possible to specify the locations of standby datafiles, redo logs and tempfiles different as primary, or alternatively keep the same structure for the standby database as primary:
Primary database contains non OMF datafiles and/or tempfiles. To create non-OMF standby datafiles and/or tempfiles Dbvisit
requires you to provide valid filesystem locations on the standby.
Review and confirm standby locations to create standby non-OMF datafiles and tempfiles.
11. Provided answers can be stored as a template for future use (re-running creating of a standby database):
=>Create standby database template for dbvisitp using provided answers?
<Yes/No> [Yes]:
An existing template found.
=>Do you want to view the existing template? <Yes/No> [Yes]: n
What would you like to do:
1 - Keep existing template and continue with creating a standby database
using provided answers
2 - Save provided answers as a new template (Note: existing template
will be replaced by the new one)
Please enter your choice [1]: 2
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]:
12. The standby database will now be created. Once completed the next steps to take will be shown:
Creating standby database...
Backing up datafile 1...
Backing up datafile 2...
Backing up datafile 3...
Backing up datafile 4...
Backing up datafile 5...
Backing up datafile 10...
Creating standby controlfile controlfile...
Creating standby parameter file...
Backup of primary database completed.
Compressing /var/tmp/tmp1/dbv_dbvisitp_dbf_10_87_1.piece...
Compressing /var/tmp/tmp1/dbv_dbvisitp_dbf_1_81_1.piece...
Compressing /var/tmp/tmp1/dbv_dbvisitp_dbf_1_82_1.piece...
Compressing /var/tmp/tmp1/dbv_dbvisitp_dbf_2_83_1.piece...
Compressing /var/tmp/tmp1/dbv_dbvisitp_dbf_3_84_1.piece...
Compressing /var/tmp/tmp1/dbv_dbvisitp_dbf_4_85_1.piece...
Compressing /var/tmp/tmp1/dbv_dbvisitp_dbf_5_86_1.piece...
Transferring /var/tmp/tmp1/dbv_dbvisitp_dbf_10_87_1.piece.gz to host dbvisit32.avisit.co.nz:/var/tmp/tmp2/dbv_dbvisitp_dbf_10_87_1.piece.gz ...
Transferring /var/tmp/tmp1/dbv_dbvisitp_dbf_1_81_1.piece.gz to host dbvisit32.avisit.co.nz:/var/tmp/tmp2/dbv_dbvisitp_dbf_1_81_1.piece.gz ...
Transferring /var/tmp/tmp1/dbv_dbvisitp_dbf_1_82_1.piece.gz to host dbvisit32.avisit.co.nz:/var/tmp/tmp2/dbv_dbvisitp_dbf_1_82_1.piece.gz ...
Transferring /var/tmp/tmp1/dbv_dbvisitp_dbf_2_83_1.piece.gz to host dbvisit32.avisit.co.nz:/var/tmp/tmp2/dbv_dbvisitp_dbf_2_83_1.piece.gz ...
Transferring /var/tmp/tmp1/dbv_dbvisitp_dbf_3_84_1.piece.gz to host dbvisit32.avisit.co.nz:/var/tmp/tmp2/dbv_dbvisitp_dbf_3_84_1.piece.gz ...
Transferring /var/tmp/tmp1/dbv_dbvisitp_dbf_4_85_1.piece.gz to host dbvisit32.avisit.co.nz:/var/tmp/tmp2/dbv_dbvisitp_dbf_4_85_1.piece.gz ...
Transferring /var/tmp/tmp1/dbv_dbvisitp_dbf_5_86_1.piece.gz to host dbvisit32.avisit.co.nz:/var/tmp/tmp2/dbv_dbvisitp_dbf_5_86_1.piece.gz ...
Uncompressing /var/tmp/tmp2/dbv_dbvisitp_dbf_10_87_1.piece.gz...
Uncompressing /var/tmp/tmp2/dbv_dbvisitp_dbf_1_81_1.piece.gz...
Uncompressing /var/tmp/tmp2/dbv_dbvisitp_dbf_1_82_1.piece.gz...
Uncompressing /var/tmp/tmp2/dbv_dbvisitp_dbf_2_83_1.piece.gz...
Uncompressing /var/tmp/tmp2/dbv_dbvisitp_dbf_3_84_1.piece.gz...
Uncompressing /var/tmp/tmp2/dbv_dbvisitp_dbf_4_85_1.piece.gz...
Uncompressing /var/tmp/tmp2/dbv_dbvisitp_dbf_5_86_1.piece.gz...
Shutting down standby database on dbvisit32.avisit.co.nz...
Standby database dbvisitp5 on dbvisit32.avisit.co.nz shutdown.
Remote spfile /oracle/orabase/product/10.1.0/Db_1/dbs/spfiledbvisitp5.ora
backed as
/oracle/orabase/product/10.1.0/Db_1/dbs/spfiledbvisitp5.ora.201111231612.
Remote spfile /oracle/orabase/product/10.1.0/Db_1/dbs/spfiledbvisitp5.ora
deleted.
Spfile created on the remote server.
Restoring standby control files...
Starting Standby Database dbvisitp5...
Standby Database dbvisitp5 started nomount.
Standby database dbvisitp5 on dbvisit32.avisit.co.nz startup nomount.
Shutting down standby database on dbvisit32.avisit.co.nz...
Standby database dbvisitp5 on dbvisit32.avisit.co.nz shutdown.
Standby control files restored.
Starting Standby Database dbvisitp5...
Standby Database dbvisitp5 started .
Standby database dbvisitp5 on dbvisit32.avisit.co.nz mounted.
Catalog backup piece /var/tmp/tmp2/dbv_dbvisitp_dbf_10_87_1.piece...
Catalog backup piece /var/tmp/tmp2/dbv_dbvisitp_dbf_1_81_1.piece...
Catalog backup piece /var/tmp/tmp2/dbv_dbvisitp_dbf_1_82_1.piece...
Catalog backup piece /var/tmp/tmp2/dbv_dbvisitp_dbf_2_83_1.piece...
Catalog backup piece /var/tmp/tmp2/dbv_dbvisitp_dbf_3_84_1.piece...
Catalog backup piece /var/tmp/tmp2/dbv_dbvisitp_dbf_4_85_1.piece...
Catalog backup piece /var/tmp/tmp2/dbv_dbvisitp_dbf_5_86_1.piece...
Restoring datafile 1...
Restoring datafile 2...
Restoring datafile 3...
Restoring datafile 4...
Restoring datafile 5...
Restoring datafile 10...
=>Standby database created without tempfiles. If you wish to manually add
standby tempfiles please perform the following steps:
1. Run Dbvisit on the primary first, then on the standby to sync the newly
created standby database.
2. Open standby database in READ ONLY mode:
dbv_oraStartStop open dbvisitp
2. Add temporary files using SQL statement ALTER TABLESPACE ADD TEMPFILE
3. Restart standby database:
dbv_oraStartStop restart dbvisitp
Performing Oracle Checkpoint.
Waiting 3 seconds for log switch completion...
Standby database created.
To complete creating standby database, run dbvisit on the primary and standby
databases to ensure standby database is in synch with primary.
Please press <Enter> to continue...
13. The standby database has been created. The Dbvisit Standby setup menu will be redisplayed:
=========================================================
Dbvisit Standby Database Technology
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)
9) Uninstall Dbvisit Database repository (DDR)
E) Exit
=========================================================
Please enter choice : e
14. Exit out of the main menu and run Dbvisit Standby as normal.
15. Dbvisit Standby can now be run on completion of the standby database creation. To run Dbvisit Standby go to section Dbvisit Standby commands (running or executing Dbvisit Standby).