Tuesday, 31 December 2013

restore deleted datafile from RMAN


---------

---------DELETE ANY DATAFILE THEN  HOW TO RESTORE DATAFILE AND CONTROLFILE----------

----------------------------------------------------------------------------------------------


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>cd\

C:\>rman target /

Recovery Manager: Release 9.2.0.1.0 - Production

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

connected to target database: IACM (DBID=1202858792)

RMAN> shutdown;

using target database controlfile instead of recovery catalog
database closed
database dismounted
Oracle instance shut down

RMAN> startup mount;

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     135338868 bytes

Fixed Size                      453492 bytes
Variable Size                109051904 bytes
Database Buffers              25165824 bytes
Redo Buffers                    667648 bytes

RMAN> restore database;

Starting restore at 08-JAN-10

allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=14 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=15 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to H:\ORACLE\ORADATA\IACM\UNDOTBS01.DBF
restoring datafile 00004 to H:\ORACLE\ORADATA\IACM\DRSYS01.DBF
restoring datafile 00007 to H:\ORACLE\ORADATA\IACM\ODM01.DBF
restoring datafile 00009 to H:\ORACLE\ORADATA\IACM\USERS01.DBF
channel ORA_DISK_2: starting datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00003 to H:\ORACLE\ORADATA\IACM\CWMLITE01.DBF
restoring datafile 00005 to H:\ORACLE\ORADATA\IACM\EXAMPLE01.DBF
restoring datafile 00006 to H:\ORACLE\ORADATA\IACM\INDX01.DBF
restoring datafile 00010 to H:\ORACLE\ORADATA\IACM\XDB01.DBF
channel ORA_DISK_3: starting datafile backupset restore
channel ORA_DISK_3: specifying datafile(s) to restore from backup set
restoring datafile 00001 to H:\ORACLE\ORADATA\IACM\SYSTEM01.DBF
restoring datafile 00008 to H:\ORACLE\ORADATA\IACM\TOOLS01.DBF
channel ORA_DISK_3: restored backup piece 1
piece handle=H:\ORACLE\ORA92\DATABASE\03L2TCTR_1_1 tag=TAG20100108T002218 params
=NULL
channel ORA_DISK_3: restore complete
channel ORA_DISK_1: restored backup piece 1
piece handle=H:\ORACLE\ORA92\DATABASE\02L2TCTR_1_1 tag=TAG20100108T002218 params
=NULL
channel ORA_DISK_1: restore complete
channel ORA_DISK_2: restored backup piece 1
piece handle=H:\ORACLE\ORA92\DATABASE\01L2TCTR_1_1 tag=TAG20100108T002218 params
=NULL
channel ORA_DISK_2: restore complete
Finished restore at 08-JAN-10

RMAN> recover database;

Starting recover at 08-JAN-10
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

starting media recovery
media recovery complete

Finished recover at 08-JAN-10

RMAN> alter database open;

database opened

No comments:

Post a Comment