1. 程式人生 > >記錄一次oracle啟動報錯

記錄一次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