小知识:RMAN备份当前控制文件报错ORA-245
在一个备份的case上遇到备份控制文件报错ORA-245,最终通过修改snapshot controlfile默认位置到ASM磁盘组后解决。
1.问题复现
回来后就想快速记录下这个小知识点,打开尘封的测试环境,结果测试环境上居然没复现?!
RMAN> backup current controlfile format '/tmp/current_%d_%s_%p_%T.ctl';
Starting backup at 12-JAN-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 12-JAN-22
channel ORA_DISK_1: finished piece 1 at 12-JAN-22
piece handle=/tmp/current_PROD_8_1_20220112.ctl tag=TAG20220112T174122 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 12-JAN-22
Starting Control File and SPFILE Autobackup at 12-JAN-22
piece handle=/opt/app/oracle/product/11.2.0/dbhome_1/dbs/c-495072076-20220112-03 comment=NONE
Finished Control File and SPFILE Autobackup at 12-JAN-22
RMAN>
再次尝试,在另外节点有业务的情况下,部分复现(备份控制文件ok,只是自动备份那里报错了):
RMAN> backup current controlfile format '/tmp/current_%d_%s_%p_%T.ctl';
Starting backup at 12-JAN-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=59 instance=prod1 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 12-JAN-22
channel ORA_DISK_1: finished piece 1 at 12-JAN-22
piece handle=/tmp/current_PROD_10_1_20220112.ctl tag=TAG20220112T174247 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 12-JAN-22
Starting Control File and SPFILE Autobackup at 12-JAN-22
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1 channel at 01/12/2022 17:42:50
ORA-00245: control file backup failed; target is likely on a local file system
继续模拟在另外节点有业务的情况下(简单模拟就是在备份的时候疯狂去切日志),终于复现了(备份控制文件就报错ORA 245了):
RMAN> backup current controlfile format '/tmp/current_%d_%s_%p_%T.ctl';
Starting backup at 12-JAN-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/12/2022 17:43:28
ORA-00245: control file backup failed; target is likely on a local file system
2.解决方案
当前默认配置:
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name PROD are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_prod1.f'; # default
修改 SNAPSHOT CONTROLFILE 路径到ASM磁盘组中:
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/PROD/snapcf_prod1.f';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/PROD/snapcf_prod1.f';
new RMAN configuration parameters are successfully stored
再次测试,无论备份时另外节点如何疯狂去切日志,都会成功备份。
小知识:RMAN备份当前控制文件报错ORA-245的更多相关文章
- asm单机dg dbca报错ORA-01031 CRS-2676,rman restore主库控制文件报错ORA-15081
dg-> ll $ORACLE_HOME/bin/oracle -r-xr-s--x 1 oracle asmadmin 210824714 Nov 20 16:41 /u01/app/orac ...
- RMAN备份恢复 控制文件和归档日志丢失情况
RMAN> backup current controlfile tag='bak_ctlfile' format='/home/oracle/backup/bak_ctl_%U_%T'; al ...
- RMAN备份到NFS,报错 ORA-27054
使用RMAN备份数据库到NFS挂载到的本地目录/backup 失败,失败提示如下: RMAN-03009: failure of backup command on ORA_DISK_1 channe ...
- 重建控制文件报错 ORA-01503 ORA-01192
1. 错误信息 ORA-: CREATE CONTROLFILE failed ORA-: must have at least one enabled thread 2. 重建脚本 CREATE C ...
- RMAN数据库恢复之控制文件和参数文件恢复
一.控制文件的恢复1.查询控制文件的路径 SQL> SELECT * FROM V$CONTROLFILE; STATUS NAME IS_RECOVERY_DEST_FILE BLOCK_SI ...
- Oracle控制文件多路复用以及Oracle备份重建控制文件
控制文件中记录了oracle数据库的物理结构,也就是记录了数据库数据文件和日志文件的位置,控制文件中还记录了多种SCN,用这些SCN来确定数据文件和日志文件是否是正确的.如果不正确那么数据库就需要恢复 ...
- 【python】python读取文件报错UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in position 2: illegal multibyte sequence
python读取文件报错UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in position 2: illegal multibyte ...
- [转]解决IIS下UTF-8文件报错乱码的问题
找了两天才找到解决办法…….晕晕晕...用第二种方法解决了. 网上找到的方法都没有写这一条 If objASPError.ASPDescription > "" Then 后 ...
- AndroidStudio 点9图片文件报错
如果项目中不仅9图报错,包含的资源还有一堆不合法PNG,那怎么办???这种情况下,正确的解决办法是找到build.gradle文件,在buildToolsVersion下面加入以下两句: aaptOp ...
- maven 的 pom.xml 文件报错:ArtifactTransferException: Failure to transfer
因为maven下载依赖jar包时,特别慢,所以取消了下载过程,再次打开eclipse时,maven的pom.xml文件报错如下: ArtifactTransferException: Failure ...
随机推荐
- vue项目部署的最佳实践
前言 使用vue.react.angular等技术开发过程中,我们都会遇到以下问题: 首屏加载慢 每一次更新都需要清除浏览器缓存才能看到效果(经常被测试吐槽) 这两个问题可以从很多方面进行优化,今天我 ...
- spring,springBoot配置类型转化器Converter以及FastJsonHttpMessageConverter,StringHttpMessageConverter 使用
转载请注明出处: https://i.cnblogs.com/posts/edit;postId=14045507 spring,spring boot 等框架项目通过@RequestBody,@Re ...
- Nacos源码 (4) 配置中心
本文阅读nacos-2.0.2的config源码,编写示例,分析推送配置.监听配置的原理. 客户端 创建NacosConfigService对象 Properties properties = new ...
- npm, yarn和pnpm清理缓存
.markdown-body { line-height: 1.75; font-weight: 400; font-size: 16px; overflow-x: hidden; color: rg ...
- 如何在Typora中跳转到文本内的指定位置?
1.问题 网上写的使用HTML锚点,在typora并不适用 如 跳转 你好 2.解决 参考链接 https://segmentfault.com/q/1010000018057010 https:// ...
- [STM32H7] 实战技能分享,如何让工程代码各种优化等级通吃,含MDK AC5,AC6,IAR和GCC
引出问题: 一个好的工程项目代码,特别是开源类的,如果能做到各种优化等级通吃,是一种非常好的工程案例,这样别人借鉴的时候,可以方便的适配到自己工程里.但实际项目中,针对一款产品代码,我们一般不会 ...
- .NET技术面试题系列(2) -sql server数据库优化规范
1.数据库优化规范 a.索引 每个表格都要求建立主键,主键上不一定需要强制建立聚集索引. 聚集索引,表中存储的数据按照索引的顺序存储,即逻辑顺序决定了表中相应行的物理顺序,因此聚集索引的字段值应是不会 ...
- IL合集二
引言 在第一篇关于IL的文章中,我们写了一些IL的相加,创建对象,循环以及实现TryCatch的一些功能,接下来,为大家带上后续关于IL的更新,其中包括,类型转换,以及条件判断,还有定义字段,定义属性 ...
- [转帖]oracle 11g 分区表创建(自动按年、月、日分区)
https://www.cnblogs.com/yuxiaole/p/9809294.html 前言:工作中有一张表一年会增长100多万的数据,量虽然不大,可是表字段多,所以一年下来也会达到 1G ...
- [转帖]tidb关闭sql_mode=ONLY_FULL_GROUP_BY模式
报错: 1 of ORDER BY clause is not in SELECT list, references column 'xxx' which is not in SELECT list ...