리두 로그 삭제
2010. 4. 7. 14:23ㆍOracle/Oracle Study
반응형
테스트 디비를 백업을 할려고 보니 redo logfile 그룹이 3개라서 불필요한 것 같아 한개 그룹을 삭제하기로 하였습니다.
테스트 디비라고 하여 좀 안일하게 써온터라 데이터파일 용량도 커지고 로그 파일등 정리가 안되어있네요.
테스트 디비라고 무시말고 메인디비 쓰듯이 써야 할 것 같습니다. 소중하게..ㅎㅎ
날 잡아서 정리 좀 해야할 것 같네요.(메인디비 쓰듯이 써야할텐데..ㅡㅡ;;)
SQL> select a.group#, a.member, b.members, b.status
2 from v$logfile a, v$log b
3* where a.group#=b.group#
SQL> /
GROUP# MEMBER MEMBERS STATUS
---------- ---------------------------------------- ---------- --------
3 /oracle/oradata/PROD/Disk5/redo03a.log 2 INACTIVE
2 /oracle/oradata/PROD/Disk4/redo02a.log 2 INACTIVE
1 /oracle/oradata/PROD/Disk3/redo01a.log 2 CURRENT
1 /oracle/oradata/PROD/Disk5/redo01b.log 2 CURRENT
2 /oracle/oradata/PROD/Disk3/redo02b.log 2 INACTIVE
3 /oracle/oradata/PROD/Disk4/redo03b.log 2 INACTIVE
6 rows selected.
SQL> alter database drop logfile group 3;
Database altered.
SQL> select a.group#, a.member, b.members, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#;
GROUP# MEMBER MEMBERS STATUS
---------- ---------------------------------------- ---------- --------
2 /oracle/oradata/PROD/Disk4/redo02a.log 2 INACTIVE
1 /oracle/oradata/PROD/Disk3/redo01a.log 2 CURRENT
1 /oracle/oradata/PROD/Disk5/redo01b.log 2 CURRENT
2 /oracle/oradata/PROD/Disk3/redo02b.log 2 INACTIVE
SQL> alter system switch logfile;
System altered.
SQL> select a.group#, a.member, b.members, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#;
GROUP# MEMBER MEMBERS STATUS
---------- ---------------------------------------- ---------- --------
2 /oracle/oradata/PROD/Disk4/redo02a.log 2 CURRENT
1 /oracle/oradata/PROD/Disk3/redo01a.log 2 ACTIVE
1 /oracle/oradata/PROD/Disk5/redo01b.log 2 ACTIVE
2 /oracle/oradata/PROD/Disk3/redo02b.log 2 CURRENT
SQL> alter system switch logfile;
System altered.
SQL> select a.group#, a.member, b.members, b.status
2 from v$logfile a, v$log b
3 where a.group#=b.group#;
GROUP# MEMBER MEMBERS STATUS
---------- ---------------------------------------- ---------- --------
2 /oracle/oradata/PROD/Disk4/redo02a.log 2 INACTIVE
1 /oracle/oradata/PROD/Disk3/redo01a.log 2 CURRENT
1 /oracle/oradata/PROD/Disk5/redo01b.log 2 CURRENT
2 /oracle/oradata/PROD/Disk3/redo02b.log 2 INACTIVE
SQL>
반응형
'Oracle > Oracle Study' 카테고리의 다른 글
오라클 10.2.0.1.0 설치 (0) | 2010.09.08 |
---|---|
Oracle Analytic Function(분석함수) (0) | 2010.05.24 |
serveroutput 단순 예 (0) | 2010.02.23 |
SGA 자동관리 전환 (0) | 2010.02.17 |
set echo on & set feedback off (0) | 2010.02.16 |