归档日志空间满导致DB启动失败

现象

登录失败

 

告警日志:

由此可知,归档日志空间已满

 

解决方式:

一、增大归档日志空间

1、启动数据库至nomount

 1 [oracle@CentOS ~]$ sqlplus / as sysdba
 2 
 3 SQL*Plus: Release 11.2.0.1.0 Production on Sat Mar 24 10:12:51 2018
 4 
 5 Copyright (c) 1982, 2009, Oracle.  All rights reserved.
 6 
 7 Connected to an idle instance.
 8 
 9 SQL> startup nomount
10 ORACLE instance started.
11 
12 Total System Global Area  776646656 bytes
13 Fixed Size            2217384 bytes
14 Variable Size          583010904 bytes
15 Database Buffers      188743680 bytes
16 Redo Buffers            2674688 bytes
17 SQL> show parameter db_recovery_file_dest_size
18 
19 NAME                     TYPE     VALUE
20 ------------------------------------ ----------- ------------------------------
21 db_recovery_file_dest_size         big integer 3882M
22 SQL> show parameter db_recovery_file_dest
23 
24 NAME                     TYPE     VALUE
25 ------------------------------------ ----------- ------------------------------
26 db_recovery_file_dest             string     /u01/app/oracle/flash_recovery
27                          _area
28 db_recovery_file_dest_size         big integer 3882M

 

查看db_recovery_file_dest路径在磁盘空间中是否有足够空间

1 [root@CentOS ~]# df -h
2 文件系统          容量  已用  可用 已用%% 挂载点
3 /dev/sda6              56G   24G   30G  45% /
4 tmpfs                 932M  480M  452M  52% /dev/shm
5 /dev/sda1             194M   32M  152M  18% /boot
6 /dev/sda2              20G   18G  1.4G  93% /home
7 /dev/sda3              20G  592M   19G   4% /opt
8 .host:/                40G   15G   25G  38% /mnt/hgfs

 

增加归档空间

 1 SQL> ALTER SYSTEM SET db_recovery_file_dest_size=10g scope=both; 2 3 System altered. 

 启动数据库

 1 SQL> shutdown immediate;
 2 ORA-01507: database not mounted
 3 
 4 
 5 ORACLE instance shut down.
 6 SQL> startup
 7 ORACLE instance started.
 8 
 9 Total System Global Area  776646656 bytes
10 Fixed Size            2217384 bytes
11 Variable Size          583010904 bytes
12 Database Buffers      188743680 bytes
13 Redo Buffers            2674688 bytes
14 Database mounted.
15 Database opened.

 如有必要,清理归档日志

查看归档日志

 1 [oracle@CentOS ~]$ rman target /
 2 
 3 Recovery Manager: Release 11.2.0.1.0 - Production on Sat Mar 24 11:32:05 2018
 4 
 5 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 6 
 7 connected to target database: VMDB (DBID=4152029682)
 8 
 9 RMAN> crosscheck archivelog all;
10 
11 using target database control file instead of recovery catalog
12 allocated channel: ORA_DISK_1
13 channel ORA_DISK_1: SID=36 device type=DISK
14 ......

 

清理七天前的归档日志

 1 RMAN> DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';
 2 
 3 released channel: ORA_DISK_1
 4 allocated channel: ORA_DISK_1
 5 channel ORA_DISK_1: SID=36 device type=DISK
 6 List of Archived Log Copies for database with db_unique_name VMDB
 7 =====================================================================
 8 
 9 Key     Thrd Seq     S Low Time 
10 ------- ---- ------- - ---------
11 2       1    41      A 02-AUG-17
12         Name: /u01/app/oracle/flash_recovery_area/VMDB/archivelog/2017_08_03/o1_mf_1_41_dr44tg7r_.arc
13 
14 3       1    42      A 03-AUG-17
15         Name: /u01/app/oracle/flash_recovery_area/VMDB/archivelog/2017_08_03/o1_mf_1_42_dr650bv8_.arc
16 
17 4       1    43      A 03-AUG-17
18         Name: /u01/app/oracle/flash_recovery_area/VMDB/archivelog/2017_08_04/o1_mf_1_43_dr73pv06_.arc
19 
20 ......

 

 

 

参考资料

https://zhidao.baidu.com/question/1575284660590623380.html

 

转载于:https://www.cnblogs.com/ZeroTiny/p/8629795.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值