Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

999

积分

1

好友

942

主题
1#
发表于 2017-4-13 11:55:57 | 查看: 1331| 回复: 1
主要错误如下,在recover时报:
RMAN-11001: Oracle Error: ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/d/db/oradata/oss/system01.dbf'

问题:
1.是不是2004-7-16的archive log 没有先还原到oracle的archive目录,从而造成recover失败.
2. 或是因为在备份的script里没有加上sql 'alter system archive log current';而引起的错误.

以下为详细过程:

当前的数据库是正常的,我只想测试恢复到2004-7-16时的数据库.
在oracle 8.1.7 archive 模式下:
做备份的scrip如下:
run {
allocate channel 'dev_0' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=oss,OB2BARLIST=ora8i_online)';
backup incremental level 0 filesperset 1
format 'ora8i_online<oss_%s:%t:%p>.dbf'
database
include current controlfile
archivelog all delete input;
}

我在2004-7-16,2004-7-17时用该script做备份成功.

现在我用如下script做不完全恢复:
run {
allocate channel 'dev_0' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=ORACLE8,OB2APPNAME=oss)';
sql "alter database mount";
set until time ='17.07.2004';
restore database;
recover database;
sql "alter database open resetlogs";
sql "alter database open";
}

程序在restore 时都成功,但在做recover时出错,见下列log:
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: dev_0
RMAN-08500: channel dev_0: sid=13 devtype=SBT_TAPE
RMAN-08526: channel dev_0: HP OpenView OmniBack II A.04.10/176

RMAN-03022: compiling command: sql
RMAN-06162: sql statement: alter database mount
RMAN-03023: executing command: sql

RMAN-03022: compiling command: set

RMAN-03022: compiling command: restore

RMAN-03022: compiling command: IRESTORE
RMAN-03023: executing command: IRESTORE
RMAN-08016: channel dev_0: starting datafile backupset restore
RMAN-08502: set_count=2056 set_stamp=531622798 creation_time=16.07.2004
RMAN-08089: channel dev_0: specifying datafile(s) to restore from backup set
......
......
RMAN-08016: channel dev_0: starting datafile backupset restore
RMAN-08502: set_count=2180 set_stamp=531623409 creation_time=16.07.2004

RMAN-08089: channel dev_0: specifying datafile(s) to restore from backup set
RMAN-08523: restoring datafile 00001 to /d/db/oradata/oss/system01.dbf
RMAN-08023: channel dev_0: restored backup piece 1
RMAN-08511: piece handle=netace_ora8i_online<oss_2180:531623409:1>.dbf tag=null params=NULL
RMAN-08024: channel dev_0: restore complete
......
......
RMAN-08023: channel dev_0: restored backup piece 1
RMAN-08511: piece handle=netace_ora8i_online<oss_2212:531623994:1>.dbf tag=null params=NULL
RMAN-08024: channel dev_0: restore complete

RMAN-03022: compiling command: recover

RMAN-03022: compiling command: recover(1)

RMAN-03022: compiling command: recover(2)

RMAN-03022: compiling command: recover(3)
RMAN-03023: executing command: recover(3)
RMAN-08054: starting media recovery

RMAN-03022: compiling command: recover(4)
RMAN-03026: error recovery releasing channel resources
RMAN-11001: Oracle Error: ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/d/db/oradata/oss/system01.dbf'

RMAN-08031: released channel: dev_1
RMAN-08031: released channel: dev_2
RMAN-08031: released channel: dev_0
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure during compilation of command
RMAN-03013: command type: recover
RMAN-03002: failure during compilation of command
RMAN-03013: command type: recover(4)
RMAN-06003: ORACLE error from target database: ORA-01220: file based sort illegal before database is open
ORA-06512: at "SYS.X$DBMS_RCVMAN", line 7220
ORA-06512: at "SYS.X$DBMS_RCVMAN", line 5053
ORA-06512: at line 1


问题:
1.是不是2004-7-16的archive log 没有先还原到oracle的archive目录,从而造成recover失败.
2. 或是因为在备份的script里没有加上sql 'alter system archive log current';而引起的错误.
下载专业ORACLE数据库恢复工具PRM-DUL  For Oracle http://www.parnassusdata.com/

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638  QQ: 47079569     邮箱:service@parnassusdata.com
2#
发表于 2017-4-13 11:56:21
>>我做Until Time的Incomplete Recovery也遇到和你一样的问题,Until Cancel倒可以。
>>我也怀疑是没做 alter system archive log current,因为我的日志很少,要恢复的时间点可能在>>Online Log里面
有没有办法查找Online Log的SCN.或者你如何用Until Cancel?



我已搞定这个问题.其原因是在备份期间,数据库没有任何操作,且在备件script中没有ALTER SYSTEM ARCHIVE LOG CURRENT;因而在备份当天没产生归档日志文件.在第二天才产生该文件.我把这个归档日志文件从备件中恢复到归档目录后,用alter database recover logfile 'filename' 完成恢复.并可用 alter database open resetlogs;打开数据库.

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-21 00:39 , Processed in 0.045610 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569