Standby Database File locations
Before creating standby database, you need to consider where your standby database files will be located and make sure the filesystem has necessary paths available and pre-created.
Dbvisit will create standby database files regardless whether on ASM, Filesystem or ACFS according to the general Oracle rules and concept. The main consideration is always whether you will do file path conversion or not.
The behavior is different for OMF files and non-OMF files. If you don’t know which type of files your primary database is using, be sure to check Prerequisites | 5. Check Primary Database Files Naming Structure
Â
1 OMF files
Location of OMF files on standby server is completely driven by OMF parameters db_create_file_dest , db_create_online_log_dest_[x] and db_recovery_file_dest. You may change it to place your files on different ASM diskgroup, different filesystem mountpoint etc … OMF parameters on primary and standby are needed even if you don’t make any type of name/path conversion.
OMF init parameters are:
db_create_file_dest
db_create_online_log_dest_1
db_create_online_log_dest_2
db_create_online_log_dest_3
db_create_online_log_dest_4
db_create_online_log_dest_5
If db_create_online_log_dest_[x]
is not set, Oracle creates redo in db_create_file_dest
and creates automatically mirror in db_recovery_file_dest
Don’t forget that Oracle automatically adds db_unique_name to the OMF path. Never set OMF parameters to contain any actual name. For example if you would set db_create_online_log_dest_1 = /u02/app/oracle/oradata/DEV, you would end up with nonsense path: /u02/app/oracle/oradata/DEV/DEV/onlinelog/o1_mf_3_lw9or7g1_.log
If you have identical filesystem structure on standby and on primary (no path conversion done):
You will need to set OMF parameters when creating standby database to the same values as on your primary. This is done automatically during create standby database wizard, so you don’t have to worry about it further.
OMF parameters on primary and on standby are needed even if your standby file locations are the same on primary and standby.
If you would like to have different file paths on primary and standby or if you’re converting between ASM and filesystem (path conversion is done):
You will need to set OMF parameters when creating standby database to intended locations as described further
Â
Following rules will apply for different types of files when standby database is created:
Location of OMF datafiles and tempfiles on standby
They will be created on standby in location <db_create_file_dest>/<db_unique_name>/datafile. For example if you have OMF datafile on primary (primary db_unique_name=SOLO):
+DATA/SOLO/DATAFILE/system.292.1148040717
and your standby will be on filesystem with init parameters:
db_create_file_dest = /u01/app/oracle/oradata
db_unique_name=dev
then standby OMF file will be created like so:
/u01/app/oracle/oradata/DEV/datafile/o1_mf_system_kqh8ln12_.dbf
db_unique_name is converted by oracle to uppercase for filesystem location.
Location of OMF redo logs on standby
They will be created on standby in location(s) <db_create_online_log_dest_[x]>/<db_unique_name>/onlinelog.
If parameters db_create_online_log_dest_[x] are not set, oracle will automatically create redo in <db_create_file_dest>/<db_unique_name>/onlinelog and its mirror in <db_recovery_file_dest>/<db_unique_name>/onlinelog.
For example if your primary has redo logs (only group 3 is displayed):
and your standby will be on filesystem with init parameters
db_create_file_dest = /u02/app/oracle/oradata
db_recovery_file_dest = /u02/app/oracle/fast_recovery_area
db_unique_name=dev
db_create_online_log_dest_[x] are not set
then standby OMF redo logs will be created like so (only group 3 is displayed):
Primary ASM to Standby filesystem conversion example with OMF files
Let’s have a look how primary ASM to Standby Filesystem conversion works for exclusively OMF primary database.
Primary database has following configuration:
During create standby database we would set OMF parameters like so:
After standby database is created it will have following structure:
2 Non-OMF files
If you have identical filesystem structure on standby and on primary (no path conversion done):
There’s no need to set any specific parameters for standby database if your primary database uses non-OMF files and you have identical filesystem structure / paths on standby and on primary.
If you would like to have different file paths on primary and standby or if you’re converting between ASM and filesystem (path conversion is done):
You need to set the convert parameters for your standby database during standby database creation. There are two convert parameters to set:
The convert parameters have following properties:
They contain pair or pairs of strings which are used for path conversion when standby database is created
They are valid on standby database only. On primary, they are not effective.
For Dbvisit to work properly, they need always set on primary and standby (their values are reversed)
Primary filesystem to Standby filesystem conversion example with non-OMF files
Primary database has following configuration:
On standby server we want to place all files on u02 instead of u01. So during the create standby database we would specify following parameters:
After the standby database is created, files will have following configuration:
3 Mixing OMF and Non-OMF files
This configuration is very complex for standby database creation and placement of database files on standby.
If you have identical filesystem structure on standby and on primary (no path conversion done):
You will need to set OMF parameters when creating standby database to the same values as on your primary (this is done automatically during create standby database wizard)
There’s no need to set any specific parameters for non-OMF files
If you would like to have different file paths on primary and standby or if you’re converting between ASM and filesystem (path conversion is done):
You will need to set OMF parameters when creating standby database to intended locations
You will need to set
db_file_name_convert
andlog_file_name_convert
as well
Primary filesystem to Standby filesystem path conversion example with OMF and non-OMF mix:
Primary database has following configuration:
All files are OMF except of one datafile (nonomf.dbf
) and one redo member (redo99.log
).
On standby server we want to place all files on u01 instead of u02. So during the create standby database we need to specify following parameters:
We need to specify OMF parameters and convert parameters as well, becausew we’re using OMF and non-OMF file types and we want to have path conversion.