Saturday, January 22, 2011

Structure - Redo Logs

Remove drop

alter database drop logfile member '<filename>';

add logfile members

alter database add logfile member '<filename>' to group <group>;


List members and sizes

col member format a60
col "Size MB" format 9,999,999
select lf.member
, ceil(lg.bytes / 1024 / 1024) "Size MB"
from v$logfile lf
, v$log lg
where lg.group# = lf.group#
order by 1
/
Output:
MEMBER                                                          Size MB
------------------------------------------------------------ ----------
+Q_FRA/orq2/onlinelog/log01a.dbf                                  512
+Q_FRA/orq2/onlinelog/log01b.dbf                                  512
+Q_FRA/orq2/onlinelog/log02a.dbf                                  512
+Q_FRA/orq2/onlinelog/log02b.dbf                                  512
+Q_FRA/orq2/onlinelog/log03a.dbf                                  512
+Q_FRA/orq2/onlinelog/log03b.dbf                                  512
+Q_FRA/orq2/onlinelog/log04a.dbf                                  512
+Q_FRA/orq2/onlinelog/log04b.dbf                                  512
+Q_FRA/orq2/onlinelog/log05a.dbf                                  512
+Q_FRA/orq2/onlinelog/log05b.dbf                                  512
+Q_FRA/orq2/onlinelog/log06a.dbf                                  512
+Q_FRA/orq2/onlinelog/log06b.dbf                                  512
12 rows selected.

No comments:

Post a Comment