ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle 9I恢复实战

Oracle 9I恢复实战

原创 Linux操作系统 作者:cow977 时间:2011-06-15 09:08:07 0 删除 编辑

[oracle9i@RHEL5 arch]$ rman target /

 

Recovery Manager: Release 9.2.0.8.0 - Production

 

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

 

connected to target database (not started)

 

RMAN> run { startup nomount; }

 

startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file 'initorcl.ora'

 

trying to start the Oracle instance without parameter files ...

Oracle instance started

 

Total System Global Area     101782120 bytes

Fixed Size                      451176 bytes

Variable Size                 50331648 bytes

Database Buffers              50331648 bytes

Redo Buffers                    667648 bytes

 

RMAN> set dbid=1281244005;

 

executing command: SET DBID

 

RMAN> restore spfile from autobackup;

 

Starting restore at 14-JUN-11

 

using channel ORA_DISK_1

channel ORA_DISK_1: looking for autobackup on day: 20110614

channel ORA_DISK_1: autobackup found: c-1281244005-20110614-01

channel ORA_DISK_1: SPFILE restore from autobackup complete

Finished restore at 14-JUN-11

 

RMAN> run

2> {

3> shutdown abort;

4> startup nomount;

5> }

 

Oracle instance shut down

 

connected to target database (not started)

Oracle instance started

 

Total System Global Area     235999648 bytes

 

Fixed Size                      450976 bytes

Variable Size                201326592 bytes

Database Buffers              33554432 bytes

Redo Buffers                    667648 bytes

 

RMAN>  restore controlfile from autobackup;

 

Starting restore at 14-JUN-11

 

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=12 devtype=DISK

channel ORA_DISK_1: looking for autobackup on day: 20110614

channel ORA_DISK_1: autobackup found: c-1281244005-20110614-01

channel ORA_DISK_1: controlfile restore from autobackup complete

replicating controlfile

input filename=orcl/control01.ctl

output filename=orcl/control02.ctl

output filename=orcl/control03.ctl

Finished restore at 14-JUN-11

 

RMAN>  alter database mount;

 

database mounted

 

RMAN> restore database;

 

Starting restore at 14-JUN-11

 

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to orcl/system01.dbf

restoring datafile 00002 to orcl/undotbs01.dbf

restoring datafile 00003 to orcl/drsys01.dbf

restoring datafile 00004 to orcl/indx01.dbf

restoring datafile 00005 to orcl/tools01.dbf

restoring datafile 00006 to orcl/users01.dbf

restoring datafile 00007 to orcl/xdb01.dbf

channel ORA_DISK_1: restored backup piece 1

piece handle=db.1_1.dbf tag=TAG20110614T131846 params=NULL

channel ORA_DISK_1: restore complete

Finished restore at 14-JUN-11

 

RMAN> recover database;

 

Starting recover at 14-JUN-11

using channel ORA_DISK_1

 

starting media recovery

 

archive log thread 1 sequence 14 is already on disk as file orcl/redo02.log

archive log thread 1 sequence 15 is already on disk as file orcl/redo03.log

archive log filename=orcl/redo02.log thread=1 sequence=14

archive log filename=orcl/redo03.log thread=1 sequence=15

media recovery complete

Finished recover at 14-JUN-11

 

RMAN> alter database open resetlogs;

 

database opened

 

RMAN> quit

 

Recovery Manager complete.

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

下一篇: Vista的休眠设置
请登录后发表评论 登录
全部评论

注册时间:2011-03-02

  • 博文量
    698
  • 访问量
    786745