Oracle 9I恢復實戰

cow977發表於2011-06-15

[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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章