【故障处理】ORA-19809错误处理
【故障处理】ORA-19809错误处理
一.1 BLOG文档结构图
一.2 前言部分
一.2.1 导读和注意事项
各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:
① ORA-19809: limit exceeded for recovery files错误的处理方法
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/26/2016 17:35:35
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 68157440 bytes disk space from 4385144832 limit
② 闪回恢复区占用大小的查询
Tips:
① 本文在ITpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和微信公众号(xiaomaimiaolhr)有同步更新
② 文章中用到的所有代码,相关软件,相关资料请前往小麦苗的云盘下载(http://blog.itpub.net/26736162/viewspace-1624453/)
③ 若文章代码格式有错乱,推荐使用搜狗、360或QQ浏览器,也可以下载pdf格式的文档来查看,pdf文档下载地址:http://blog.itpub.net/26736162/viewspace-1624453/
④ 本篇BLOG中命令的输出部分需要特别关注的地方我都用灰色背景和粉红色字体来表示,比如下边的例子中,thread 1的最大归档日志号为33,thread 2的最大归档日志号为43是需要特别关注的地方;而命令一般使用黄色背景和红色字体标注;对代码或代码输出部分的注释一般采用蓝色字体表示。
List of Archived Logs in backup set 11
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 32 1621589 2015-05-29 11:09:52 1625242 2015-05-29 11:15:48
1 33 1625242 2015-05-29 11:15:48 1625293 2015-05-29 11:15:58
2 42 1613951 2015-05-29 10:41:18 1625245 2015-05-29 11:15:49
2 43 1625245 2015-05-29 11:15:49 1625253 2015-05-29 11:15:53
[ZHLHRDB1:root]:/>lsvg -o
T_XDESK_APP1_vg
rootvg
[ZHLHRDB1:root]:/>
00:27:22 SQL> alter tablespace idxtbs read write;
====》2097152*512/1024/1024/1024=1G
本文如有错误或不完善的地方请大家多多指正,ITPUB留言或QQ皆可,您的批评指正是我写作的最大动力。
一.3 故障分析及解决过程
一.3.1 故障环境介绍
项目 |
source db |
db 类型 |
RAC |
db version |
11.2.0.4 |
db 存储 |
ASM |
OS版本及kernel版本 |
AIX 64位 6.1.0.0 |
一.3.2 故障发生现象及报错信息
rman执行0级全备的时候报错:
[ZFXDESKDB2:root]:/>su - oracle
[ZFXDESKDB2:oracle]:/oracle>ORACLE_SID=raclhr2
[ZFXDESKDB2:oracle]:/oracle>rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Jul 26 17:35:15 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: RACLHR (DBID=4156381309)
RMAN> backup incremental level 0 database;
Starting backup at 2016-07-26 17:35:19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=70 instance=raclhr2 device type=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/raclhr/datafile/sysaux.365.916601225
input datafile file number=00001 name=+DATA/raclhr/datafile/system.359.916601225
input datafile file number=00005 name=+DATA/raclhr/datafile/example.351.916601377
input datafile file number=00003 name=+DATA/raclhr/datafile/undotbs1.364.916601225
input datafile file number=00006 name=+DATA/raclhr/datafile/undotbs2.343.916601713
input datafile file number=00004 name=+DATA/raclhr/datafile/users.363.916601225
input datafile file number=00007 name=+DATA/raclhr/datafile/rsa_cm_data.519.917516173
input datafile file number=00008 name=+DATA/raclhr/datafile/rsa_cm_data.520.917516173
input datafile file number=00009 name=+DATA/raclhr/datafile/rsa_cm_data.521.917516173
input datafile file number=00010 name=+DATA/raclhr/datafile/ts_lhr.522.917516295
input datafile file number=00011 name=+DATA/raclhr/datafile/ts_lhr.523.917516295
input datafile file number=00012 name=+DATA/raclhr/datafile/ts_lhr.524.917516295
input datafile file number=00013 name=+DATA/raclhr/datafile/test.525.917516413
input datafile file number=00014 name=+DATA/raclhr/datafile/test.526.917516413
input datafile file number=00015 name=+DATA/raclhr/datafile/test.527.917516413
channel ORA_DISK_1: starting piece 1 at 2016-07-26 17:35:20
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/26/2016 17:35:35
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 68157440 bytes disk space from 4385144832 limit
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 2016-07-26 17:35:37
channel ORA_DISK_1: finished piece 1 at 2016-07-26 17:35:38
piece handle=+DATA/raclhr/backupset/2016_07_26/ncsnn0_tag20160726t173520_0.568.918236137 tag=TAG20160726T173520 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/26/2016 17:35:35
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 68157440 bytes disk space from 4385144832 limit
一.3.3 故障分析及解决过程
看着这个错误听陌生的,之前没有遇到过,oerr看一下解释:
[ZFXDESKDB2:oracle]:/oracle>oerr rman 3009
3009, 1, "failure of %s command on %s channel at %s"
// *Cause: This message should be accompanied by other error message(s)
// indicating the cause of the error.
// *Action: Check the accompanying errors.
[ZFXDESKDB2:oracle]:/oracle>oerr ora 19809
19809, 00000, "limit exceeded for recovery files"
//*Cause: The limit for recovery files specified by the
// DB_RECOVERY_FILE_DEST_SIZE was exceeded.
// *Action: There are five possible solutions:
// 1) Take frequent backup of recovery area using RMAN.
// 2) Consider changing RMAN retention policy.
// 3) Consider changing RMAN archived log deletion policy.
// 4) Add disk space and increase DB_RECOVERY_FILE_DEST_SIZE.
// 5) Delete files from recovery area using RMAN.
[ZFXDESKDB2:oracle]:/oracle>oerr ora 19804
19804, 00000, "cannot reclaim %s bytes disk space from %s limit"
// *Cause: Oracle cannot reclaim disk space of specified bytes from the
// DB_RECOVERY_FILE_DEST_SIZE limit.
// *Action: There are five possible solutions:
// 1) Take frequent backup of recovery area using RMAN.
// 2) Consider changing RMAN retention policy.
// 3) Consider changing RMAN archived log deletion policy.
// 4) Add disk space and increase DB_RECOVERY_FILE_DEST_SIZE.
// 5) Delete files from recovery area using RMAN.
由oerr的解释可以看出该错误是由于闪回恢复区大小参数DB_RECOVERY_FILE_DEST设置过小导致的,下边我们来修复该错误:
[ZFXDESKDB2:oracle]:/oracle>ORACLE_SID=raclhr2
[ZFXDESKDB2:oracle]:/oracle>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Aug 1 15:38:13 2016
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, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@raclhr2> show parameter DB_RECOVERY_FILE_DEST_SIZE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest_size big integer 4182M
SYS@raclhr2> alter system set db_recovery_file_dest_size=10G sid='*';
System altered.
SYS@raclhr2> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[ZFXDESKDB2:oracle]:/oracle>rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Mon Aug 1 15:46:58 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: RACLHR (DBID=4156381309)
RMAN> backup incremental level 0 database;
Starting backup at 2016-08-01 15:47:10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=67 instance=raclhr2 device type=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/raclhr/datafile/sysaux.365.916601225
input datafile file number=00001 name=+DATA/raclhr/datafile/system.359.916601225
input datafile file number=00005 name=+DATA/raclhr/datafile/example.351.916601377
input datafile file number=00003 name=+DATA/raclhr/datafile/undotbs1.364.916601225
input datafile file number=00006 name=+DATA/raclhr/datafile/undotbs2.343.916601713
input datafile file number=00004 name=+DATA/raclhr/datafile/users.363.916601225
input datafile file number=00007 name=+DATA/raclhr/datafile/rsa_cm_data.519.917516173
input datafile file number=00008 name=+DATA/raclhr/datafile/rsa_cm_data.520.917516173
input datafile file number=00009 name=+DATA/raclhr/datafile/rsa_cm_data.521.917516173
input datafile file number=00010 name=+DATA/raclhr/datafile/ts_lhr.522.917516295
input datafile file number=00011 name=+DATA/raclhr/datafile/ts_lhr.523.917516295
input datafile file number=00012 name=+DATA/raclhr/datafile/ts_lhr.524.917516295
input datafile file number=00013 name=+DATA/raclhr/datafile/test.525.917516413
input datafile file number=00014 name=+DATA/raclhr/datafile/test.526.917516413
input datafile file number=00015 name=+DATA/raclhr/datafile/test.527.917516413
channel ORA_DISK_1: starting piece 1 at 2016-08-01 15:47:12
channel ORA_DISK_1: finished piece 1 at 2016-08-01 15:47:57
piece handle=+DATA/raclhr/backupset/2016_08_01/nnndn0_tag20160801t154711_0.597.918748035 tag=TAG20160801T154711 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 2016-08-01 15:47:59
channel ORA_DISK_1: finished piece 1 at 2016-08-01 15:48:00
piece handle=+DATA/raclhr/backupset/2016_08_01/ncsnn0_tag20160801t154711_0.598.918748079 tag=TAG20160801T154711 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2016-08-01 15:48:00
RMAN> list backupset summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------- ------- ------- ---------- ---
1 B 0 A DISK 2016-07-26 17:35:37 1 1 NO TAG20160726T173520
2 B 0 A DISK 2016-08-01 15:47:51 1 1 NO TAG20160801T154711
3 B 0 A DISK 2016-08-01 15:47:59 1 1 NO TAG20160801T154711
一.4 故障处理总结
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 68157440 bytes disk space from 4385144832 limit
ORA-19809错误是由于闪回恢复区设置过小导致,只需要修改参数db_recovery_file_dest_size设置为更大的值即可解决问题,要想更深入分析该问题就得分析闪回恢复区里存放了哪些内容。
一.5 如何查看闪回恢复区大小的占用情况
我们从健康检查的脚本可以看出:
点击连接可以跳转到相应的部分:
数据库闪回空间使用情况
● 数据库闪回空间总体使用情况
NAME |
LIMIT |
USED_GB |
USED% |
RECLAIM |
NUMBER_OF_FILES |
+DATA |
10G |
5.953G |
59.531% |
4.154G |
144 |
[回到目录]
● 数据库闪回空间详细使用情况
FILE_TYPE |
USED_GB |
PERCENT_SPACE_USED |
PERCENT_SPACE_RECLAIMABLE |
RECLAIM_GB |
NUMBER_OF_FILES |
ARCHIVED LOG |
4.185 |
41.85 |
41.46 |
4.146 |
138 |
BACKUP PIECE |
1.619 |
16.19 |
.08 |
.008 |
3 |
CONTROL FILE |
0 |
0 |
0 |
0 |
0 |
FLASHBACK LOG |
0 |
0 |
0 |
0 |
0 |
FOREIGN ARCHIVED LOG |
0 |
0 |
0 |
0 |
0 |
IMAGE COPY |
0 |
0 |
0 |
0 |
0 |
REDO LOG |
.149 |
1.49 |
0 |
0 |
3 |
Total: |
5.953 |
59.53 |
41.54 |
4.154 |
144 |
[回到目录]
可以看出,闪回空间目前是10G,使用了将近60%,共144个文件,每种文件的占用情况参考如上的表格,可以看出主要是归档文件和备份集占用空间比较大。
有关健康检查报告中的用到的脚本如下:
闪回恢复区总大小:
SELECT NAME,
round(space_limit / 1024 / 1024 / 1024, 3) "LIMIT_GB",
round(space_used / 1024 / 1024 / 1024, 3) "USED_GB",
round(space_used / space_limit * 100, 3) "USED%",
round(space_reclaimable / 1024 / 1024 / 1024, 3) "RECLAIM_GB",
number_of_files
FROM v$recovery_file_dest v
WHERE v.SPACE_LIMIT<>0;
闪回恢复区详细使用大小:
SELECT nvl(frau.file_type,'<font color="#990000"><b>Total:</b></font>') file_type,
sum(round(frau.percent_space_used / 100 * rfd.space_limit / 1024 / 1024 / 1024,3)) USED_GB,
sum(frau.percent_space_used) percent_space_used,
sum(frau.percent_space_reclaimable) percent_space_reclaimable,
sum(round(frau.percent_space_reclaimable / 100 * rfd.space_limit / 1024 / 1024 / 1024,3)) RECLAIM_GB,
sum(frau.number_of_files) number_of_files
FROM v$flash_recovery_area_usage frau,
v$recovery_file_dest rfd
GROUP BY ROLLUP(file_type)
;
一.6 用到的SQL集合
0级全备:backup incremental level 0 database;
oerr查看错误:oerr rman 3009 、oerr ora 19809
设置闪回恢复区的大小:alter system set db_recovery_file_dest_size=10G sid='*';
------闪回恢复区总大小:
SELECT NAME,
round(space_limit / 1024 / 1024 / 1024, 3) "LIMIT_GB",
round(space_used / 1024 / 1024 / 1024, 3) "USED_GB",
round(space_used / space_limit * 100, 3) "USED%",
round(space_reclaimable / 1024 / 1024 / 1024, 3) "RECLAIM_GB",
number_of_files
FROM v$recovery_file_dest v
WHERE v.SPACE_LIMIT<>0;
-----闪回恢复区详细使用大小:
SELECT nvl(frau.file_type,'<font color="#990000"><b>Total:</b></font>') file_type,
sum(round(frau.percent_space_used / 100 * rfd.space_limit / 1024 / 1024 / 1024,3)) USED_GB,
sum(frau.percent_space_used) percent_space_used,
sum(frau.percent_space_reclaimable) percent_space_reclaimable,
sum(round(frau.percent_space_reclaimable / 100 * rfd.space_limit / 1024 / 1024 / 1024,3)) RECLAIM_GB,
sum(frau.number_of_files) number_of_files
FROM v$flash_recovery_area_usage frau,
v$recovery_file_dest rfd
GROUP BY ROLLUP(file_type)
;
About Me
..........................................................................................................................................................................................................
v 本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用
v 本文在ITpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新
v QQ群:230161599 微信群:私聊
v 本文地址:http://blog.itpub.net/26736162/viewspace-2122820/
v 本文pdf版:http://yunpan.cn/cdEQedhCs2kFz (提取码:ed9b)
v 小麦苗分享的其它资料:http://blog.itpub.net/26736162/viewspace-1624453/
v 联系我请加QQ好友(642808185),注明添加缘由
v 于 2016-08-01 15:00~ 2016-08-01 19:00 在中行完成
v 【版权所有,文章允许转载,但须以链接方式注明源地址,否则追究法律责任】
..........................................................................................................................................................................................................
长按识别二维码或微信客户端扫描下边的二维码来关注小麦苗的微信公众号:xiaomaimiaolhr,学习最实用的数据库技术。
【故障处理】ORA-19809错误处理的更多相关文章
- 【故障处理】CRS-1153错误处理
[故障处理]CRS-1153错误处理 1 CRS-1153: There was an error setting Oracle Clusterware to rolling patch mode. ...
- 【故障处理】IMP-00010错误 12C的dmp文件导入11G
[故障处理]IMP-00010错误 12C的dmp文件导入11G 1 BLOG文档结构图 2 前言部分 2.1 导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其 ...
- 【故障处理】ORA-12162 错误的处理
[故障处理]ORA-12162: TNS:net service name is incorrectly specified 一.1 场景 今天拿到一个新的环境,可是执行sqlplus / as s ...
- ORA 00972 错误处理
Oracle 11G SQL 写好的脚本执行后报错:ORA 00972 标识符过长 可能的原因一: select 语句中的字段别名太长,中文字符别名最长为10个汉字,简化别名名称,问题得到解决. 可能 ...
- navicat cannot load oci dll||oracle 改字符集为GBK后 navicat 连不上||Ora-28547 ora net错误
此段适用于 解决 navicat cannot load oci dll 环境 Navicat Premium 和 oracle 原因,navicat 32 和64 都只支持 32位的oci.dll ...
- 关于oracle 11g导出数据时 报 ORA 1455错误的处理
因为导出的该用户的表可能存在空数据表,那么可能就会出现此其异常. 首先: 查看: SQL>show parameter deferred_segment_creation; 假设为T ...
- plsql 连接oralce数据库,报ora 12557 tns 协议适配器不可加载错误
使用plsql 连接oracle 数据库报ora 12557 错误: 解决方案: 1:首先确保服务中的service以及监听器都开启 2:F:\app\Administrator\product\11 ...
- Oracle的常见错误及解决办法
ORA-12528: TNS:listener: all appropriate instances are blocking new connections ORA-12528问题是因为监听中的服务 ...
- ORA-19815,ORA-19809 :limit exceeded for recovery files
数据库重新启动的时候,收到了ORA-19815的错误.从错误的提示来看,是由于闪回区的空间被填满导致无法成功启动.这种情形我们通常考虑的是清除归档日志,那就直接在OS层面rm了,真的是这样吗?客官,如 ...
随机推荐
- golang几种常用配置文件使用方法总结(yaml、toml、json、xml、ini)
原文连接: https://blog.csdn.net/wade3015/article/details/83351776 yaml配置文件的使用方法总结 首先介绍使用yaml配置文件,这里使用的是g ...
- FineReport简单部署
一.部署方式 1.官网发布包部署 2.自定义tomcat部署 二.发布包部署 1.下载一个发布包:https://www.finereport.com/product/download 解压后打开bi ...
- ERROR: CAN'T FIND PYTHON EXECUTABLE "PYTHON", YOU CAN SET THE PYTHON ENV VARIABLE.解决办法
错误原因:Node.js 在安装模块的时候报错,缺少python环境. 解决办法: 第一种方式: 安装Python及环境变量配置 一定要安装python2.7的版本 环境变量安装可以参考:http:/ ...
- javafx这些学会后,开发就不难了,往tablecloumn列中添加按钮,修改javafx中tableview中tablecell中的值,修改完回车表示保存到内存中
javafx开发过程中遇见难题,往tablecloumn列中添加按钮 想了很久的方法,也配有办法判断每行中有数据的地方添加按钮set bank_caozuo.setCellFactory((col)- ...
- 【bat批处理】批量执行某个文件夹下的所有sql文件bat批处理
遍历文件夹下所有的sql文件,然后命令行执行 for /r "D:\yonyou\UBFV60\U9.VOB.Product.Other" %%a in (*.sql) do ( ...
- EF Code First 快速创建
以.net framework为例,包括数据库管理类库和启动项目两个项目文件 数据库管理类库 新建一个类库,名称为XXX.Database 管理nuget包,引入库EntityFramework 6. ...
- CentOS7.5 使用 kubeadm 安装配置 Kubernetes1.12(四)
在之前的文章,我们已经演示了yum 和二进制方式的安装方式,本文我们将用官方推荐的kubeadm来进行安装部署. kubeadm是 Kubernetes 官方提供的用于快速安装Kubernetes集群 ...
- linux 高级
linux命令: top 查看整机的性能: ----(看内存(mem)和cpu) 1:查看cpu的cpu的核数按1连续: 2:id=idle(空闲率),值越大越好, 3:load av ...
- netty的reactor模式
reactor中包含5个核心结构,那么从操作系统低层次的调度来看5部分是这样的. (1)Handle(句柄资源描述符)本质是对客户端连接上来以后发生事件的处理机制,比如连接成功,读取数据,发送数据等状 ...
- C++对象模型:单继承,多继承,虚继承,菱形虚继承,及其内存布局图
C++目前使用的对象模型: 此模型下,nonstatic数据成员被置于每一个类的对象中,而static数据成员则被置于类对象之外,static和nonstatic函数也都放在类对象之外(通过函数指针指 ...