Oracle
如何清理存檔日誌
Oralce 12c ASM 如何清理存檔日誌。由於存檔磁碟組已滿,Oracle 實例未啟動,這是我的 TEST DB 我不想擴展磁碟組,所以我想刪除所有存檔日誌。
SQL> startup ORACLE instance started. Total System Global Area 738197504 bytes Fixed Size 2928776 bytes Variable Size 314576760 bytes Database Buffers 415236096 bytes Redo Buffers 5455872 bytes Database mounted. ORA-03113: end-of-file on communication channel Process ID: 31849 Session ID: 124 Serial number: 41214
警報日誌
> NOTE: Assigning number (1,0) to disk (/dev/DG-DISK3) SUCCESS: mounted > group 1 (ARCH) NOTE: grp 1 disk 0: ARCH_0000 path:/dev/DG-DISK3 Wed > Aug 24 03:50:11 2016 Unable to create archive log file '+ARCH' Wed Aug > 24 03:50:11 2016 Errors in file > /u01/app/oracle/diag/rdbms/asmdb1/ASMDB1/trace/ASMDB1_ora_338.trc: > ORA-19504: failed to create file "+ARCH" ORA-17502: ksfdcre:4 Failed > to create file +ARCH ORA-15041: diskgroup "ARCH" space exhausted ARCH: > Error 19504 Creating archive log file to '+ARCH' Wed Aug 24 03:50:11 > 2016 Errors in file > /u01/app/oracle/diag/rdbms/asmdb1/ASMDB1/trace/ASMDB1_ora_338.trc: > ORA-16038: log 2 sequence# 143 cannot be archived ORA-19504: failed to > create file "" ORA-00312: online log 2 thread 1: > '+DATA/ASMDB1/ONLINELOG/group_2.262.917061333' USER (ospid: 338): > terminating the instance due to error 16038 Wed Aug 24 03:50:11 2016 > System state dump requested by (instance=1, osid=338), > summary=[abnormal instance termination]. System State dumped to trace > file > /u01/app/oracle/diag/rdbms/asmdb1/ASMDB1/trace/ASMDB1_diag_32746_20160824035011.trc > Wed Aug 24 03:50:11 2016 Dumping diagnostic data in > directory=[cdmp_20160824035011], requested by (instance=1, osid=338), > summary=[abnormal instance termination]. Wed Aug 24 03:50:12 2016 > Instance terminated by USER, pid = 338
以模式啟動實例
MOUNT
,刪除日誌,然後打開數據庫。$ rman target / RMAN> startup mount RMAN> delete force noprompt archivelog all; RMAN> alter database open;