Archiving Redo log   «Prev  Next»
Lesson 5Manually archiving a log file
ObjectiveManually archive one or more log files

Manually archiving Log file

You may choose not to enable automatic archiving for your database if you are archiving to a location that is not always accessible. You may be archiving directly to tape, for example, and may not want to leave the archival tape permanently mounted in the drive. In such a situation, you can periodically mount the tape, archive whatever log files have been filled, and then dismount the tape. Note that you would have to repeat the process throughout the day, and the interval after which you would repeat the process would depend on the number and size of your redo log files and the rate that that redo was being generated.
The ALTER SYSTEM command may be used to archive one or more log files manually.
The following diagram describes the syntax used for this purpose:

  1. Identifies the thread number. This is necessary only in Oracle Parallel Server environments.
  2. Archives the log file corresponding to the specified sequence number.
  3. Archives the log files containing the specified system change number.
  4. Archives the current redo log file. Note that Oracle will do a log switch first.
  5. Archives the specified redo log file group.
  6. Archives the named log file.
  7. Archives the next log file in the sequence that needs archiving.
  8. Archives all log files that haven't been archived yet.
  9. Allows you to override the archive log destination for this one operation.
manually Archiving Log Files
In normal database operations, the NEXT and ALL options are the most useful. For example, if you were periodically archiving all your log files to tape, you would use this command:

In addition to the ALTER SYSTEM SQL statement, the NEXT and ALL options may be used with the Server Manager ARCHIVE LOG command. So if you were using Server Manager, you could issue an ARCHIVE LOG ALL command.
In the next lesson, you will learn how to view a list of the log history.