I have a few questions about redo logs.
- Is there any way to find out how often the redo logs are being archived?
- What command is used to figure out the size of the redo logs?
- Can I back up the redo logs?
To find out how often redo logs are being archived, query V$ARCHIVED_LOG. This view will have one entry for every archived redo log; then go back the number of days specified by your CONTROL_FILE_RECORD_KEEP_TIME parameter. The COMPLETION_TIME column will tell you when the log was archived. By querying this column for all archived redo logs in a specific time frame, you can see how often they were archived.
The size of your archived redo log can be seen in V$ARCHIVED_LOG as well in the BLOCKS column. Multiply the number of blocks by the value of the DB_BLOCK_SIZE initialization parameter to get the number of bytes. This value should be less than or equal to the size of your online redo log that originally held this information.
You do not back up your online redo logs. In fact, when RMAN does a full backup of the database, it skips the online redo logs. More times that I can count, I've seen people get into trouble when they try to restore online redo logs that they have backed up. You can backup your archived redo logs. RMAN does this quite nicely for you with the BACKUP ARCHIVELOG command.
Dig Deeper on Oracle database backup and recovery
Related Q&A from Brian Peasland
Oracle expert Brian Peasland answers one reader's question about common pitfalls when connecting Oracle to outside programs. Continue Reading
One reader asks expert Brian Peasland a question about datafile sizes with the Oracle RMAN duplicate 10g command. Continue Reading
Managing parent table-child table relations in Oracle SQL environments is key to efficient programming. Continue Reading