RMAN恢复数据库ORA-01861错误

php中文网
发布: 2016-06-07 17:15:40
原创
1818人浏览过

在一个新环境中恢复数据库备份。在数据文件还原阶段,就出现了错误。环境说明:Oracle 10.2.0.3 for solaris 10,备份数据库是RA

在一个新环境中恢复数据库备份。在数据文件还原阶段,就出现了错误。

环境说明:Oracle 10.2.0.3 for solaris 10,备份数据库是RAC,恢复则在单实例上进行。

操作出现过程如下:

第一步,将数据库恢复到某个时间点,恢复出错。

RMAN> run
2> {
3> allocate channel ch01 type disk;
4> allocate channel ch02 type disk;
5> set until time "to_date('2012-06-25 23:00:00','yyyy-mm-dd hh24:mi:ss')";
6> set newname for datafile 1 to '/stor2T/app/oracle/oradata/urpdb/system01.dbf';
7> set newname for datafile 2 to '/stor2T/app/oracle/oradata/urpdb/undotbs1.dbf';
8> restore datafile 1;
9> restore datafile 2;
10> switch datafile all;
11> release channel ch01;
12> release channel ch02;
13> }

using target database control file instead of recovery catalog
allocated channel: ch01
channel ch01: sid=155 devtype=DISK

allocated channel: ch02
channel ch02: sid=156 devtype=DISK

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 27-JUN-12

released channel: ch01
released channel: ch02
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/27/2012 16:09:51
ORA-01861: literal does not match format string

我想,这可能是时间格式问题,先回避它吧。

第二步,换成成UNTIL SCN去还原数据文件。

RMAN> run
2> {
3> allocate channel ch01 type disk;
4> allocate channel ch02 type disk;
5> set until scn 3054150330;
6> set newname for datafile 1 to '/stor2T/app/oracle/oradata/urpdb/system01.dbf';
7> restore datafile 1;
8> switch datafile all;
9> release channel ch01;
10> release channel ch02;
11> }

allocated channel: ch01
channel ch01: sid=155 devtype=DISK

allocated channel: ch02
channel ch02: sid=156 devtype=DISK

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 27-JUN-12

released channel: ch01
released channel: ch02
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/27/2012 16:12:38
ORA-01861: literal does not match format string

RMAN>

即使使用SCN也是报错。

第三步,检查备份结果集,也报错。

RMAN> list backupset summary;

using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 06/27/2012 16:29:18
ORA-01861: literal does not match format string

这下麻烦了。难道问题是出在环境变量上吗?

检查环境变量设置,和数据库初始化参数设置。

env|grep NLS_DATE_FORAMT

结果显示的已经是'yyyy-mm-dd hh24:mi:ss'格式了。

再查metalink,,发现有bug

 

linux

数据恢复工具app
数据恢复工具app

手机里的数据丢失了怎么办?聊天记录不小心删掉了怎么办?不用担心,这里为大家提供了数据恢复工具app下载,安全正规,有需要的小伙伴保存下载,就轻松恢复数据啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号