Logfile,to be dropped,should not be CURRENT(written by LGWR process) or ACTIVE(needed for instance recovery,means that it is now being archived).It must be in INACTIVE state.If logfile is in CURRENT state run this command to make it ACTIVE:
SQL>alter system switch logfile;
see the status:
select * from v$log
At this moment it is ACTIVE if we wait for a while(or manually make it inactive by runing ALTER SYSTEM CHECKPOINT; command which will force logfile to be archived ),ARCn will archive this logfile and its current status will be INACTIVE,at this moment this logfile can be dropped.
*NOTE i have 3 group and one member in each group.
SQL> alter database drop logfile group 1;
Add new one,with different size:
SQL> alter database add logfile group 1 'C:\oracle\product\oradata\MFD\REDO01.LOG' size 500m reuse;
*NOTE that real file is not deleted and that is why i used the command reuse.
See the size:
select t.bytes/1024/1024 from v$log t
To see percentage of used space in current logfile:
SELECT le.leseq "Current log sequence No",
100*cp.cpodr_bno/le.lesiz "Percent Full",
cp.cpodr_bno "Current Block No",
le.lesiz "Size of Log in Blocks"
FROM x$kcccp cp, x$kccle le
WHERE le.leseq =CP.cpodr_seq
AND bitand(le.leflg,24) = 8
No comments:
Post a Comment