Thursday, January 24, 2013

(Failed to ) Play with RMAN RECOVER BLOCK command

Objective:  to use RMAN BLOCK recovery for media corruption mentioned in

Amazing Automatic Block Media Recovery by Active Data Guard


1. Verify that I have a valid RMAN backup.

2. Bring down active data gurad.

orarac2poc:DGS:/home/oracle> dgmgrl
DGMGRL for Linux: Version 11.2.0.2.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle123
Connected.
DGMGRL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

3. Corrupt the block

17:50:32 SYS@DG> select * from liqy.t1;

        F1
----------
         1

17:50:33 SYS@DG> !
[oracle@orarac1poc DG]$ !pwd
pwd
/u01/oradata/DG
[oracle@orarac1poc DG]$ ls -lrt *user*
-rw-r----- 1 oracle asmadmin 5251072 Jan 23 18:25 users01.dbf.bak
-rw-r----- 1 oracle oinstall 5251072 Jan 24 10:13 users01.dbf.201301241454
-rw-r----- 1 oracle asmadmin 5251072 Jan 24 17:38 users01.dbf
[oracle@orarac1poc DG]$ cp -p users01.dbf users01.dbf.201301241738
[oracle@orarac1poc DG]$ dd if=/u01/oradata/DG/users01.dbf of=/u01/oradata/DG/users01.dbf count=1 bs=8192 skip=130 seek=131 conv=notrunc
1+0 records in
1+0 records out
8192 bytes (8.2 kB) copied, 7.2e-05 seconds, 114 MB/s
[oracle@orarac1poc DG]$ exit
exit

17:51:39 SYS@DG> select * from liqy.t1;

        F1
----------
         1

17:52:13 SYS@DG> prompt need to  flush the buffer cache
need to  flush the buffer cache
17:52:23 SYS@DG> alter system flush buffer_cache;

System altered.

17:52:27 SYS@DG> select * from liqy.t1;
select * from liqy.t1
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 131)
ORA-01110: data file 4: '/u01/oradata/DG/users01.dbf'

4. the dbv result.

orarac1poc:DG:/u01/oradata/DG> dbv file=/u01/oradata/DG/users01.dbf blocksize=8192

DBVERIFY: Release 11.2.0.2.0 - Production on Thu Jan 24 18:14:02 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - Verification starting : FILE = /u01/oradata/DG/users01.dbf
Page 131 is marked corrupt
Corrupt block relative dba: 0x01000083 (file 4, block 131)
Bad header found during dbv:
Data in bad block:
 type: 35 format: 2 rdba: 0x01000082
 last change scn: 0x0000.000f3818 seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x38182301
 check value in block header: 0x442e
 computed block checksum: 0x0



DBVERIFY - Verification complete

Total Pages Examined         : 640
Total Pages Processed (Data) : 4
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 577
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 58
Total Pages Marked Corrupt   : 1
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 997400 (0.997400)

4.1 Call RMAN to recover it .


orarac1poc:DG:/u01/oradata/DG> rman target / catalog rman/rman123@RCAT

Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jan 24 17:54:15 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DG (DBID=1716975309)
connected to recovery catalog database

RMAN> recover datafile '/u01/oradata/DG/users01.dbf' block 131 ;

Starting recover at Jan 24 2013 17:55:36
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=178 device type=DISK
searching flashback logs for block images until SCN 3956191
finished flashback log search, restored 0 blocks

channel ORA_DISK_1: restoring block(s)
channel ORA_DISK_1: specifying block(s) to restore from backup set
restoring blocks of datafile 00004
channel ORA_DISK_1: reading from backup piece /u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp
channel ORA_DISK_1: piece handle=/u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp tag=TAG20130124T173127
channel ORA_DISK_1: restored block(s) from backup piece 1
channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01

starting media recovery
some blocks not recovered: See trace file for details
media recovery complete, elapsed time: 00:00:01

Finished recover at Jan 24 2013 17:55:41

4.2   A sample trace file , shows the block is still corrupted.

orarac1poc:ORCL1:/home/oracle> cat /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_21403.trc
Trace file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_21403.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_2
System name:    Linux
Node name:      orarac1poc
Release:        2.6.18-238.el5
Version:        #1 SMP Sun Dec 19 14:22:44 EST 2010
Machine:        x86_64
VM name:        VMWare Version: 6
Instance name: DG
Redo thread mounted by this instance: 1
Oracle process number: 80
Unix process pid: 21403, image: oracle@orarac1poc (TNS V1-V3)


*** 2013-01-24 18:16:44.877
*** SESSION ID:(13.75) 2013-01-24 18:16:44.877
*** CLIENT ID:() 2013-01-24 18:16:44.877
*** SERVICE NAME:(SYS$USERS) 2013-01-24 18:16:44.877
*** MODULE NAME:(backup full datafile) 2013-01-24 18:16:44.877
*** ACTION NAME:(0000019 STARTED19) 2013-01-24 18:16:44.877

Hex dump of (file 4, block 131)
Dump of memory from 0x00002AAC52734000 to 0x00002AAC52736000
2AAC52734000 0000A223 01000082 000F3818 04010000  [#........8......]
2AAC52734010 0000442E 00000000 00000000 00000000  [.D..............]
2AAC52734020 00000000 00000001 00000008 00000A9C  [................]
2AAC52734030 00000000 00000008 00000008 01000088  [................]
2AAC52734040 00000000 00000000 00000000 00000005  [................]
2AAC52734050 00000000 00000000 00000000 00000000  [................]
2AAC52734060 00000008 00000008 01000088 00000000  [................]
2AAC52734070 00000000 00000000 00000005 01000080  [................]
2AAC52734080 01000080 00000000 00000000 00000000  [................]
2AAC52734090 00000000 00000000 00000000 00000000  [................]
        Repeat 3 times
2AAC527340D0 00000001 00002000 00000000 00001434  [..... ......4...]
2AAC527340E0 00000000 01000081 00000001 01000080  [................]
2AAC527340F0 01000081 00000000 00000000 00000000  [................]
2AAC52734100 00000000 00000000 00000001 00000000  [................]
2AAC52734110 0000EFAA 10000000 01000080 00000008  [................]
2AAC52734120 00000000 00000000 00000000 00000000  [................]
        Repeat 152 times
2AAC52734AB0 01000080 01000083 00000000 00000000  [................]
2AAC52734AC0 00000000 00000000 00000000 00000000  [................]
        Repeat 151 times
2AAC52735440 00000000 00000000 01000081 00000000  [................]
2AAC52735450 00000000 00000000 00000000 00000000  [................]
        Repeat 185 times
2AAC52735FF0 00000000 00000000 00000000 38182301  [.............#.8]
Corrupt block relative dba: 0x01000083 (file 4, block 131)
Bad header found during validation
Data in bad block:
 type: 35 format: 2 rdba: 0x01000082
 last change scn: 0x0000.000f3818 seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x38182301
 check value in block header: 0x442e
 computed block checksum: 0x0
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data
Reread of blocknum=131, file=/u01/oradata/DG/users01.dbf. found same corrupt data

dbkh_create_finding: BEGIN
dbkhu_prepare_default_msgobj: BEGIN
dbkhu_prepare_default_msgobj:; name_id=25, type=2, flags=1
dbkhu_get_default_msg_def: BEGIN
dbkhu_get_default_msg_def: END
dbkhu_prepare_default_msgobj:: MSG PARAMS-1; i=2
dbkhu_prepare_default_msgobj: END
dbkhu_prepare_default_msgobj: BEGIN
dbkhu_prepare_default_msgobj:; name_id=25, type=2, flags=2
dbkhu_get_default_msg_def: BEGIN
dbkhu_get_default_msg_def: END
dbkhu_prepare_default_msgobj:: MSG PARAMS-2; i=1
dbkhu_prepare_default_msgobj: END
dbkhu_prepare_default_msgobj: BEGIN
dbkhu_prepare_default_msgobj:; name_id=26, type=2, flags=1
dbkhu_get_default_msg_def: BEGIN
dbkhu_get_default_msg_def: END
dbkhu_prepare_default_msgobj:: MSG PARAMS-1; i=3
dbkhu_prepare_default_msgobj: END
dbkhu_prepare_default_msgobj: BEGIN
dbkhu_prepare_default_msgobj:; name_id=26, type=2, flags=2
dbkhu_get_default_msg_def: BEGIN
dbkhu_get_default_msg_def: END
dbkhu_prepare_default_msgobj:: MSG PARAMS-2; i=2
dbkhu_prepare_default_msgobj: END
dbkh_create_finding: END

4.3 SQL still shows failure.

exitorarac1poc:DG:/u01/oradata/sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 24 17:56:18 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> select * from liqy.t1;
select * from liqy.t1
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 131)
ORA-01110: data file 4: '/u01/oradata/DG/users01.dbf'


SYS@DG> select * from v$recover_file;

no rows selected

SYS@DG> select file_id, status from dba_data_files ;

   FILE_ID STATUS
---------- ---------
         1 AVAILABLE
         2 AVAILABLE
         3 AVAILABLE
         4 AVAILABLE
         5 AVAILABLE


SYS@DG> select tablespace_name, status from dba_tablespaces;

TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINE
DG1_TBS                        ONLINE

6 rows selected.

SYS@DG> SELECT * FROM V$DATABASE_BLOCK_CORRUPTION;

     FILE#     BLOCK#     BLOCKS CORRUPTION_CHANGE# CORRUPTIO
---------- ---------- ---------- ------------------ ---------
         4        131          1                  0 CORRUPT

4.4 Try "recover corruption list" command.

RMAN> recover corruption list;

Starting recover at Jan 24 2013 18:06:34
using channel ORA_DISK_1
searching flashback logs for block images until SCN 3956191
finished flashback log search, restored 0 blocks

channel ORA_DISK_1: restoring block(s)
channel ORA_DISK_1: specifying block(s) to restore from backup set
restoring blocks of datafile 00004
channel ORA_DISK_1: reading from backup piece /u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp
channel ORA_DISK_1: piece handle=/u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp tag=TAG20130124T173127
channel ORA_DISK_1: restored block(s) from backup piece 1
channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01

starting media recovery
some blocks not recovered: See trace file for details
media recovery complete, elapsed time: 00:00:01

Finished recover at Jan 24 2013 18:06:37

RMAN> exit


Recovery Manager complete.


orarac1poc:DG:/u01/oradata/DG> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 24 18:06:54 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> SELECT * FROM V$DATABASE_BLOCK_CORRUPTION;

     FILE#     BLOCK#     BLOCKS CORRUPTION_CHANGE# CORRUPTIO
---------- ---------- ---------- ------------------ ---------
         4        131          1                  0 CORRUPT

SYS@DG> select * from liqy.t1;
select * from liqy.t1
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 131)
ORA-01110: data file 4: '/u01/oradata/DG/users01.dbf'


4.5 reovery in MOUNT state, still fails.

SYS@DG> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@DG> startup mount
ORACLE instance started.

Total System Global Area  680607744 bytes
Fixed Size                  2229600 bytes
Variable Size             419433120 bytes
Database Buffers          251658240 bytes
Redo Buffers                7286784 bytes
Database mounted.
SYS@DG> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
orarac1poc:DG:/u01/oradata/DG> rman target / catalog rman/rman123@RCAT

Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jan 24 18:08:17 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DG (DBID=1716975309, not open)
connected to recovery catalog database

RMAN> recover datafile 4 block 131;

Starting recover at Jan 24 2013 18:08:23
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=140 device type=DISK
searching flashback logs for block images until SCN 3956191
finished flashback log search, restored 0 blocks

channel ORA_DISK_1: restoring block(s)
channel ORA_DISK_1: specifying block(s) to restore from backup set
restoring blocks of datafile 00004
channel ORA_DISK_1: reading from backup piece /u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp
channel ORA_DISK_1: piece handle=/u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp tag=TAG20130124T173127
channel ORA_DISK_1: restored block(s) from backup piece 1
channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01

starting media recovery
some blocks not recovered: See trace file for details
media recovery complete, elapsed time: 00:00:01

Finished recover at Jan 24 2013 18:08:26

RMAN> BLOCKRECOVER corruption list;

Starting recover at Jan 24 2013 18:11:47
using channel ORA_DISK_1
searching flashback logs for block images until SCN 3956191
finished flashback log search, restored 0 blocks

channel ORA_DISK_1: restoring block(s)
channel ORA_DISK_1: specifying block(s) to restore from backup set
restoring blocks of datafile 00004
channel ORA_DISK_1: reading from backup piece /u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp
channel ORA_DISK_1: piece handle=/u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp tag=TAG20130124T173127
channel ORA_DISK_1: restored block(s) from backup piece 1
channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01

starting media recovery
some blocks not recovered: See trace file for details
media recovery complete, elapsed time: 00:00:01

Finished recover at Jan 24 2013 18:11:49

RMAN> exit


Recovery Manager complete.
orarac1poc:DG:/u01/oradata/DG> ls -lrt *user*.dbf
-rw-r----- 1 oracle asmadmin 5251072 Jan 24 18:07 users01.dbf
orarac1poc:DG:/u01/oradata/DG> dbv file=/u01/oradata/DG/users01.dbf blocksize=8192

DBVERIFY: Release 11.2.0.2.0 - Production on Thu Jan 24 18:14:02 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - Verification starting : FILE = /u01/oradata/DG/users01.dbf
Page 131 is marked corrupt
Corrupt block relative dba: 0x01000083 (file 4, block 131)
Bad header found during dbv:
Data in bad block:
 type: 35 format: 2 rdba: 0x01000082
 last change scn: 0x0000.000f3818 seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x38182301
 check value in block header: 0x442e
 computed block checksum: 0x0



DBVERIFY - Verification complete

Total Pages Examined         : 640
Total Pages Processed (Data) : 4
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 577
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 58
Total Pages Marked Corrupt   : 1
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 997400 (0.997400)
orarac1poc:DG:/u01/oradata/DG> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 24 18:15:31 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> alter database open;

Database altered.

SYS@DG> select * from liqy.t1;
select * from liqy.t1
                   *
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 131)
ORA-01110: data file 4: '/u01/oradata/DG/users01.dbf'


SYS@DG> exit

4.6 No choice, have to restore the whole file.


orarac1poc:DG:/u01/oradata/DG> rman target / catalog rman/rman123@RCAT

Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jan 24 18:16:37 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DG (DBID=1716975309)
connected to recovery catalog database

RMAN> backup validate check logical database;

Starting backup at Jan 24 2013 18:16:40
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=13 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/oradata/DG/system01.dbf
input datafile file number=00002 name=/u01/oradata/DG/sysaux01.dbf
input datafile file number=00003 name=/u01/oradata/DG/undotbs01.dbf
input datafile file number=00005 name=/u01/oradata/DG/dg1_tbs01.dbf
input datafile file number=00004 name=/u01/oradata/DG/users01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              72687        131072          3960192
  File Name: /u01/oradata/DG/system01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              46176
  Index      0              9605
  Other      0              2604

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2    OK     0              32425        76800           3960190
  File Name: /u01/oradata/DG/sysaux01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              16411
  Index      0              16736
  Other      0              11228

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3    OK     0              22273        64000           3960192
  File Name: /u01/oradata/DG/undotbs01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0
  Index      0              0
  Other      0              41727

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    FAILED 0              58           641             997400
  File Name: /u01/oradata/DG/users01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              4
  Index      0              0
  Other      1              578

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5    OK     0              1137         1280            1019839
  File Name: /u01/oradata/DG/dg1_tbs01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              10
  Index      0              0
  Other      0              133

validate found one or more corrupt blocks
See trace file /u01/app/oracle/diag/rdbms/dg/DG/trace/DG_ora_21403.trc for details
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2
Control File OK     0              620
Finished backup at Jan 24 2013 18:17:20



RMAN> shutdown immediate

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     680607744 bytes

Fixed Size                     2229600 bytes
Variable Size                419433120 bytes
Database Buffers             251658240 bytes
Redo Buffers                   7286784 bytes

RMAN> restore datafile '/u01/oradata/DG/users01.dbf';

Starting restore at Jan 24 2013 18:27:15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00004 to /u01/oradata/DG/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp
channel ORA_DISK_1: piece handle=/u01/oradata/DG/FRA/DG/backupset/2013_01_24/o1_mf_nnndf_TAG20130124T173127_8j1zvkyz_.bkp tag=TAG20130124T173127
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at Jan 24 2013 18:27:17

RMAN> recover datafile '/u01/oradata/DG/users01.dbf';

Starting recover at Jan 24 2013 18:27:28
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 55 is already on disk as file /u01/oradata/DG/FRA/DG/archivelog/2013_01_24/o1_mf_1_55_8j1zypcg_.arc
archived log for thread 1 with sequence 56 is already on disk as file /u01/oradata/DG/FRA/DG/archivelog/2013_01_24/o1_mf_1_56_8j22g9jh_.arc
archived log for thread 1 with sequence 57 is already on disk as file /u01/oradata/DG/FRA/DG/archivelog/2013_01_24/o1_mf_1_57_8j22gcl1_.arc
archived log file name=/u01/oradata/DG/FRA/DG/archivelog/2013_01_24/o1_mf_1_55_8j1zypcg_.arc thread=1 sequence=55
media recovery complete, elapsed time: 00:00:00
Finished recover at Jan 24 2013 18:27:29

RMAN> open database;

database opened

RMAN> sql "select * from liqy.t1" ;

sql statement: select * from liqy.t1

RMAN> exit


Recovery Manager complete.
orarac1poc:DG:/u01/oradata/DG> dbv file=/u01/oradata/DG/users01.dbf blocksize=8192

DBVERIFY: Release 11.2.0.2.0 - Production on Thu Jan 24 18:28:58 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - Verification starting : FILE = /u01/oradata/DG/users01.dbf


DBVERIFY - Verification complete

Total Pages Examined         : 640
Total Pages Processed (Data) : 5
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 577
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 58
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 997407 (0.997407)
orarac1poc:DG:/u01/oradata/DG> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 24 18:29:07 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SYS@DG> select * from liqy.t1;

        F1
----------
         1

SYS@DG> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options


Can anyone advise me, what was wrong ?


[update on 25 Jan 2013]

finally get the answer in my next post.

No comments:

Post a Comment