This step can be skipped, if a standby database is already present. Dbvisit Standby can work with existing standby databases. To integrate Dbvisit Standby with an existing standby database, skip this section and go to section Dbvisit Standby commands (running or executing Dbvisit Standby). Dbvisit Standby does not distinguish between an existing standby database and a standby database created through Dbvisit Standby.Dbvisit Standby can automatically create the standby database. The standby database will reside on the standby server and is an exact binary copy of the primary database.The standby database only needs to be created once. After the standby database is created, Dbvisit Standby will automatically ensure the standby database is kept up to date with the primary database.Dbvisit Standby normally uses the network to transfer the primary database to the standby server to create the standby database. For slow networks or very large databases, use the transportable media creation method to create the standby database. The primary database will not be shutdown during standby database creation. Dbvisit Standby uses RMAN in most cases to make a backup of the primary database.
Perquisites for creating the standby database are:
- Oracle software must be installed on the standby server.
- Enough free space on the standby server must be available for the standby database.
- The Oracle background (cdump, udump, bdump etc. ) and admin directories are created.These directories can be created by Dbvisit if you choose the option to create missing filesystem directories automatically.
Dbvisit Standby allows the following options for creating the standby database:
a) Regular file system standby database with
i) Same structure as primary database or
ii) Different structure as primary database.
b) ASM standby database (for Oracle version 10.2 and higher) with
i) Same structure as primary database or
ii) Different structure as primary database.
Dbvisit Standby - standby database creation methods
The following methods are available to create the standby database:
- Direct transfer to the standby server (on the fly creation) over the network.
- Using a temporary location to create a complete backup of the primary database and then transferring the complete backup from the temporary location on the primary server to the standby server over the network.
- Transportable Media which uses a temporary location to create a complete backup of the primary database and manually transferring the complete backup to the standby server using TRANSPORATBLE MEDIA. 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 complete the process.
Option 1 should be chosen for smaller databases.
Option 2 should be chosen for larger databases.
Option 3 should be chosen for very large databases or slow networks.
Option 2 and 3 will require adequate space on the primary server to make a (compressed) copy of the database files.
Standby database spfile/pfile
The spfile.ora (pfile.ora for Oracle database version less than 9) is created for the standby database using init.ora or spfile.ora file from the primary database. Oracle database parameters for the standby database can be customised. If an existing init.ora or spfile.ora file is already present on the standby server, it will be overwritten. The Create Standby Database wizard will guide the process and for customizing of Oracle standby database during the creation process. The settings can be saved as a template for future use. If a standby database template has been created previously, then this can be used to create the standby database. No further questions will be asked.
Creation of standby database using CLI or GUI
The creation of the standby database can be done either through the command line interface (CLI) or the web based graphical user interface (GUI). The CLI commands are indicated with a and the web based or GUI commands are indicated with a
Create standby database on the fly using CLI
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 Start the Dbvisit Standby command console from the Start Menu > Programs > Dbvisit > Standby.
1. 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
2. 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) w120n
3) Return to menu
Please enter choice : 1
Is this correct? <Yes/No> [Yes]:
3. 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 w120n is up.
Total database size for w120n is 23GB
Transferring dbv_functions to host WINDEV-02:dbv_functions
Transferring dbvisit to host WINDEV-02:dbvisit
Transferring dbvisit_setup to host WINDEV-02:dbvisit_setup
Transferring dbv_oraStartStop to host WINDEV-02:dbv_oraStartStop
Transferring dbv_w120n.env to host WINDEV-02:dbv_w120n.env
Transferring dbv_ORACLE_SID.env to host WINDEV-02:dbv_ORACLE_SID.env
Transferring README.txt to host WINDEV-02:README.txt
Checking Oracle installation on WINDEV-02 in
C:\oracle\product\10.2.0\db_1…
Total database size for w120n is 830MB
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]: 1
Starting creation of standby database.
4. An ASM (for Oracle versions 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]:
5. 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
6. 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]:
7. It is possible to create missing filesystem directories on the standby server automatically:
------------------------------------------------------------------------------
Dbvisit has functionality to create missing filesystem directories on the standby server automatically.
Do you want Dbvisit to create missing filesystem directories on the standby automatically? [Yes]:
Dbvisit will create missing filesystem directories automatically:Y
Is this correct? <Yes/No> [Yes]:
8. Oracle database parameters for the standby database can be customised:
------------------------------------------------------------------------------
The following oracle database parameters will be set in the standby database pf
le or spfile:
-------------------------------------------------------------------------------
audit_file_dest C:\ORACLE\ADMIN\W120N\ADUMP
background_dump_dest C:\ORACLE\ADMIN\W120N\BDUMP
compatible 10.2.0.1.0
control_files C:\ORACLE\ORADATA\W120N\CONTROL01.CTL,
:\ORACLE\ORADATA\W120N\CONTROL02.CTL, C:\ORACLE\ORADATA\W120N\CONTROL03.CTL
core_dump_dest C:\ORACLE\ADMIN\W120N\CDUMP
db_block_size 8192
db_file_multiblock_read_count 16
db_name w120n
db_recovery_file_dest_size 2621440000
dispatchers (PROTOCOL=TCP) (SERVICE=w120nXDB)
job_queue_processes 10
log_archive_dest_1 LOCATION=C:\oracle\oraarch\w120n
log_archive_format ARC_%%ORACLE_SID%%%S_%R.%T
open_cursors 300
pga_aggregate_target 155189248
processes 50
remote_login_passwordfile EXCLUSIVE
sessions 60
sga_target 469762048
spfile OS default
standby_file_management AUTO
undo_management AUTO
undo_tablespace UNDOTBS1
user_dump_dest C:\ORACLE\ADMIN\W120N\UDUMP
-------------------------------------------------------------------------------
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
9. 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.
-------------------------------------------------------------------------------
Primary ===> Standby
-------------------------------------------------------------------------------
C:\ORACLE\ORADATA\W120N ===> C:\ORACLE\ORADATA\W120N
-------------------------------------------------------------------------------
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.
To create non OMF redo logs Dbvisit requires you to specify valid filesystem
locations on the standby.
Review and confirm standby locations to create standby non OMF redo logs.
-------------------------------------------------------------------------------
Primary ===> Standby
-------------------------------------------------------------------------------
C:\ORACLE\ORADATA\W120N ===> C:\ORACLE\ORADATA\W120N
-------------------------------------------------------------------------------
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.
10. Provided answers can be stored as a template for future use (re-running creating of a standby database):
------------------------------------------------------------------------------
=>Create standby database template for w120n using provided answers?
<Yes/No> [Yes]: y
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]:
11. The standby database will now be created. Once completed the next stepsto take will be shown:
Creating standby database...
Creating standby controlfile controlfile...
Creating standby parameter file...
Backup of primary database completed.
Transferring C:\ORACLE\ORADATA\W120N\SYSTEM01.DBF to host WINDEV-02:C:\ORACLE\O
ADATA\W120N\SYSTEM01.DBF ...
Transferring C:\ORACLE\ORADATA\W120N\UNDOTBS01.DBF to host WINDEV-02:C:\ORACLE\
RADATA\W120N\UNDOTBS01.DBF ...
Transferring C:\ORACLE\ORADATA\W120N\SYSAUX01.DBF to host WINDEV-02:C:\ORACLE\O
ADATA\W120N\SYSAUX01.DBF ...
Transferring C:\ORACLE\ORADATA\W120N\USERS01.DBF to host WINDEV-02:C:\ORACLE\OR
DATA\W120N\USERS01.DBF ...
Shutting down standby database on WINDEV-02...
Windows Service OracleServicew120n stopped.
Standby database w120n on WINDEV-02 shutdown.
Checking Windows service OracleServicew120n on WINDEV-02...
Service OracleServicew120n already exists on WINDEV-02.
Windows Service OracleServicew120n starting...
Windows Service OracleServicew120n started.
Shutting down standby database on WINDEV-02...
Standby database w120n on WINDEV-02 shutdown.
Remote spfile C:\oracle\product\10.2.0\db_1\database\spfilew120n.ora backed as
C:\oracle\product\10.2.0\db_1\database\spfilew120n.ora.201112030906.
Remote spfile C:\oracle\product\10.2.0\db_1\database\spfilew120n.ora deleted.
Spfile created on the remote server.
Restoring standby control files...
Windows Service OracleServicew120n already started.
Starting Standby Database w120n...
Standby Database w120n started nomount.
Standby database w120n on WINDEV-02 startup nomount.
Shutting down standby database on WINDEV-02...
Standby database w120n on WINDEV-02 shutdown.
Standby control files restored.
Windows Service OracleServicew120n already started.
Starting Standby Database w120n...
Standby Database w120n started .
Standby database w120n on WINDEV-02 mounted.
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...
=========================================================
Standby Database creation on WINDEV-02 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 E:\users\oracle\Avisit\Products\Dbvisit\Development\dbvisit\standby)
dbvisit database_name
Once Dbvisit has been tested, schedule Dbvisit on primary and standby servers
using windows "Scheduled Task" or other scheduling tool.
=========================================================
Please press <Enter> to continue...
12. The standby database has been created. The Dbvisit Standby setup menu will be redisplayed:
=========================================================
Dbvisit Standby Database Technology (
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.16.7841)
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 :
13. Exit out of the main menu and run Dbvisit Standby as normal.
14. 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).
Create standby database using GUI
The example below shows how to create an ASM standby database using a temporary location to create the initial backup. 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. Home > Setup > Create New Standby Database > select Database from drop-down menu
2. We are using ASM for the standby database, select Yes and press Continue.
3. Precondition is executing to ensure the standby server environment is correct. This process may take a while to complete.
4. Select the option as required below.
5. Select the temporary location on the primary and standby servers if required.
6. The standby database parameters can be edited if required.
7. The standby database file and online log locations are displayed and these can be edited if a different structure of the standby database is required.
8. The settings can be saved for future use. Click on Create Standby Database.
9. Standby database creation process will start and the output of the different steps will be shown in the browser window. This process can take a very long time depending on the size of the database and the network.
10. Standby database has now been created.
For more information about creation of standby database, please see Creating Standby Databases automatically with Dbvisit Standby.