ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Recove database后出现错误提示:Ora-01152

Recove database后出现错误提示:Ora-01152

原创 Linux操作系统 作者:fengjin821 时间:2009-06-27 21:47:24 0 删除 编辑

 

Recove database后出现错误提示:Ora-01152。请教解决方法

环境:windows2003 + Oracle 10g
A机:无Full备份。使用如下0级备份脚本:

connect target 'sys/sys as sysdba';
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level 0 tag 'db0' format 'F:\rman_bak\incbak\db0\db0%d_%t_%s' database
include current controlfile
skip readonly;
sql 'alter system archive log current';
backup filesperset 3 format 'F:\rman_bak\incbak\db0\arch%d_%t_%s' archivelog all delete input;
delete obsolete;
release channel c1;
release channel c2;
release channel c3;
}


B机所有环境与A机相同,文件目录也一致,但是没有数据文件。

把A机的0级备份COPY到B机相同后恢复

run{
restore database;
recover database;
sql 'alter database open resetlogs';
}

然后提示:
ORA-01547: 警告: RECOVER 成功但 OPEN RESETLOGS 将出现如下错误
ORA-01152: 文件 1 没有从完备的旧备份中恢复
ORA-01110: 数据文件 1: 'D:\ORACLE\ORADATA\da\SYSTEM01.DBF'
 
- - - - - - - -- - - -- --  -  --  - -- - -  -- - - -- - - - - - - - - - -  - - -- - - -
 
 
 
RMAN备份恢复
  
  备份:
  
 run{
       allocate channel c1 type disk;
       allocate channel c2 type disk;
       allocate channel c3 type disk;
       backup incremental level 0 tag 'db0' format 'F:\rman_bak\incbak\db0\db0%d_%t_%s' database 
      include current controlfile
      skip readonly;
      sql 'alter system archive log current';
      backup filesperset 3 format 'F:\rman_bak\incbak\db0\arch%d_%t_%s' archivelog all delete input;
     delete obsolete;
     release channel c1;
     release channel c2;
     release channel c3;
    }

 

先恢复控制文件

  
  恢复:
  
  run {
  
  allocate channel c1 type disk;
  
  restore controlfile to '/oracle/oradata/ora/control01.ctl';
  
  replicate controlfile from '/oracle/oradata/ora/control01.ctl';
  
  restore database;
  
  sql 'alter database mount';
  
  recover database until cancel;
  
  sql 'alter database open relsetogs';
  
  release channel c1;
  
  }
  
  使用resetlogs的后需在catalog database 上进行reset database

 
原有备份信息将不可用所以要及时进行新完全备份
 
 
 
 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13165828/viewspace-607738/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-04-29

  • 博文量
    191
  • 访问量
    508989