【IT168 技术文档】今天检查RMAN备份脚本的执行情况时发现了错误信息。
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of crosscheck command at 08/15/2006 09:18:29
ORA-01455: converting column overflows integer datatype
检查后发现,备份操作没有失败,而是在CROSSCHECK BACKUPSET命令和DELETE NOPROMPT OBSOLETE命令时出现的错误。
使用RMAN直接查询,错误同上。
到metalink上查询了一下,发现和ORA-1455错误相关的Oracle bug还真是不少。有的是由于序列的值过大,有的是由于记录中的变量定义太小,有的是由于备份时时间向前调整。
由于是测试数据库,采用NOCATALOG方式,而使用NOCATALOG方式,metalink上给的许多诊断方式都无法使用。而在rman下通过命令查询,却大部分都报ORA-1455的错误。只能为数据库建立一个CATALOG,建立CATALOG后登陆数据库进行查询,发现:
SQL> select piece#, bp_key, start_time, completion_time
2 from rc_backup_piece
3 where start_time > completion_time;
PIECE# BP_KEY START_TIME COMPLETION_TIME
---------- ---------- -------------------
1 493 2006-08-10 09:18:38 2006-08-10 09:18:36
由此,可以断定是由于时间变化导致结束时间比开始时间早,导致了问题。
根据metalink上面介绍的方式,删除BACKUPPIECE:
SQL> select handle from rc_backup_piece where start_time > completion_time;
HANDLE
--------------------------------------------------
/data1/backup/testdata/c-2270762593-20060810-00
[oracle@demo2 oracle]$ rman target / catalog "rman/rman@testcen"
Recovery Manager: Release 9.2.0.4.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: TESTDATA (DBID=2270762593)
connected to recovery catalog database
RMAN> delete backuppiece '/data1/backup/testdata/c-2270762593-20060810-00';
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=16 devtype=DISK
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
493 413 1 1 AVAILABLE DISK /data1/backup/testdata/c-2270762593-20060810-00
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/data1/backup/testdata/c-2270762593-20060810-00 recid=691 stamp=598094318
Deleted 1 objects
至此问题已经解决:
RMAN> delete noprompt obsolete;
![]()
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 387 02-8月 -06
Backup Piece 467 02-8月 -06 /data1/backup/testdata/c-2270762593-20060802-00
Backup Set 393 03-8月 -06
Backup Piece 473 03-8月 -06 /data1/backup/testdata/c-2270762593-20060803-00
deleted backup piece
backup piece handle=/data1/backup/testdata/c-2270762593-20060802-00 recid=665 stamp=597403426
deleted backup piece
backup piece handle=/data1/backup/testdata/c-2270762593-20060803-00 recid=671 stamp=597489879
Deleted 2 objects
至此,在CATALOG模式下,问题解决,而NOCATALOG模式下,问题依旧,只能通过重建控制文件的方式来解决。
重建控制文件后,NOCATALOG下丢失所有备份信息,而CATALOG下备份信息仍然可见:
[oracle@demo2 oracle]$ rman target /
Recovery Manager: Release 9.2.0.4.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: TESTDATA (DBID=2270762593)
RMAN> crosscheck backupset;
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=16 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data1/backup/testdata/c-2270762593-20060815-00 recid=1 stamp=598538658
Crosschecked 1 objects
RMAN> exit
Recovery Manager complete.
[oracle@demo2 oracle]$ rman target / catalog "rman/rman@testcen"
Recovery Manager: Release 9.2.0.4.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: TESTDATA (DBID=2270762593)
connected to recovery catalog database
RMAN> crosscheck backupset;
starting full resync of recovery catalog
full resync complete
starting full resync of recovery catalog
full resync complete
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=20 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data1/backup/testdata/jlhoq8vi_1_1 recid=612 stamp=596452339
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data1/backup/testdata/jmhoqa3m_1_1 recid=613 stamp=596453495
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data1/backup/testdata/johosskm_1_1 recid=615 stamp=596538007
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data1/backup/testdata/jrhost5f_1_1 recid=618 stamp=596538543
crosschecked backup piece: found to be 'AVAILABLE'
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data1/backup/testdata/c-2270762593-20060815-00 recid=1 stamp=598538658
Crosschecked 77 objects
RMAN> exit
Recovery Manager complete.
其他详细信息可以参考metalink信息:Bug 2665255。
| 第1页: 第1页 |