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:

ConventionDescriptionExample
FSFilesystem non Oracle Managed Files (OMF)redo01.log
OMFFilesystem Oracle Managed Files (OMF)o1_mf_3_b4xty3xd_.log
ASM_FSQNASM with Fully Qualified System Name (OMF)+DATA/dbvlx102/onlinelog/group_3.284.862151837
ASM_ALIASASM alias+DATA/dbvlx102/onlinelog/redo1a
ASM_DGASM 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
FilesystemFSFilesystemFSlog_file_name_convert set in the standby pfile to convert a primary filesystem directory to a standby filesystem directory
FilesystemOMFFilesystemOMFlog_file_name_convert not applicable, OMF creation must be enabled in the standby
ASMASM_ALIASFilesystemFSlog_file_name_convert set in the standby pfile to convert a primary ASM directory to a standby filesystem directory
ASMASM_FQSNFilesystemOMF/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

FilesystemFSASMASM_DGlog_file_name_convert set in the standby pfile to convert a primary filesystem directory to a standby ASM diskgroup
FilesystemOMFASMASM_DGlog_file_name_convert set in the standby pfile to convert a primary filesystem directory to a standby ASM diskgroup
FilesystemASM_FQSNASMASM_DGlog_file_name_convert set in the standby pfile to convert a primary ASM diskgroup to a standby ASM diskgroup
FilesystemASM_ALIASASMASM_DGlog_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):

    1.  The first option is to use the location defined by variable DEFAULT_STDBY_REDO_LOC if set in a DDC file, otherwise
    2. 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
    3. 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
    4. 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:

    1. The first option is to use the location defined by variable DEFAULT_STDBY_REDO_LOC - if set in a DDC file, otherwise
    2. 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
    3. 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
    4. 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:

  1. Use a location defined by variable DEFAULT_STDBY_TEMP_LOC if set in a DDC file, otherwise
  2. Use an OMF location if creation of OMF files enabled by setting the Oracle parameter db_create_file_dest (see Oracle docs), otherwise
  3. 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
  4. 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:

  1. Use a location defined by variable DEFAULT_STDBY_TEMP_LOC if set in a DDC file, otherwise
  2. 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
  3. 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