RelationalDBDesignRelationalDBDesign


Database Architecture   «Prev  Next»
Lesson 11Looking at redo log information
ObjectiveFind information about the redo logs in your database.

Looking at Oracle redo log information

Listing redo log groups

Two system views, V$LOG and V$LOGFILE, give you information about the redo log files for your database. The following example shows how you can query the V$LOG view to list the redo log groups in your database:

SVRMGR> SELECT group#, members, bytes, status

     2> FROM v$log;

GROUP#     MEMBERS    BYTES      STATUS

---------- ---------- ---------- ----------------

         1          2     204800 CURRENT

         2          2     204800 INACTIVE

         3          2     204800 INACTIVE

3 rows selected.

In this example, there are three redo log groups. The redo log file sizes are 200K, or 204,800 bytes, and there are two members in each group. The status of group #1 is CURRENT, which means that Oracle is currently writing to the log files in that group.

Finding the file names of the redo log files

You can use the V$LOGFILE view to find out the actual filenames of the log files. The following example shows how:


SVRMGR> SELECT group#, member
2> FROM v$logfile
3> ORDER BY group#;
GROUP#     MEMBER

---------- --------------------------------------
1 C:\ORANT\DATABASE\LOG2ORCL.ORA
1 D:\ORANT\DATABASE\LOG2ORCL.ORA
2 C:\ORANT\DATABASE\LOG1ORCL.ORA
2 D:\ORANT\DATABASE\LOG1ORCL.ORA
3 C:\ORANT\DATABASE\LOG3ORCL.ORA
3 D:\ORANT\DATABASE\LOG3ORCL.ORA

6 rows selected.

There are six groups, with two members each, for a total of six redo log files. Notice that members of each group are on separate disks in order to provide redundancy, and protect the data in the event that one disk fails. Later in this course, when you start to create your own database, you will learn how to create these files, and specify which disks to use. Next, you will learn about archive log files.

Redo Log Info - Quiz

Click the Quiz link below to see how well you have learned the material so far.
Redo Log Info - Quiz