- 最后登录
- 2017-5-4
- 在线时间
- 81 小时
- 威望
- 999
- 金钱
- 2391
- 注册时间
- 2013-9-11
- 阅读权限
- 150
- 帖子
- 1124
- 精华
- 5
- 积分
- 999
- UID
- 1220
|
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';而引起的错误. |
|