This example shows how to create an ASM standby database with different structure as primary ASM database. section will show you an example of creating a standby database. This Create Standby Database process (setup) is also referred to as CSD.
Note | ||
---|---|---|
| ||
Creating a standby database is performed on the primary server (primary node). |
Windows only:
Start the Dbvisit Standby command console from the Start Menu -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.
Linux/Unix only:
Go to the Dbvisit Standby install directory. Start the 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.
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Linux/UNIX and Windows:
1. To create a standby database, choose option 7.
...
Column | ||
---|---|---|
| ||
|
...
width | 95 |
---|
...
bgColor | CCC |
---|
Linux/Unix only:
Go to the DBVISIT_BASE/standby directory. Start the Dbvisit Standby setup utility using the command: ./dbvisit_setup
No Format |
---|
oracle@dbvlin101[/usr/dbvisit/standby]: ./dbvisit_setup ========================================================= Dbvisit Standby Database Technology http://www.dbvisit.comDbvisit 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 (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.
No Format |
---|
=================================================================
Please enter choice : 7 |
...
Dbvisit |
...
Section | ||||||
---|---|---|---|---|---|---|
Column | | |||||
| ||||||
Panel | ||||||
|
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:
...
Column | ||
---|---|---|
| ||
|
...
width | 95 |
---|
...
bgColor | CCC |
---|
...
4. An ASM (for Oracle database versions 10.2 or higher) or normal file system standby database can be created:
Section | ||||||
---|---|---|---|---|---|---|
Column | | |||||
| ||||||
Panel | ||||||
|
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:
No Format |
---|
---------------------------------------------------------------------------------- Do you want to create an ASM standby database (with all or some database files in ASM storage)? [Yes]: y Standby database will be ASM: Y =>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]: |
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):
...
Column | ||
---|---|---|
| ||
|
...
width | 95 |
---|
...
bgColor | CCC |
---|
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).
...
6. It is possible to compress datafiles before transferring:
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
7. It is possible to create missing filesystem directories on the standby server automatically:
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
8. Oracle database parameters for the standby database can be customised:
Section | ||||||
---|---|---|---|---|---|---|
Column | | |||||
| ||||||
Panel |
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.
Note |
---|
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.
No Format |
---|
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.
Note |
---|
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. |
No Format |
---|
------------------------------------------------------------------ audit_file_dest /oracle/orabase/admin/dbvlx102/adump background_dump_dest /oracle/orabase/admin/dbvlx102/bdump compatible 10.2.0.1.0 control_files +ARCHIVELOGS/dbvlx102/control01.ctl, +DATA/dbvlx102/control02.ctl, +ONLINELOGS/dbvlx102/control03.ctl core_dump_dest /oracle/orabase/admin/dbvlx102/cdump db_block_size 8192 db_create_file_dest +DATA db_create_online_log_dest_1 +DATA db_create_online_log_dest_2 +ONLINELOGS db_file_multiblock_read_count 16 db_name dbvlx102 db_recovery_file_dest +DATA db_recovery_file_dest_size 2147483648 dispatchers (PROTOCOL=TCP) (SERVICE=dbvlx102XDB) job_queue_processes 10 log_archive_dest_1 location=/oracle/oradata/dbvlx102 log_archive_format %t_%s_%r.dbf log_archive_start TRUE open_cursors 300 pga_aggregate_target 16777216 processes 150 remote_login_passwordfile EXCLUSIVE sga_target 167772160 spfile +ARCHIVELOGS/dbvlx102/spfiledbvlx102.ora undo_management AUTO undo_tablespace UNDOTBS1 user_dump_dest /oracle/orabase/admin/dbvlx102/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 use TRANSPORTABLE MEDIA for very large databases or slow networks:
Section | ||||||
---|---|---|---|---|---|---|
Column | | |||||
| ||||||
Panel |
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.
No Format |
---|
-------------------------------------------------------------------------------
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.
No Format |
---|
------------------------------------------------------------ Do you want to use TRANSPORTABLE MEDIA to transfer------------------- Use network compression to compress the database filesto 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 files. [No]: Transportable media will be used: N Is this correct? <Yes/No> [Yes]: |
10. To create an ASM standby database temporary locations on both primary and standby server must be specified, to hold a database backup:
Section | ||||||
---|---|---|---|---|---|---|
Column | | |||||
| ||||||
Panel | ||||||
|
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:
No Format |
---|
-------------------------------------------------------------------------------A
temporaryDbvisitlocation Standbymust providesbe functionalityspecified toon createdbvisit31 missingwhere filesystemthe directoriesdatabase onwill thebebacked standbyup serverto first automatically.This Dolocation youmust wantbe Dbvisitbig enough Standby tohold createRMAN missingbackup filesystemof the whole database (1.05GB). Specify the location on this server: [/usr/tmp]: /usr/tmp/tmp1 Directory for temporary location will be: /usr/tmp/tmp1 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:
No Format |
---|
------------------------------------------------------------------------------- AThetemporary followinglocation oraclemust databasebe parametersspecified willon bedbvisit32 setwhere in the standby databasewill pfilebe copied to before moving to specified locations. This location must be big enough to hold the whole database (995MB). Specify the location on the remote server: []: /usr/tmp/tmp2 Directory for temporary will be: /usr/tmp/tmp2 Is this correct? <Yes/No> [Yes]: |
11. The process of creating a standby database can be broken into two steps:
Section | ||||||
---|---|---|---|---|---|---|
Column | | |||||
| ||||||
Panel | ||||||
|
12. It is possible to specify the locations of standby datafiles, redo logs and tempfiles different as primary:
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
13. Provided answers can be stored as a template for future use (re-running creating of a standby database):
Column | ||
---|---|---|
| ||
|
...
width | 95 |
---|
...
bgColor | CCC |
---|
=========================================================
Dbvisit Standby Database Technology
http://www.dbvisit.com
...
Section | ||||||
---|---|---|---|---|---|---|
Column | | |||||
| ||||||
Panel | ||||||
|
14. The standby database will now be created. Once completed the next stepsto take will be shown:
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
15. The standby database has been created. The Dbvisit Standby setup menu will be redisplayed:
...
------------------
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.
No Format |
---|
-------------------------------------------------------------------------------
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.
Note |
---|
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 |
No Format |
---|
-------------------------------------------------------------------------------
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.
Note |
---|
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.
No Format |
---|
-------------------------------------------------------------------------------
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:
No Format |
---|
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):
No Format |
---|
-------------------------------------------------------------------------------
=>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.
No Format |
---|
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.