Recovery

1. Complete Recovery

1.1. Here I will delete all the data files and will restore from the backup we taken above. Rename all data files with mv command in Linux. This is just to have a backup with us.

$ sqlplus '/ as sysdba'

SQL* Plus: Release 9.2.0.6.0 - Production on Mon Sep 11 12:14:30 2006

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

Connected to an idle instance.

SQL> startup database mount;

SP2-0714: invalid combination of STARTUP options

SQL> startup mount;

ORACLE instance started.

Total System Global Area 581506668 bytes

Fixed Size 452204 bytes

Variable Size 402653184 bytes

Database Buffers 167772160 bytes

Redo Buffers 10629120 bytes

Database mounted.

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01157: cannot identify/ lock data file 36 - see DBWR trace file

ORA-01110: data file 36: '/u01/oracle/ visdata/ tx_data10.dbf'

 

1.2. Connect rman to restore datafiles in another terminal.

$ rman target sys/sys_password

Recovery Manager: Release 9.2.0.6.0 - Production

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

connected to target database: VIS (DBID= 1772376983)

RMAN> restore database;

Starting restore at 11-SEP-06

using target database controlfile instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid= 12 devtype= DISK

channel ORA_DISK_1: starting datafile backupset restore

89/196

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

restoring datafile 00001 to /u01/oracle/ visdata/ sys1.dbf

restoring datafile 00002 to /u01/oracle/ visdata/ sys2.dbf

restoring datafile 00003 to /u01/oracle/ visdata/ sys3.dbf

restoring datafile 00004 to /u01/oracle/ visdata/ sys4.dbf

restoring datafile 00005 to /u01/oracle/ visdata/ sys5.dbf

restoring datafile 00006 to /u01/oracle/ visdata/ sys6.dbf

restoring datafile 00007 to /u01/oracle/ visdata/ sys7.dbf

restoring datafile 00008 to /u01/oracle/ visdata/undo01.dbf

restoring datafile 00009 to /u01/oracle/ visdata/undo02.dbf

restoring datafile 00010 to /u01/oracle/ visdata/undo03.dbf

restoring datafile 00011 to /u01/oracle/ visdata/undo04.dbf

restoring datafile 00012 to /u01/oracle/ visdata/archive1.dbf

restoring datafile 00013 to /u01/oracle/ visdata/archive2.dbf

restoring datafile 00014 to /u01/oracle/ visdata/media1.dbf

restoring datafile 00015 to /u01/oracle/ visdata/media2.dbf

restoring datafile 00016 to /u01/oracle/ visdata/media3.dbf

restoring datafile 00017 to /u01/oracle/ visdata/nologging1.dbf

restoring datafile 00018 to /u01/oracle/ visdata/queues1.dbf

restoring datafile 00019 to /u01/oracle/ visdata/queues2.dbf

restoring datafile 00020 to /u01/oracle/ visdata/ reference1.dbf

restoring datafile 00021 to /u01/oracle/ visdata/ reference2.dbf

restoring datafile 00022 to /u01/oracle/ visdata/ summary1.dbf

restoring datafile 00023 to /u01/oracle/ visdata/ summary2.dbf

restoring datafile 00024 to /u01/oracle/ visdata/ summary3.dbf

restoring datafile 00025 to /u01/oracle/ visdata/ summary4.dbf

restoring datafile 00026 to /u01/oracle/ visdata/ summary5.dbf

restoring datafile 00027 to /u01/oracle/ visdata/ tx_data1.dbf

restoring datafile 00028 to /u01/oracle/ visdata/ tx_data2.dbf

restoring datafile 00029 to /u01/oracle/ visdata/ tx_data3.dbf

restoring datafile 00030 to /u01/oracle/ visdata/ tx_data4.dbf

restoring datafile 00031 to /u01/oracle/ visdata/ tx_data5.dbf

restoring datafile 00032 to /u01/oracle/ visdata/ tx_data6.dbf

restoring datafile 00033 to /u01/oracle/ visdata/ tx_data7.dbf

restoring datafile 00034 to /u01/oracle/ visdata/ tx_data8.dbf

restoring datafile 00035 to /u01/oracle/ visdata/ tx_data9.dbf

restoring datafile 00036 to /u01/oracle/ visdata/ tx_data10.dbf

restoring datafile 00037 to /u01/oracle/ visdata/ tx_data11.dbf

restoring datafile 00038 to /u01/oracle/ visdata/ tx_idx1.dbf

restoring datafile 00039 to /u01/oracle/ visdata/ tx_idx2.dbf

restoring datafile 00040 to /u01/oracle/ visdata/ tx_idx3.dbf

restoring datafile 00041 to /u01/oracle/ visdata/ tx_idx4.dbf

restoring datafile 00042 to /u01/oracle/ visdata/ tx_idx5.dbf

restoring datafile 00043 to /u01/oracle/ visdata/ tx_idx6.dbf

restoring datafile 00044 to /u01/oracle/ visdata/ tx_idx7.dbf

restoring datafile 00045 to /u01/oracle/ visdata/ tx_idx8.dbf

restoring datafile 00046 to /u01/oracle/ visdata/ tx_idx9.dbf

restoring datafile 00047 to /u01/oracle/ visdata/ tx_idx10.dbf

restoring datafile 00048 to /u01/oracle/ visdata/ tx_idx11.dbf

restoring datafile 00049 to /u01/oracle/ visdata/apps_ts_tx_interface.dbf

restoring datafile 00050 to /u01/oracle/ visdata/ ctx1.dbf

restoring datafile 00053 to /u01/oracle/ visdata/odm.dbf

restoring datafile 00055 to /u01/oracle/ visdata/olap.dbf

restoring datafile 00056 to /u01/oracle/ visdata/owa1.dbf

restoring datafile 00057 to /u01/oracle/ visdata/portal.dbf

restoring datafile 00058 to /u01/oracle/ visdata/mobile01.dbf

channel ORA_DISK_1: restored backup piece 1

piece handle= /u01/backup/data/VIS_datafiles_600565802_0ehsnq1a_1_1.bak tag=

TAG20060907T235002 params= NULL

channel ORA_DISK_1: restore complete

Finished restore at 11-SEP-06

 

 1.3. After restore recover the database.

SQL> recover database;

ORA-00279: change 8173926267640 generated at 09/07/2006 23:50:02 needed for

thread 1

ORA-00289: suggestion : /u01/oracle/ visdb/9.2.0/dbs/arch1_320.dbf

ORA-00280: change 8173926267640 for thread 1 is in sequence # 320

Specify log: { < RET> = suggested | filename | AUTO | CANCEL}

AUTO

Log applied.

Media recovery complete.

SQL> alter database open;

Database altered.

SQL>