User Tools

Site Tools


redo_logs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
redo_logs [2015/12/18 10:27] – created z0hpvkredo_logs [2025/03/08 22:24] (current) – external edit 127.0.0.1
Line 3: Line 3:
 ==== Resizing Online ==== ==== Resizing Online ====
  
-=== Add New Online Redo Log Groups ===+=== Add New Log Groups ===
  
 If we are using OMF then all that is needed is the below 3 commands. If we are using OMF then all that is needed is the below 3 commands.
Line 20: Line 20:
   2  '/u02/app/oradata/redo06a.log',     2  '/u02/app/oradata/redo06a.log',  
   3  '/u03/app/oradata/redo06b.log') SIZE 500M;</code>   3  '/u03/app/oradata/redo06b.log') SIZE 500M;</code>
 +  
 +To add a log file to an existing redo log group ...
 +<code>ALTER DATABASE ADD LOGFILE MEMBER TO GROUP 1;</code>
 +Note that the status of the logfile will be invalid before it is used.
 +
 +=== Check Status of Current Logs ===
 +
 +<code>SELECT GROUP#, STATUS FROM V$LOG;</code>
 +
 +=== Drop Old Logs ===
 +
 +You cannot drop log files if their status is ACTIVE or CURRENT. \\
 +
 +If the log file you want to drop is CURRENT then
 +<code>ALTER SYSTEM SWITCH LOGFILE;</code>
 +
 +If the log file you want to drop is ACTIVE then
 +<code>ALTER SYSTEM CHECKPOINT GLOBAL;</code>
 +
 +<code>ALTER DATABASE DROP LOGFILE GROUP 1;
 +ALTER DATABASE DROP LOGFILE GROUP 2;
 +ALTER DATABASE DROP LOGFILE GROUP 3;</code>
 +
 +To drop individual log files from within a group ...
 +<code>ALTER DATABASE DROP LOGFILE MEMBER '<Full Filename>';</code>
 +
 +=== View Current Log Files ===
 +
 +<code>set linesize 120
 +col MEMBER format a60
 +SELECT A.GROUP#, A.MEMBER, B.BYTES
 +FROM V$LOGFILE A, V$LOG B WHERE A.GROUP# = B.GROUP#;</code>
  
redo_logs.1450434459.txt.gz · Last modified: 2025/03/08 22:23 (external edit)