1. RMAN Repeatedly Fail To Backup Archivelogs with RMAN-20242

Cause:

There is a mis-match between the catalog contents and what is physically on disk in the archivelog directory.
Run the command:
  RMAN> list archivelog all;

# Compare the output with the contents of the archivelog directory.
  # RMAN-20242 is raised when we try to find a log in the rman repository that does not exist on disk.

Solution:
 
If logs are missing from the archivelog directory you need to determine why:

1. Logs have been moved to another location to prevent archivelog directory from filling up:
   - backup the logs currently in the archivelog directory using the syntax:

RMAN>backup archivelog sequence between n and n2 thread N delete input;

# Then move the missing logs back into the archivelog directory and back them up,
      # again with delete input option.

2. Logs have been irretrievably lost (deleted):
   - In this case you need to resolve the discrepancy between the rman repository contents and what is actually on disk;

RMAN> crosscheck archivelog all;
      RMAN> delete expired archivelog all;

# If you do this, full recovery using ANY backup taken before this point is not possible
      # as full recovery cannot tolerate gaps in the redo stream.  
      # Take another full hot backup as soon as possible and change operational processes such that archivelog
  
   # backups are run more frequently to prevent the archivelog
directory from getting full; NEVER delete archivelogs manually,
      # always use RMAN to housekeep archivelogs.

--

2. RAC - RMAN backup specific Archivelog Sequence getting error RMAN-20242

RMAN> run {
 allocate channel d1 type disk;
 backup as copy archivelog from sequence 433 until sequence 434 format '/apps/oracle/rman/CUR/curprod_%t_%s_%r.arc';
 release channel d1;
}
using target database control file instead of recovery catalog
allocated channel: d1
channel d1: sid=2152 instance=curprod3 devtype=DISK

Starting backup at 23-JUL-08
released channel: d1

RMAN-03002: failure of backup command at 07/23/2008 17:33:45
RMAN-20242: specification does not match any archive log in the recovery catalog

Cause:

This is a RAC database and the thread number was not specified in the backup statement.

Solution:

Specify the thread as part of the backup command, for instance:

RMAN> backup archivelog from sequence 433 until sequence 434 thread 3 format '/apps/oracle/rman/CUR/curprod_%t_%s_%r.arc'; 

--

3. RMAN Backup Archivelog using LIKE operator failed RMAN-20242

RMAN 'archivelog like' method is very useful when trying to backup archived log
on oracle parallel server and oracle parallel failsafe where archived logs exist
on all nodes local disks.

RMAN> run  {
 allocate channel c1 type disk;
 backup
    archivelog like 'E:\oracle\oradata\prod\archive%';
}
...
...
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure during compilation of command
RMAN-03013: command type: backup
RMAN-06004:
ORACLE error from recovery catalog database: RMAN-20242: specification
does not match any archivelog in the recovery catalog

# To resolve the above error, query V$ARCHIVED_LOG to find out the archived log
# details and note the format of the name column.

Cause:

SQL> select * from v$archived_log;

RECID      STAMP
---------- ----------
NAME
--------------------------------------------------------------------------------
   THREAD#  SEQUENCE# RESETLOGS_CHANGE# RESETLOGS FIRST_CHANGE# FIRST_TIM
---------- ---------- ----------------- --------- ------------- ---------
NEXT_CHANGE# NEXT_TIME     BLOCKS BLOCK_SIZE CREA REGI STA ARC DEL COMPLETIO
------------ --------- ---------- ---------- ---- ---- --- --- --- ---------
         1  419970034
E:\ORACLE\ORADATA\PROD\ARCHIVE\PRODT001S01524.ARC
         1       1524                 1 21-JAN-01        599954 25-JAN-01
      600067 25-JAN-01        103        512 FGRD FGRD NO  YES YES 25-JAN-01

# Notice the name is in UPPER case - 'E:\ORACLE\ORADATA\PROD\ARCHIVE\PRODT001S01524.ARC'.
# Modify the script and run again.

Solution:

RMAN> run  {
 allocate channel c1 type disk;
 backup
    archivelog like 'E:\ORACLE\ORADATA\PROD\ARCHIVE\PROD%' delete input;
 release channel c1;
}
....

RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08009: channel c1: starting archivelog backupset
RMAN-08502: set_count=36 set_stamp=420311754 creation_time=29-JAN-01
RMAN-08014: channel c1: specifying archivelog(s) in backup set
RMAN-08504: input archivelog thread=1 sequence=1538 recid=15 stamp=420196579
RMAN-08504: input archivelog thread=1 sequence=1539 recid=16 stamp=420239024
...
RMAN-08013: channel c1: piece 1 created
RMAN-08503: piece handle=E:\ORACLE\ORA817\DATABASE\14CGQSMA_1_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:00:02
RMAN-08071: channel c1: deleting archivelog(s)
...
RMAN-08514: archivelog filename=E:\ORACLE\ORADATA\PROD\ARCHIVE\PRODT001S01541.ARC recid=18 stamp=420310800
RMAN-08514: archivelog filename=E:\ORACLE\ORADATA\PROD\ARCHIVE\PRODT001S01542.ARC recid=19 stamp=420310879
RMAN-03023: executing command: partial resync
RMAN-08003: starting partial resync of recovery catalog
RMAN-08005: partial resync complete

RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: c1

4. Rman-20242 raised for Backup Archivelogs when using SEQUENCE, if logs do not belong to current incarnation

RMAN list and backup commands when used for archivelogs, specifying sequence or sequence range is
limited to logs only in current incarnation. For example:

RMAN> list archivelog all;

using target database control file instead of recovery catalog

List of Archived Log Copies
Key Thrd Seq  S Low Time Name
------- ----  ------- - ------------------ ----
99    1    6  A 09-nov-07 12:30:58 D:\ORACLE\PRODUCT\10.2.0..........O1_MF_1_6_3MM4NR1W_.ARC
95    1    6  A 09-nov-07 12:30:58 D:\ORACLE\PRODUCT\10.2.0..........O1_MF_1_6_3MJT5FQH_.ARC
98    1    7  A 12-nov-07 14:52:25 D:\ORACLE\PRODUCT\10.2.0..........O1_MF_1_7_3MM4NN0R_.ARC
96    1    7  A 12-nov-07 14:52:25 D:\ORACLE\PRODUCT\10.2.0..........O1_MF_1_7_3MM3HO29_.ARC
97    1    8  A 13-nov-07 11:43:46 D:\ORACLE\PRODUCT\10.2.0..........O1_MF_1_8_3MM4NLFT_.ARC
100   1    1  A 13-nov-07 12:03:30 D:\ORACLE\PRODUCT\10.2.0..........O1_MF_1_1_3MM5TSTX_.ARC

Log sequences 6,7 and 8 belong to previous incarnation.
Log sequence 1 belongs to current incarnation.

RMAN> list archivelog sequence=6;
specification does not match any archive log in the recovery catalog

RMAN> list archivelog 'D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\V10203\ARCHIVELOG\2007_11_13\O1_MF_1_6_3MM4NR1W_.ARC';

List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - ------------------ ----
99   
1    6 A 09-nov-07 12:30:58
D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\V10203\ARCHIVELOG\2007_11_13\O1_MF_1_6_3MM4NR1W_.ARC

RMAN> backup archivelog all;
== ALL logs are backed up.

RMAN> backup archivelog sequence=6;

Starting backup at 13-nov-07 12:53:27
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 11/13/2007 12:53:28
RMAN-20242: specification does not match any archive log in the recovery catalog

Cause:

Bug 5648115 USING LOGSEQ CLAUSE, RMAN CAN NOT BACKUP ARCHIVE LOGS FOR PREVIOUS INCARNATIONS:

This problem is NOT confined to SAP databases.
Anyone trying to backup logs using SEQUENCE will find they cannot backup logs from an earlier
incarnation where the logs are still avaliable on disk. Nor can the logs be listed using SEQUENCE.

Solution:

Apply the fix for Bug 5648115 when it becomes available.
Bug 5648115 is fixed in 11GR2.

Workaround:

Do NOT use SEQUENCE - use SCN instead - not ideal as you would need to get SCN details from v$archived_log first:

sql> select first_change#, next_change# from v$archived_log where sequence#=n and resetlogs_change#=N;

You can take N from the output from:

RMAN> list incarnation;

rman 问题的更多相关文章

  1. RMAN异机恢复快速参考

    应用场景:服务器A为正常运行的生产环境,需要在服务器B上部署一套相同环境做测试. 数据库环境:RHEL6.4 + Oracle 11.2.0.4.7 一. 服务器A备份数据库 1.1 在线备份(数据库 ...

  2. 用RMAN备份EBS数据库的脚本

    rman_bak.sh rman target / nocatalog log=/d01/rmanbak/bak_`date +%m%d%H%M`.log<< EOF  run  {  c ...

  3. RAC+asm通过rman恢复到单实例+asm

    1.恢复参数文件,并修改参数文件 参数文件指名几个最简单的就行,我的参数文件如下: 2.恢复控制文件,并启动数据库到mount 如果是把备份集从别的服务器拷贝到本地恢复的服务器的目录,使用下面的语句指 ...

  4. RMAN Catalog创建、配置和管理

    环境:RHEL6.4 + Oracle 11.2.0.4 一.创建数据库catdb 1.1 官档的建库脚本示例 1.2 根据我实际环境修改如下项 1.3 创建必要目录并赋予权限 1.4 执行脚本建库 ...

  5. 使用RMAN创建复制数据库

    我的实验环境: - 源数据库A机: RHEL6.4 + Oracle 11.2.0.4 IP地址:192.168.99.159 db_name=oradb 数据库已正常运行 - 复制数据库B机: RH ...

  6. DG环境数据库RMAN备份策略制定

    DG环境数据库RMAN备份策略制定: 主库(Primary) 全库备份 归档备份 删除历史文件夹 备库(Standby) 删除归档 引用说明 主库(Primary) $ crontab -l 0 1 ...

  7. 记录一则RMAN备份策略修正案例

    背景:在给某客户处理问题时,发现客户数据库的备份空间即将用尽,进一步查看发现是用户数据库的当前RMAN备份策略存在潜在问题,需要修改备份策略. 环境:SunOS 5.10 + Oracle 11.2. ...

  8. RMAN异机恢复遭遇ORA-01547、ORA-01152、ORA-01110错误案例

    测试环境:     操作系统  :  Red Hat Enterprise Linux ES release 4 (Nahant Update 4)   VMWARE     数据库     :  O ...

  9. RMAN异机还原遭遇ORA-19698错误案例

    实验环境:               操作系统    :Oracle Linux Server release 5.7 64 bit               数据库版本:Oracle Datab ...

  10. RMAN备份脚本一列分享

    在ORACLE数据库中,RMAN备份的脚本非常多,下面介绍一例shell脚本如何通过RMAN备份,以及FTP上传RMAN备份文件以及归档日志文件的脚本. fullback.sh 里面调用RMAN命令做 ...

随机推荐

  1. Tyvj 1221 微子危机——战略

    背景 №.3Summer联盟战前兵力战略转移. 描述 Summer的兵力分布在各个星球上,现在需要把他们全部转移到某个星球上.Summer一共拥有N个星球(1-N),你要把这N个星球上的兵力转到第M个 ...

  2. hash存储结构【六】

    一.概述: 我们可以将Redis中的Hashes类型看成具有String Key和String Value的map容器.所以该类型非常适合于存储值对象的信息.如Username.Password和Ag ...

  3. Redis事务【十二】

    一.概述: 和众多其它数据库一样,Redis作为NoSQL数据库也同样提供了事务机制.在Redis中,MULTI/EXEC/DISCARD/WATCH这四个命令是我们实现事务的基石.相信对有关系型数据 ...

  4. Ubuntu 16.04安装WinRAR/7-Zip(基于CrossOver)

    基于CrossOver的WinRAR/7-Zip有如下缺点: 1.不能像Windows那样右键菜单解压 可以解决的问题: 1.可以使用提供的浏览工具进行文件选择再解压,只是在操作上多一步. 2.类似百 ...

  5. symfony 使用原始sql

    $this->get('database_connection')->fetchAll('select * from book where book.id=3')

  6. cmd-net命令详解

    NET ViewNET UserNET UseNET TimeNet Start Net PauseNet ContinueNET StopNet StatisticsNet Share Net Se ...

  7. Apple Swift编程语言新手教程

    文件夹 1   简单介绍 2   Swift入门 3   简单值 4   控制流 5   函数与闭包 6   对象与类 7   枚举与结构 1   简单介绍 今天凌晨Apple刚刚公布了Swift编程 ...

  8. MariaDB ----增删改

    1> 查看表的(创建)状态: show careate table students1; 注:       自增, (保护机制) 好马不吃回头草 2>查看 字段:( 查看表的结构) des ...

  9. rk3188调试记录

    1.编译 # . build/envsetup.sh # lunch  7    7. PI3910-user 1.电池部分 init.rc启动healthd-charger服务.对电池进行检測 se ...

  10. javascript下获取guid或者UTC时间作为唯一值

    javascript下,有时出于需要,可以利用guid或UTC时间作为当前页面中的唯一值. 什么场景需要弄这个唯一值? 比如说,用easyUI的treegrid,添加新节点.在treegrid里面 , ...