记录一次oracle启动报错
原因:根分区告急,删除了trance和alert中3天前的文件。 重启主机后,startup 报错:
SQL> startup ORACLE instance started. Total System Global Area 771751936 bytes Fixed Size 2929160 bytes Variable Size 532680184 bytes Database Buffers 230686720 bytes Redo Buffers 5455872 bytes Database mounted. ORA-03113: end-of-file on communication channel Process ID: 12192 Session ID: 1 Serial number: 62516
1.查看启动日志:
$ cd /data/oracle/app/oracle/diag/rdbms/orclstart/orclstart/trace $ tail -f -n 500 alert_orclstart.log Errors in file /data/oracle/app/oracle/diag/rdbms/orclstart/orclstart/trace/orclstart_arc3_12204.trc: ORA-19815: WARNING: db_recovery_file_dest_size of 4781506560 bytes is 100.00% used, and has 0 remaining bytes available. Thu Dec 13 10:53:19 2018 ************************************************************************ You have following choices to free up space from recovery area: 1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard, then consider changing RMAN ARCHIVELOG DELETION POLICY. 2. Back up files to tertiary device such as tape using RMAN BACKUP RECOVERY AREA command. 3. Add disk space and increase db_recovery_file_dest_size parameter to reflect the new space. 4. Delete unnecessary files using RMAN DELETE command. If an operating system command was used to delete files, then use RMAN CROSSCHECK and DELETE EXPIRED commands. ************************************************************************
2.这里选择清理闪回区文件
$ sqlplus / as sysdba SQL> startup mount; SQL> show parameter db_recovery; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /data/oracle/app/oracle/recovery_area db_recovery_file_dest_size big integer 4560M SQL> select file_type,PERCENT_SPACE_USED,NUMBER_OF_FILES from v$flash_recovery_area_usage; FILE_TYPE PERCENT_SPACE_USED NUMBER_OF_FILES ----------------------- ------------------ --------------- CONTROL FILE 0 0 REDO LOG 0 0 ARCHIVED LOG 82.2 94 BACKUP PIECE 16.92 2 IMAGE COPY 0 0 FLASHBACK LOG 0 0 FOREIGN ARCHIVED LOG 0 0 AUXILIARY DATAFILE COPY 0 0 8 rows selected.
1)进入闪回区目录,习惯性先备份,以备人品不好的时候。然后删除三天前的文件。
2)进入rman
$ rman RMAN>connect target sys/密码 crosscheck backup; delete obsolete; delete expired backup; crosscheck archivelog all; delete expired archivelog all; 此步会有提示,输入 YES 回车
3.打开数据库
进入sqlplus / as sysdba
SQL> select * from V$FLASH_RECOVERY_AREA_USAGE; FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE ----------------------- ------------------ ------------------------- NUMBER_OF_FILES CON_ID --------------- ---------- CONTROL FILE 0 0 0 0 REDO LOG 0 0 0 0 ARCHIVED LOG 0 0 0 0 FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE ----------------------- ------------------ ------------------------- NUMBER_OF_FILES CON_ID --------------- ---------- BACKUP PIECE 16.92 0 2 0 IMAGE COPY 0 0 0 0 FLASHBACK LOG 0 0 0 0 FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE ----------------------- ------------------ ------------------------- NUMBER_OF_FILES CON_ID --------------- ---------- FOREIGN ARCHIVED LOG 0 0 0 0 AUXILIARY DATAFILE COPY 0 0 0 0 SQL> alter database open; Database altered. SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDBSTARTORCL READ WRITE NO
起监听。OK