Practice: Incomplete Database Recovery Using UNTIL TIME

 

This practice covers the steps necessary to perform an incomplete recovery using UNTIL TIME with RMAN

 

 

Assumptions

 

·        You have an Oracle 9i database and it is not running.

·        The database is in archivelog mode.

·        That the ORACLE_SID is set to the target database.

 

Instructions

 

1.      Set the NLS_DATE_FORMAT environmental variable to the format used in the RMAN script and startup the database in mount. 

 

C:\>set NLS_DATE_FORMAT=YYYY-MM-DD:HH24:MI:SS

 

C:\>rman target sys/oracle

 

Recovery Manager: Release 9.0.1.0.0 - Beta

 

(c) Copyright 2001 Oracle Corporation.  All rights reserved.

 

connected to target database (not started)

 

RMAN> startup mount

 

Oracle instance started

database mounted

 

Total System Global Area     202141568 bytes

 

Fixed Size                      282496 bytes

Variable Size                142606336 bytes

Database Buffers              58720256 bytes

Redo Buffers                    532480 bytes

 

RMAN>

 

 

2.      Perform and RMAN UNTIL TIME incomplete recovery

 

RMAN> run{

2> allocate channel c1 type DISK;

3> allocate channel c2 type DISK;

4> set until time = '2003-03-06:23:45:00';

5> restore database;

6> recover database;

7> alter database open resetlogs;}

 

allocated channel: c1

channel c1: sid=10 devtype=DISK

 

allocated channel: c2

channel c2: sid=11 devtype=DISK

 

executing command: SET until clause

 

Starting restore at 2003-03-07:00:00:47

 

channel c1: starting datafile backupset restore

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

restoring datafile 00001 to C:\ORACLE\ORA91\ORADATA\DB01\SYSTEM01.DBF

restoring datafile 00002 to C:\ORACLE\ORA91\ORADATA\DB01\UNDOTBS01.DBF

restoring datafile 00003 to C:\ORACLE\ORA91\ORADATA\DB01\CWMLITE01.DBF

restoring datafile 00004 to C:\ORACLE\ORA91\ORADATA\DB01\DRSYS01.DBF

restoring datafile 00005 to C:\ORACLE\ORA91\ORADATA\DB01\EXAMPLE01.DBF

restoring datafile 00006 to C:\ORACLE\ORA91\ORADATA\DB01\INDX01.DBF

restoring datafile 00007 to C:\ORACLE\ORA91\ORADATA\DB01\TOOLS01.DBF

restoring datafile 00008 to C:\ORACLE\ORA91\ORADATA\DB01\USERS01.DBF

restoring datafile 00009 to C:\ORACLE\ORA91\ORADATA\DB01\OEM_REPOSITORY.DBF

 

channel c1: restored backup piece 1

piece handle=D:\BACKUP\DFT_DB01_4.BAK tag=null params=NULL

channel c1: restore complete

Finished restore at 2003-03-07:00:04:36

 

Starting recover at 2003-03-07:00:04:36

 

 

 

starting media recovery

 

archive log thread 1 sequence 7 is already on disk as file C:\ORACLE\ORADAT

A\DB01\ARCHIVE\DB01T001S00007.ARC

archive log thread 1 sequence 8 is already on disk as file C:\ORACLE\ORADAT

A\DB01\ARCHIVE\DB01T001S00008.ARC

archive log thread 1 sequence 9 is already on disk as file C:\ORACLE\ORADAT

A\DB01\ARCHIVE\DB01T001S00009.ARC

archive log thread 1 sequence 10 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00010.ARC

archive log thread 1 sequence 11 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00011.ARC

archive log thread 1 sequence 12 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00012.ARC

archive log thread 1 sequence 13 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00013.ARC

archive log thread 1 sequence 14 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00014.ARC

archive log thread 1 sequence 15 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00015.ARC

archive log thread 1 sequence 16 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00016.ARC

archive log thread 1 sequence 17 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00017.ARC

archive log thread 1 sequence 18 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00018.ARC

archive log thread 1 sequence 19 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00019.ARC

archive log thread 1 sequence 20 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00020.ARC

archive log thread 1 sequence 21 is already on disk as file C:\ORACLE\ORADA

archive log thread 1 sequence 21 is already on disk as file C:\ORACLE\ORADA

TA\DB01\ARCHIVE\DB01T001S00021.ARC

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00007.ARC thre

ad=1 sequence=7

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00008.ARC thre

ad=1 sequence=8

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00009.ARC thre

ad=1 sequence=9

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00010.ARC thre

ad=1 sequence=10

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00011.ARC thre

ad=1 sequence=11

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00012.ARC thre

ad=1 sequence=12

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00013.ARC thre

ad=1 sequence=13

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00014.ARC thre

ad=1 sequence=14

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00015.ARC thre

ad=1 sequence=15

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00016.ARC thre

ad=1 sequence=16

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00017.ARC thre

ad=1 sequence=17

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00018.ARC thre

ad=1 sequence=18

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00019.ARC thre

ad=1 sequence=19

media recovery complete

Finished recover at 2003-03-07:00:04:49

 

database opened

released channel: c1

released channel: c2

 

 

 

This completes this practice.

 

 

 

ã Oracle Corporation, 2002

Practice #<number>: <topic title>

Practice: Incomplete Database Recovery Using UNTIL SEQUENCE

 

This practice covers the steps necessary to perform an incomplete recovery using UNTIL SEQUENCE with RMAN

 

 

Assumptions

 

·        You have an Oracle 9i database and it is not running.

·        The database is in archivelog mode.

·        That the ORACLE_SID is set to the target database.

 

Instructions

 

1.      Perform and RMAN UNTIL SEQUENCE incomplete recovery. 

 

RMAN> run{

2> set until sequence 8 thread 1;

3> restore database;

4> recover database;

5> alter database open resetlogs;}

 

executing command: SET until clause

 

Starting restore at 2003-03-07:00:31:12

 

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=10 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore

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

restoring datafile 00001 to C:\ORACLE\ORA91\ORADATA\DB01\SYSTEM01.DBF

restoring datafile 00002 to C:\ORACLE\ORA91\ORADATA\DB01\UNDOTBS01.DBF

restoring datafile 00003 to C:\ORACLE\ORA91\ORADATA\DB01\CWMLITE01.DBF

restoring datafile 00004 to C:\ORACLE\ORA91\ORADATA\DB01\DRSYS01.DBF

restoring datafile 00005 to C:\ORACLE\ORA91\ORADATA\DB01\EXAMPLE01.DBF

restoring datafile 00006 to C:\ORACLE\ORA91\ORADATA\DB01\INDX01.DBF

restoring datafile 00007 to C:\ORACLE\ORA91\ORADATA\DB01\TOOLS01.DBF

restoring datafile 00008 to C:\ORACLE\ORA91\ORADATA\DB01\USERS01.DBF

restoring datafile 00009 to C:\ORACLE\ORA91\ORADATA\DB01\OEM_REPOSITORY.DBF

 

channel ORA_DISK_1: restored backup piece 1

piece handle=D:\BACKUP\DFTT_DB01_5.BAK tag=null params=NULL

channel ORA_DISK_1: restore complete

Finished restore at 2003-03-07:00:35:10

Starting recover at 2003-03-07:00:35:10

using channel ORA_DISK_1

 

 

 

starting media recovery

 

archive log thread 1 sequence 6 is already on disk as file C:\ORACLE\ORADAT

A\DB01\ARCHIVE\DB01T001S00006.ARC

archive log thread 1 sequence 7 is already on disk as file C:\ORACLE\ORADAT

A\DB01\ARCHIVE\DB01T001S00007.ARC

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00006.ARC thre

ad=1 sequence=6

archive log filename=C:\ORACLE\ORADATA\DB01\ARCHIVE\DB01T001S00007.ARC thre

ad=1 sequence=7

media recovery complete

Finished recover at 2003-03-07:00:35:15

 

database opened

 

RMAN>

 

 

 

This completes this practice.

 

 

 

ã Oracle Corporation, 2002

1