RelationalDBDesign RelationalDBDesign


Archiving Redo log   «Prev  Next»
Lesson 4Naming archive log files
ObjectiveSpecify the naming convention to use for archived log files.

Naming archive log files

Just as you must specify a location for archived log files, you must also specify a naming convention. The log_archive_format initialization parameter is used to do that. The four special character sequences listed here may be used as part of the filename:

%s The log sequence number. This continually increments as redo log files are produced.
%t The log thread number, which uniquely identifies the instance producing the log file. This is necessary when the Parallel Server option is being used because the sequence numbers used by multiple instances will overlap.
%S The log sequence number, but as a fixed-width field padded to the left with zeros.
%T The thread number as a fixed-width field padded to the left with zeros.

The following mouseover illustrates a couple of typical settings and shows how the resulting filenames will look:
  1. The initialization parameter that specifies the format of archived log filenames.
  2. Archived log filenames will start with these characters
  3. Places the log sequence number into the name.
  4. Places the thread number into the name.
  5. The log sequence number as it will appear in the actual filename.
  6. The thread number as it will appear in the actual filename.
  7. The thread number in a fixed-width format.
  8. The log sequence number in a fixed-width format.
  9. The thread number appears as 001.
  10. The log sequence numbers also appear with leading zeros.
Naming Conventions for Archive Log Files
In the next lesson, you will learn how to enable automatic archiving so that you don't have to archive each log file manually.

Naming Archive LogFiles - Exercise

Naming Archive LogFiles - Exercise
For an exercise, work through the process of placing the COIN database into archivelog mode.