RMANCrosscheck后deleteobsolete遇到RMAN-06091的解决 rman obsolete

先摘录一段对CROSSCHECK的描述

当archivelog或是backup被手工删除后,需要运行crosscheck.该命令确保recoverycatalog或是控制文件中记录的数据与硬盘上的文件一致。

对于找不到的文件,CROSSCHECK会把它的状态标为EXPIRED.然后,你运行DELETEEXPIRED命令就可以把rman repository中的相关记录和硬盘上的文件删除。

如果有些文件被错误地标为EXPIRED,那么在确认文件存在时,再次运行CROSSCHECKBACKUP可以将这些文件重置为AVAILABLE状态。

也就是说,对于硬盘上已经不存在的文件,用DELETE EXPIRED在RMAN中删除相关记录。对于已经超过retentionpolicy的备份,用DELETE OBSOLETE从硬盘和磁带设备上删除,并从RMAN中把记录删除。

在执行完

Crosscheck backup;

Crossscheck backuppiece;

Crosscheck archivelog all;

Delete obsolete;报RMAN-06091: no channel allocated formaintenance (of an appropriate type)

研究了一下,之前的备份一部分是直接备份在硬盘上,另一部分是通过DP备份在磁带上的。出现这样的错误是因为有磁带上的数据,但是未申请磁带类型的channel造成的。

RMAN> allocate channel for maintenance typedisk;

allocated channel: ORA_MAINT_DISK_6

channel ORA_MAINT_DISK_6: sid=137 devtype=DISK

RMAN> delete expired archivelog all;

specification does not match any archive log in the recoverycatalog

这个应该是正常的,没有发现expired log.

RMAN> delete obsolete;

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

Deleting the following obsolete backups and copies:

TypeKeyCompletionTimeFilename/Handle

-------------------- ------ --------------------------------------

BackupSet2499 2011-11-24 11:39:28

BackupPiece2511 2011-11-24 11:39:28swt-oracle-full<gz_7:768051562:1>.dbf

BackupSet2564 2011-11-26 21:18:57

BackupPiece2567 2011-11-26 21:18:57/backup/arc0dmsld1e

BackupSet2950 2011-12-14 14:45:40

BackupPiece2955 2011-12-14 14:45:40/u01/oracle/flash_recovery_area/GZ/backupset/2011_12_14/o1_mf_annnn_TAG20111214T144526_7gjkjly0_.bkp

RMAN-00571:===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS===============

RMAN-00571:===========================================================

RMAN-03002: failure of delete command at 12/15/2011 17:05:42

RMAN-06091: no channel allocated for maintenance (of anappropriate type)

这里出错了

解决的办法是分别删除硬盘上与磁带上的过期备份数据。

RMAN>delete obsolete device type disk;

删除硬盘上的过期备份

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

Deleting the following obsolete backups and copies:

TypeKeyCompletionTimeFilename/Handle

-------------------- ------ --------------------------------------

BackupSet2509 2011-11-24 14:28:32

BackupPiece2521 2011-11-24 14:28:32/backup/sp

BackupSet2564 2011-11-26 21:18:57

BackupPiece2567 2011-11-26 21:18:57/backup/arc0dmsld1e

BackupSet2565 2011-11-26 21:19:20

BackupPiece2568 2011-11-26 21:19:20/backup/arc0emsld29

Control FileCopy2709 2011-11-26 21:42:33/var/opt/omni/tmp/ctrl_gz.dbf

BackupSet2885 2011-11-27 20:44:15

BackupPiece2888 2011-11-27 20:44:15/backup/db_full_31.1

Control FileCopy2898 2011-11-27 20:43:57/backup/bj.ctl

BackupSet2886 2011-11-27 20:44:21

BackupPiece2889 2011-11-27 20:44:21/backup/db_full_32.1

BackupSet2950 2011-12-14 14:45:40

BackupPiece2955 2011-12-14 14:45:40/u01/oracle/flash_recovery_area/GZ/backupset/2011_12_14/o1_mf_annnn_TAG20111214T144526_7gjkjly0_.bkp

BackupSet2951 2011-12-14 14:45:46

Do you really want to delete the above objects (enter YES orNO)? YES

deleted backup piece

backup piece handle=/backup/db_full_31.1 recid=31stamp=768343384

deleted control file copy

control file copy filename=/backup/bj.ctl recid=4stamp=768343437

deleted backup piece

backup piece handle=/backup/db_full_32.1 recid=32stamp=768343461

deleted backup piece

backup piecehandle=/u01/oracle/flash_recovery_area/GZ/backupset/2011_12_14/o1_mf_annnn_TAG20111214T144526_7gjkjly0_.bkprecid=38 stamp=769877137

deleted backup piece

Deleted 17 objects

deleted backup piece

backup piece handle=/backup/sp recid=11 stamp=768061712

deleted backup piece

backup piece handle=/backup/arc0dmsld1e recid=13stamp=768259119

deleted backup piece

backup piece handle=/backup/arc0emsld29 recid=14stamp=768259146

Deleted 3 objects

这回成功了

RMAN> allocate channel formaintenance device type 'sbt_tape' PARMS'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=gz,OB2BARLIST=swt-oracle-full)';

这里PARMS后面的参数与备份时RMAN脚本中的参数相同

allocated channel: ORA_MAINT_SBT_TAPE_7

channel ORA_MAINT_SBT_TAPE_7: sid=136 devtype=SBT_TAPE

channel ORA_MAINT_SBT_TAPE_7: Data Protector A.06.11/243

RMAN> delete obsolete;

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

Deleting the following obsolete backups and copies:

TypeKeyCompletionTimeFilename/Handle

-------------------- ------ --------------------------------------

BackupSet2499 2011-11-24 11:39:28

BackupPiece2511 2011-11-24 11:39:28swt-oracle-full<gz_7:768051562:1>.dbf

Do you really want to delete the above objects (enter YES orNO)? yes

deleted backup piece

backup piecehandle=swt-oracle-full<gz_7:768051562:1>.dbfrecid=1 stamp=768051562

Deleted 26 objects

这样就成功了

  

爱华网本文地址 » http://www.aihuau.com/a/25101011/51847.html

更多阅读

腿毛少的解决方法 去腿毛的天然有效方法

随着复古风的兴起,腿毛被誉为是男人阳刚的鉴证,没有腿毛或者腿毛很少都会影响男性在女性心目中的形象,小生的时代已然过去了,现在是大男人的时代,那腿毛少怎么办呢?腿毛少的解决方法——步骤/方法腿毛少的解决方法 1、腿毛移植是治疗没

鼠标右键无法使用的解决方法 鼠标右键无法复制粘贴

我们在操作电脑的时候经常会发现我们的鼠标右键无法使用,遇到这种情况大多数网友会采取更换鼠标来解决,但是问题依旧存在。这多数是由于我们的鼠标右键被锁死导致的。鼠标右键无法使用的解决方法——工具/原料系统注册表鼠标右键无

错误代码691一种特例的解决方法 greenvpn错误代码691

错误代码691一种特例的解决方法——简介某些朋友可能会遇到这样一个问题,一个宽带帐号和密码,在一台电脑(1)上能够正常的通过pppoe拨号连上网,而换了一台电脑(2)后,还是相同的帐号和密码,却始终显示错误代码691,通过重装系统是解决不了这样的

DZ论坛移动后用户头像不显示的解决办法 dz论坛头像包

我用个DZ论坛,从一个服务器上,移到了另一个服务器上,用户登录上去,数据读取无误,但是会员头像处,不能显示,打叉!登录后台,发现点击“UCenter”不能显示,提示“Not Found。。。”错误!无所谓,不能用“UCenter”无非是有些数据(如改用户名什么的)改

声明:《RMANCrosscheck后deleteobsolete遇到RMAN-06091的解决 rman obsolete》为网友最嗨青年分享!如侵犯到您的合法权益请联系我们删除