[oracle@pre-oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 2214:48:50 2023
Copyright (c)1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> startup;
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 252
Session ID: 1 Serial number: 3
解决方法1:增大闪回恢复区
#查看当前大小
SQL> show parameter db_recovery_file_dest_size;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest_size big integer 2G
#更改系统配置
SQL> alter system setdb_recovery_file_dest_size=20G scope=spfile;
系统已更改。
SQL> alter database open;
数据库已更改。
SQL> show parameter db_recovery_file_dest_size;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest_size big integer 20G
SQL> alter database open noresetlogs;
Database altered. #提示这个就好#启动验证
SQL> startup
解决方法2:使用rman删除存档日志
查看归档日志使用情况
SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;#关注第二列使用百分比 PERCENT_SPACE_USED
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
清空归档日志
$ rman target /
#查看可以所有的归档文件
RAM> crosscheck archivelog all;#清空过期的归档文件
RAM> delete expired archivelog all;#删除七天前的归档日志
RMAN> DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';#说明:SYSDATA-7,表明当前的系统时间7天前,before关键字表示在7天前的归档日志,如果使用了闪回功能,也会删除闪回的数据。同样道理,也可以删除从7天前到现在的全部日志,不过这个命令要考虑清楚,做完这个删除,最好马上进行全备份数据库#说明删除从7天前到现在的全部日志,慎用!!!
DELETE ARCHIVELOG from TIME 'SYSDATE-7';