rm datafile恢复实验【未完】

from 手记4

1.

[oracle@redhat5 asm11g]$ ls -tl
total 1889656
-rw-r----- 1 oracle oinstall   9748480 Aug 29 05:17 control01.ctl
-rw-r----- 1 oracle oinstall  52429312 Aug 29 05:17 redo02.log
-rw-r----- 1 oracle oinstall 566239232 Aug 29 05:17 sysaux01.dbf
-rw-r----- 1 oracle oinstall 744497152 Aug 29 05:17 system01.dbf
-rw-r----- 1 oracle oinstall 120594432 Aug 29 05:17 undotbs01.dbf
-rw-r----- 1 oracle oinstall  30416896 Aug 29 04:50 temp01.dbf
-rw-r----- 1 oracle oinstall 328343552 Aug 29 04:47 example01.dbf
-rw-r----- 1 oracle oinstall  52429312 Aug 29 04:47 redo01.log
-rw-r----- 1 oracle oinstall  52429312 Aug 29 04:47 redo03.log
-rw-r----- 1 oracle oinstall   5251072 Aug 29 04:47 users01.dbf
[oracle@redhat5 asm11g]$ rm users01.dbf


[oracle@redhat5 asm11g]$ ls -tl
total 1884516
-rw-r----- 1 oracle oinstall   9748480 Aug 29 06:07 control01.ctl
-rw-r----- 1 oracle oinstall  52429312 Aug 29 06:07 redo02.log
-rw-r----- 1 oracle oinstall 566239232 Aug 29 06:07 sysaux01.dbf
-rw-r----- 1 oracle oinstall 120594432 Aug 29 06:07 undotbs01.dbf
-rw-r----- 1 oracle oinstall 744497152 Aug 29 06:05 system01.dbf
-rw-r----- 1 oracle oinstall  30416896 Aug 29 04:50 temp01.dbf
-rw-r----- 1 oracle oinstall 328343552 Aug 29 04:47 example01.dbf
-rw-r----- 1 oracle oinstall  52429312 Aug 29 04:47 redo01.log
-rw-r----- 1 oracle oinstall  52429312 Aug 29 04:47 redo03.log

2.

[oracle@redhat5 ~]$ ps -ef |grep dbw
oracle    4070     1  0 04:47 ?        00:00:00 ora_dbw0_asm11g1
oracle    4412  4314  0 05:02 pts/3    00:00:00 grep dbw


3.

[oracle@redhat5 ~]$ ls /proc/4070/fd
0  1  10  11  12  13  14  15  16  17  18  2  256  257  258  259  260  261  262  263  3  4  5  6  7  8  9


4.

BBED> set filename '/proc/4070/fd/0'
BBED-00304: unable to read from file '/proc/4070/fd/0'


BBED> set filename 'proc/4707/fd/1'
BBED-00303: unable to open file 'proc/4707/fd/1'


BBED> set filename '/proc/4070/fd/1'
BBED-00304: unable to read from file '/proc/4070/fd/1'


BBED> set filename '/proc/4070/fd/10'
        FILENAME        /proc/4070/fd/10

BBED> p kcvfh.kcvfhrfn
BBED-00400: invalid blocktype (00)


BBED> set filename '/proc/4070/fd/11'
        FILENAME        /proc/4070/fd/11

BBED> p kcvfh.kcvfhrfn
BBED-00400: invalid blocktype (00)


BBED> set filename '/proc/4070/fd/12'
        FILENAME        /proc/4070/fd/12

BBED> p kcvfh.kcvfhrfn
BBED-00400: invalid blocktype (68)


BBED> set filename '/proc/4070/fd/13'
        FILENAME        /proc/4070/fd/13

BBED> p kcvfh.kcvfhrfn
BBED-00400: invalid blocktype (21)


BBED> set filename '/proc/4070/fd/14'
BBED-00304: unable to read from file '/proc/4070/fd/14'


BBED> set filename '/proc/4070/fd/14'
BBED-00304: unable to read from file '/proc/4070/fd/14'


BBED> set filename '/proc/4070/fd/15'
        FILENAME        /proc/4070/fd/15

BBED> p kcvfh.kcvfhrfn
BBED-00400: invalid blocktype (00)


BBED> set filename '/proc/4070/fd/16'
        FILENAME        /proc/4070/fd/16

BBED> p kcvfh.kcvfhrfn
BBED-00400: invalid blocktype (68)


BBED> set filename '/proc/4070/fd/17'
BBED-00304: unable to read from file '/proc/4070/fd/17'


BBED> set filename '/proc/4070/fd/17'
BBED-00304: unable to read from file '/proc/4070/fd/17'


BBED> set filename '/proc/4070/fd/2'
BBED-00304: unable to read from file '/proc/4070/fd/2'


BBED> set filename '/proc/4070/fd/256'
        FILENAME        /proc/4070/fd/256

BBED> p kcvfh.kcvfhrfn
BBED-00400: invalid blocktype (21)


BBED> set filename '/proc/4070/fd/257'
        FILENAME        /proc/4070/fd/257

BBED> p kcvfh.kcvfhrfn
BBED-00400: invalid blocktype (21)


BBED> set filename '/proc/4070/fd/258'
        FILENAME        /proc/4070/fd/258

BBED> p kcvfh.kcvfhrfn
ub4 kcvfhrfn                                @368      0x00000001

BBED> set filename '/proc/4070/fd/259'
        FILENAME        /proc/4070/fd/259

BBED> p kcvfh.kcvfhrfn
ub4 kcvfhrfn                                @368      0x00000002

BBED> set filename '/proc/4070/fd/260'
        FILENAME        /proc/4070/fd/260

BBED> p kcvfh.kcvfhrfn
ub4 kcvfhrfn                                @368      0x00000003

BBED> set filename '/proc/4070/fd/261'
        FILENAME        /proc/4070/fd/261

BBED> p kcvfh.kcvfhrfn
ub4 kcvfhrfn                                @368      0x00000004


BBED> set filename '/proc/4070/fd/262'
        FILENAME        /proc/4070/fd/262

BBED> p kcvfh.kcvfhrfn
ub4 kcvfhrfn                                @368      0x00000005

BBED> set filename '/proc/4070/fd/263'
        FILENAME        /proc/4070/fd/263

BBED> p kcvfh.kcvfhrfn
ub4 kcvfhrfn                                @368      0x00000001

BBED> set exit
BBED-00202: invalid parameter (exit)


5.

  1* select file#,name from v$datafile
SQL> /

     FILE# NAME
---------- --------------------------------------------------
         1 /u01/app/oracle/oradata/asm11g/system01.dbf
         2 /u01/app/oracle/oradata/asm11g/sysaux01.dbf
         3 /u01/app/oracle/oradata/asm11g/undotbs01.dbf
         4 /u01/app/oracle/oradata/asm11g/users01.dbf
         5 /u01/app/oracle/oradata/asm11g/example01.dbf


SQL> select file#,creation_change#,creation_time from v$datafile_header;

     FILE# CREATION_CHANGE# CREATION_TIME
---------- ---------------- -------------------
         1                7 2010-09-05 05:49:14
         2             2178 2010-09-05 05:49:23
         3           969548 2010-09-05 06:24:14
         4                0
         5          1001748 2012-08-27 01:17:46

SQL> select file#,crscnbas,status$,blocks,spare1 from file$;

     FILE#   CRSCNBAS    STATUS$     BLOCKS     SPARE1
---------- ---------- ---------- ---------- ----------
         1          7          2      64000    4194306
         2       2178          2      51200    8388610
         3     969548          2       3200   12582914
         4      18151          2        640   16777218
         5    1001748          2      12800   20971522

6.

[oracle@redhat5 kfc]$ cp /proc/4070/261 /home/oracle/kfc/04.dbf
cp: cannot stat `/proc/4070/261': No such file or directory
[oracle@redhat5 kfc]$ cp /proc/4070/fd/260 /home/oracle/kfc/04.dbf
[oracle@redhat5 kfc]$ ls
04.dbf

cp /home/oracle/kfc/04.dbf users01.dbf


SQL> alter database datafile 4 offline;

Database altered.

SQL> alter database rename file
  2  '/u01/app/oracle/oradata/asm11g/users01.dbf' to '/home/oracle/kfc/users01.dbf;

Database altered.

SQL> recover datafile 4;
ORA-00283: 恢复会话因错误而取消 ORA-01110:
数据文件 4: '/home/oracle/kfc/04.dbf'
ORA-01122: 数据库文件 4 验证失败
ORA-01110: 数据文件 4: '/home/oracle/kfc/04.dbf'
ORA-01210: 数据文件标头发生介质损坏




7.竟然不报错,重启正常,一切有待再测,先记录下

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup  
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size                  2227032 bytes
Variable Size             989856936 bytes
Database Buffers          654311424 bytes
Redo Buffers                7122944 bytes
Database mounted.
Database opened.


[oracle@redhat5 asm11g]$ ls -tl
total 1889656
-rw-r----- 1 oracle oinstall   9748480 Aug 29 04:55 control01.ctl
-rw-r----- 1 oracle oinstall  52429312 Aug 29 04:55 redo02.log
-rw-r----- 1 oracle oinstall 566239232 Aug 29 04:55 sysaux01.dbf
-rw-r----- 1 oracle oinstall 120594432 Aug 29 04:55 undotbs01.dbf
-rw-r----- 1 oracle oinstall 744497152 Aug 29 04:53 system01.dbf
-rw-r----- 1 oracle oinstall  30416896 Aug 29 04:50 temp01.dbf
-rw-r----- 1 oracle oinstall 328343552 Aug 29 04:47 example01.dbf
-rw-r----- 1 oracle oinstall  52429312 Aug 29 04:47 redo01.log
-rw-r----- 1 oracle oinstall  52429312 Aug 29 04:47 redo03.log
-rw-r----- 1 oracle oinstall   5251072 Aug 29 04:47 users01.dbf



你可能感兴趣的:(rm datafile恢复实验【未完】)