Redo and Tempfile Management during CSD and GS
Â
The table below include a summary of the naming conventions used in this section when referring to database files:
Convention | Description | Example |
---|---|---|
FS | Filesystem non Oracle Managed Files (OMF) | redo01.log |
OMF | Filesystem Oracle Managed Files (OMF) | o1_mf_3_b4xty3xd_.log |
ASM_FSQN | ASM with Fully Qualified System Name (OMF) | +DATA/dbvlx102/onlinelog/group_3.284.862151837 |
ASM_ALIAS | ASM alias | +DATA/dbvlx102/onlinelog/redo1a |
ASM_DG | ASM diskgroup | +DATA |
The rest of this section will discuss how Dbvisit Standby is managing / handling redo log files as well as temp files during Standby Database Creation (CSD) and the Graceful Switchover (GS) process.
CSD and recreating standby control file
During the Create Standby Database (CSD) operation when the Standby Control file is created, Dbvisit Standby does not create actual physical standby redo and temp files, only references in a standby control file are created.
During these operations, Dbvisit Standby always favours Oracle Managed Files (OMF or ASM_FQSN) versus non OMF (FS or ASM_ALIAS)
Redo logs on the Standby Database
During the CSD process / Creation of Standby Controlfile:
- Dbvisit Standby either leaves primary redo names unchanged in the standby control file, or sets the Oracle parameter log_file_name_convert in the standby database parameter file (spfile) to change redo locations
- Using the log_file_name_convert parameter can also be used to get rid of error messages in the standby alert log caused by having references to ASM redo in the control file while no ASM storage available on the standby database
- If using ASM on the standby database, references to standby redo are created as the ASM Disk Group. Â Example if the Disk Group is +DATA the value will be set to '+DATA'. Note that redo logs are not used when the standby database is in recovery mode. Â By adjusting the redo log names to the Disk Group names, on activation the redo logs are created as ASM_FQSNÂ
- If using ASM on the Primary, but not using ASM on the standby database, a reference to a standby redo log is created as OMF if the primary database redo log is OMF (FS or ASM), and as non-OMF if a primary database redo log is non-OMF.
- If using ASM on the primary database and not using ASM on the standby database, Dbvisit Standby variable CSD_FORCE_ASM_REDO_CONVERT can be set to Y to force using Oracle parameter log_file_name_convert.
Redo Log Conversion Table
Primary Database Storage | Primary Database Redo type | Standby Database Storage | Standby Database Redo Type | Comment |
---|---|---|---|---|
Filesystem | FS | Filesystem | FS | log_file_name_convert set in the standby pfile to convert a primary filesystem directory to a standby filesystem directory |
Filesystem | OMF | Filesystem | OMF | log_file_name_convert not applicable, OMF creation must be enabled in the standby |
ASM | ASM_ALIAS | Filesystem | FS | log_file_name_convert set in the standby pfile to convert a primary ASM directory to a standby filesystem directory |
ASM | ASM_FQSN | Filesystem | OMF/FS | if CSD_FORCE_ASM_REDO_CONVERT set to N (default), an OMF log created, OMF creation must be enabled in the standby if CSD_FORCE_ASM_REDO_CONVERT set to Y, a FS log created, and log_file_name_convert set in the standby pfile to convert a primary ASM directory to a standby filesystem directory |
Filesystem | FS | ASM | ASM_DG | log_file_name_convert set in the standby pfile to convert a primary filesystem directory to a standby ASM diskgroup |
Filesystem | OMF | ASM | ASM_DG | log_file_name_convert set in the standby pfile to convert a primary filesystem directory to a standby ASM diskgroup |
Filesystem | ASM_FQSN | ASM | ASM_DG | log_file_name_convert set in the standby pfile to convert a primary ASM diskgroup to a standby ASM diskgroup |
Filesystem | ASM_ALIAS | ASM | ASM_DG | log_file_name_convert set in the standby pfile to convert a primary ASM diskgroup to a standby ASM diskgroup |
Â
Standby Database Temp Files
 If using Filesystem based storage on the standby database:
- Dbvisit creates an OMF temp file if a primary temp file is OMF of ASM_FQSN. Creation of OMF files must be enabled on the standby - this is done by setting Oracle parameters db_create_file_dest, db_create_online_log_dest_n and db_recovery_file_dest (see Oracle documentation for more detail on the use of OMF files)
- Dbvisit creates a FS temp file if a primary temp file is FS or ASM_ALIAS.Â
- For FS->FS conversion a parameter db_file_name_convert is set in the standby pfile
Â
 If using ASM based storage on standby database:
- Dbvisit creates an ASM_FQSF temp file regardless of the type of a primary temp file.
Â
Graceful Switchover (GS)
Redo log management on the new primary (original standby)
This section provides an overview of how Dbvisit Standby managed Redo Logs during the Graceful Switchover process.
Â
What happens if GS_FORCE_OMF_REDO = N
Â
If GS_FORCE_OMF_REDO = N (default) is set the following applies:
- Redo logs are created as either ASM_ALIAS (if using ASM) or FS (otherwise), In this case non OMF files are created in both cases
Â
Redo location on new primary
Dbvisit uses the following algorithm to determine location of redo logs on the new primary database during Graceful Switchover (in this particular order):
-  The first option is to use the location defined by variable DEFAULT_STDBY_REDO_LOC if set in a DDC file, otherwise
- Use OMF locations if creation of OMF files enabled - this is done by setting Oracle parameters db_create_file_dest, db_create_online_log_dest_n and db_recovery_file_dest (see Oracle documentation for more detail on the use of OMF files), otherwise
- Use redo locations referenced in the old standby control file, if storage type matches. For example, if the new primary does not use ASM storage, and the old standby control file referenced ASM redo logs, these location cannot be used; otherwise
- Default to use the location of the first SYSTEM datafile as the last option
Redo base names on new primary
Dbvisit uses DEFAULT_STDBY_REDO_NAME with default value "redo_%G_%N.log" as a name pattern when creating standby database redo logs where %N is counter starting from 1 and %G is the redo group number. These values can be adjusted in the DDC file.            Â
What happens if GS_FORCE_OMF_REDO = Y
If GS_FORCE_OMF_REDO = Y is set, the following applies:
- Redo logs are created as either ASM_FQSN (if using ASM) or OMF (otherwise), Oracle OMF files are used in both cases. Â Creation of OMF files must be enabled on the old standby prior to Graceful Switchover being executed (this is done by setting Oracle parameters db_create_file_dest, db_create_online_log_dest_n and db_recovery_file_dest - see Oracle documentation for more detail on the use of OMF files)
Â
WARNING
WARNING:
Creating OMF redo logs involve adding and dropping logfile groups.
If this step of Graceful Switchover fails, the new primary may be left with redo logs in a temporary location, and manual steps are required to recreate redo logfile groups.
Redo Locations on new primary database
Â
Â
If using ASM based storage
Â
Redo created as ASM_FQSN under the ASM diskgroup(s) determined by the following steps:
- The first option is to use the location defined by variable DEFAULT_STDBY_REDO_LOC - if set in a DDC file, otherwise
- The second option is to use OMF locations if creation of OMF files enabled - by setting Oracle parameters db_create_file_dest, db_create_online_log_dest_n and db_recovery_file_dest (see Oracle docs), otherwise
- Use redo locations referenced in the old standby control file, if storage type matches. For example, if the new primary does not use ASM storage, and the old standby control file referenced ASM redo logs, these location cannot be used; otherwise
- Use the same location as the first SYSTEM datafile as the last optionÂ
Redo are created under +DG/<db_unique_name>/onlinelog
Using filesystem based storage
On successful completion of Graceful Switchover Dbvisit recreates redo logfile groups as Oracle OMF files in locations set by Oracle parameters Oracle parameters db_create_file_dest, db_create_online_log_dest_n and db_recovery_file_dest - see Oracle docs http://docs.oracle.com/cd/E11882_01/server.112/e25494/omf.htm#ADMIN11487
Â
Redo base names on new primary database
Names are OS specific, check Oracle docs for your platform for OMF files naming conventions
Â
Redo logs in the new standby database
Names and locations left as defined in the old primaryÂ
Temp files in the new primary  Â
This section provides an overview of the temp file management during the graceful switchover process.
If ASM based storage is used:
Temp files created as ASM_FQSN under the ASM diskgroup(s) determined by the following steps:
- Use a location defined by variable DEFAULT_STDBY_TEMP_LOC if set in a DDC file, otherwise
- Use an OMF location if creation of OMF files enabled by setting the Oracle parameter db_create_file_dest (see Oracle docs), otherwise
- Use temp files locations referenced in the old standby control file, if storage type matches.  Example, if the new primary does not use ASM storage, and the old standby control file referenced ASM temp files, these location cannot be used; otherwise
- Use location of the first SYSTEM datafile as the last option
Temp files are created under +DG/<db_unique_name>/tempfile
If Filesystem based storage is used:
If creation of OMF files enabled by setting the Oracle parameter db_create_file_dest, temp files are created as OMF in this location, otherwise temp files will be created as FS in locations determined by the following steps:
- Use a location defined by variable DEFAULT_STDBY_TEMP_LOC if set in a DDC file, otherwise
- Use temp files locations referenced in the old standby control file, if storage type matches. For example, if the new primary does not use ASM storage, and the old standby control file referenced ASM temp files, these location cannot be used; otherwise
- Use location of the first SYSTEM datafile as the last optionÂ
Temp files in the new standby
Names and locations left as defined in the old primary
Â
Â
Â
Â
Â
Â
Â