现象
登录失败
告警日志:
由此可知,归档日志空间已满
解决方式:
一、增大归档日志空间
1、启动数据库至nomount
[oracle@CentOS ~]$ sqlplus / as sysdba SQL Production :: Copyright (c) , , Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount ORACLE instance started. Total System Global Area bytes Fixed Size bytes Variable Size bytes bytes Redo Buffers bytes SQL> show parameter db_recovery_file_dest_size NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest_size big integer 3882M SQL> show parameter db_recovery_file_dest NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /u01/app/oracle/flash_recovery _area db_recovery_file_dest_size big integer 3882M
查看db_recovery_file_dest路径在磁盘空间中是否有足够空间
[root@CentOS ~]# df -h 文件系统 容量 已用 可用 已用%% 挂载点 /dev/sda6 56G 24G 30G % / tmpfs 932M 480M 452M % /dev/shm /dev/sda1 194M 32M 152M % /boot /dev/sda2 20G 18G .4G % /home /dev/sda3 20G 592M 19G % /opt .host:/ 40G 15G 25G % /mnt/hgfs
增加归档空间
SQL System altered.
启动数据库
SQL> shutdown immediate; ORA: database not mounted ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area bytes Fixed Size bytes Variable Size bytes bytes Redo Buffers bytes Database mounted. Database opened.
如有必要,清理归档日志
查看归档日志
[oracle@CentOS ~]$ rman target / Recovery Manager: Release :: Copyright (c) , , Oracle and/or its affiliates. All rights reserved. connected ) RMAN> crosscheck archivelog all; using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID device type=DISK ......
清理七天前的归档日志
RMAN> DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7'; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID device type=DISK List of Archived Log Copies for database with db_unique_name VMDB ===================================================================== Key Thrd Seq S Low Time ------- ---- ------- - --------- A Name: /o1_mf_1_41_dr44tg7r_.arc A Name: /o1_mf_1_42_dr650bv8_.arc A Name: /o1_mf_1_43_dr73pv06_.arc ......
参考资料