This section will show you an example of creating a standby database. This Create Standby Database process (setup) is also referred to as CSD.
Important
Creating a standby database is performed on the primary server (primary node).
The example below will show you how to create a standby database running on standby server "dbvlin102" from the primary database called "proddb" running on the primary server "dbvlin101".
Windows only:
Start the "Dbvisit Standby command console" from the Start Menu ->Programs -> Dbvisit -> Standby.
This will start a Command Line with your session already in the DBVISIT_BASE/standby directory.
From the DBVISIT_BASE/standby directory, execute the "dbvisit_setup.exe" command to start the setup utility.
Linux/Unix only:
Go to the DBVISIT_BASE/standby directory. Start the Dbvisit Standby setup utility using the command: ./dbvisit_setup
oracle@dbvlin101[/usr/dbvisit/standby]: ./dbvisit_setup ========================================================= Dbvisit Standby Database Technology (7.0.04.11726) http://www.dbvisit.com ========================================================= =>dbvisit_setup only needs to be run on the primary server. Is this the primary server? <Yes/No> [Yes]: Yes
The Dbvisit Standby Menu will now be displayed:
Linux/UNIX and Windows:
Step 1:
To create a standby database, choose option 7.
========================================================= Dbvisit Standby Database Technology (7.0.04.11726) 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
Step 2:
From the next section, you will se a list of available DDC files. If none exist, you need to first run the menu option 1 above to create a DDC file for the Primary/Standby database pair.
From the list being displayed, choose the primary database you would like create a standby for. In this example a standby database will be created for the database "proddb" which is DDC number 2:
------------------------------------------------------------------------------ =>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) devdb 2) proddb 3) testdb 4) Return to menu Please enter choice : 2 Is this correct? <Yes/No> [Yes]: Yes
From the above select DDC number 2 and confirm selection.
Step 3:
The primary database must be up and running for the setup to proceed. The following checks are performed:
Configuration differences between the primary DDC file and the DDC file on the standby server. If no DDC file exist on the standby (during a new installation it will not exist on the standby, but only on the primary) or if any differences are found, the primary copy of the DDC file will be copied to the standby server.
- The Oracle Installation is reviewed to ensure the Oracle Database software is installed
- The primary datafile statuses are reviewed
- The Dbvisit Standby Configuration is parsed
- The primary database selected is reviewed to make sure it is in the correct state to proceed with the creation.
- The total size of the primary database is calculated and displayed.
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
Confirmation is asked if you want to continue with the Create Standby Database (CSD) setup.
Database proddb is up. >>> Checking Dbvisit Standby for configurational differences between dbvlin101 and dbvlin102... Waiting for 5 seconds (RETRIES_WAIT_IN_SEC) until retry. Dbvisit Standby configurational differences found between dbvlin101 and dbvlin102... > Transferring 'dbv_proddb.env' to server dbvlin102:7890 Progress: 0%...20%...40%...60%...80%...100% [9859 KB/s] - done. >>> Checking Oracle installation on dbvlin102 in /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle... >>> Checking primary datafiles on dbvlin101... >>> Validating Dbvisit configuration file on dbvlin102... >>> Checking if a database is up and running on dbvlin102... Checks completed OK. >>> Total database size for proddb is 1.36GB 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]:
Step 4:
The setup process will ask if you want to make use of ASM storage for the Standby Database. As this environment is not using ASM, the default option is "No". If your primary database is making use of ASM storage and you do want to make use of ASM on the Standby server, please make sure you specify "Yes" to this question.
It is possible to create a standby database using a normal filesystem while the primary database is making use of ASM.
For critical production (primary) and standby environments it is always recommended to create the standby environment the same as the primary.
------------------------------------------------------------------------------- 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
In this example we are making use of Normal filesystem for the database storage and ASM will not be used.
Step 5:
It is possible to transfer datafiles directly to the standby server, but only if both primary and standby databases are file system based, small, and the primary database does not contain Oracle Managed Files (OMF). It is recommended not to use the Direct Copy option which will place the tablespaces in backup mode, followed by copying the datafiles sequentially to the standby server. This option is only suited for small environments and where a sufficient network capacity is available.
The Recommended approach is to us a three step process where the primary database is backed up using RMAN to local storage (using compressed backups), followed by the backups being transferred to the standby server, from where the backup is used to create the standby database. To use this approach, specify "No" (the default option) when asked if you want to transfer the data files directly to the standby server.
------------------------------------------------------------------------------- Answer Yes to transfer the datafiles directly to the standby server (not recommended for large database or slow networks) Note tablespaces will be placed in backup mode for direct copy. Answer No (recommended) to create an RMAN backup of primary datafiles in a temporary location and transfer the backup to the standby server Do you want to copy database files directly to the standby server? [No]: No Database files will be copied to standby server using temporary location on dbvlin101. Is this correct? <Yes/No> [Yes]: Yes
In the example below we specify "No" and confirm our selection.
Step 6:
It is possible to enable network compression when files are transferred to the standby database server. This is not recommended. The files will already be compressed.
------------------------------------------------------------------------------- Use network compression to compress the database files during transfer? [No]: No Database files will be compressed during transfer: N Is this correct? <Yes/No> [Yes]: Yes
In this example we specify "No" and confirm our selection.
Step 7:
It is possible to create missing filesystem directories on the standby server automatically:
------------------------------------------------------------------------------- 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
In this example we specify "Yes" as we do want Dbvisit Standby to create the required directories on the standby server.
Step 8:
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: ------------------------------------------------------------------------------- audit_file_dest /u01/app/oracle/admin/proddb/adump compatible 11.2.0.0.0 control_files /u01/app/oracle/oradata/proddb/control01.ctl, /u01/app/oracle/fast_recovery_area/proddb/control02.ctl db_block_size 8192 db_name proddb db_recovery_file_dest /u01/app/oracle/fast_recovery_area db_recovery_file_dest_size 4322230272 diagnostic_dest /u01/app/oracle dispatchers (PROTOCOL=TCP) (SERVICE=proddbXDB) memory_target 629145600 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]: 1 Validating oracle database parameters... please wait SUCCEEDED
In the above example, we agree with the parameters as specified, and specify option 1 after which the parameters are reviewed. If you do want to adjust the parameter use option 2 to edit specific parameters. Remember you can always adjust some of the parameters once the standby database creation is complete.
Step 9:
It is possible to use TRANSPORTABLE MEDIA for very large databases or slow networks. When using this option, a backup of the primary database will be created on local storage (can be attached storage such as an external drive, but this must be mounted/made available by the system administrator). Once the backup is complete, it can be shipped (courier or other methods) to the standby site where it is then attached to the standby server. Once attached you can restart the Dbvisit Standby creation to complete the creation of the standby using this backup. This method is recommended for very large databases as well as when there is an extremely slow network between the primary and standby servers.
------------------------------------------------------------------------------- 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]: No Transportable media will be used: N Is this correct? <Yes/No> [Yes]: Yes
In this example we specify not to use Transportable Media and confirm our selection.
Step 10:
To create the standby database temporary locations on both primary and standby server must be specified, to hold a database backup.
Make sure this temporary backup location exist on both the primary and standby servers and can hold a full compressed (RMAN Compressed) backup of the primary database
------------------------------------------------------------------------------- A temporary location must be specified on dbvlin101 where the database will be backed up to first. This location must be big enough to hold RMAN backup of the whole database (1.36GB). Specify the location on this server: [/usr/tmp]: /backup/proddb Directory for temporary location will be: /backup/proddb Is this correct? <Yes/No> [Yes]: Yes ------------------------------------------------------------------------------- A temporary location must be specified on dbvlin102 where the database backup will be copied to before moving to specified locations. Specify location on remote server: [/backup/proddb]: /backup/proddb Directory for temporary will be: /backup/proddb Is this correct? <Yes/No> [Yes]: Yes
In this example we are using the temporary backup location which exist on both the primary and standby servers called /backup/proddb.
Make sure this directory exist and has the correct permission.
Step 11:
The process of creating a standby database can be broken into two steps. You can stop between these steps if required.
------------------------------------------------------------------------------- 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]: No Process will stop between steps: N Is this correct? <Yes/No> [Yes]: Yes
In the above example we choose not to stop between the two steps (recommended) and confirm our selection.
Step 12:
It is possible to specify the locations of standby datafiles, redo logs and tempfiles different as primary server. The next few questions shows you the recommended location. You can adjust the locations by using option 2. In the examples below we want to have the standby database the same as the primary one and we accept the default values provided by the setup:
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/proddb ===> /u01/app/oracle/oradata/proddb ------------------------------------------------------------------------------- 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. 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/PRODDB/onlinelog ===> /u01/app/oracle/fast_recovery_area/PRODDB/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.
Once the selections are made they are verified.
Step 13:
Provided answers can be stored as a template for future use (re-running creating of a standby database):
------------------------------------------------------------------------------- =>Create standby database template for proddb using provided answers? <Yes/No> [Yes]: Yes
In this example we specify "Yes" to save the above steps as a template so we can re-use this template at a later stage if needed.
Step 14:
The final step is to confirm the start of the Create Standby Database (CSD) process. Once you specify yes (option 1) to continue the standby creation process will start.
The first part of the CSD process is to run a "Pre-Flight Check". What this process does is to create a spfile and start an instance on the standby server. This is to double check that the standby server is ready for the creation of the standby database.
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 >>> 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.
Once the "Pre-Flight Check" completes, the Create Standby Database (CSD) process start. Detail output of the Standby Creation is displayed:
Step 15:
The standby database has been created. The Dbvisit Standby setup menu will be redisplayed:
Step 16:
Exit out of the main menu and run Dbvisit Standby as normal.