首页 > 其他分享 >rm datafile恢复实验【未完】

rm datafile恢复实验【未完】

时间:2023-05-24 14:32:50浏览次数:35  
标签:datafile fd 4070 dbf 实验 oracle rm BBED proc


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.log2.
[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.dbfcp /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

标签:datafile,fd,4070,dbf,实验,oracle,rm,BBED,proc
From: https://blog.51cto.com/u_16127434/6339902

相关文章

  • java 实验总结
    (1)前言:前三次的题目集,大概囊括了最基础的输入输出、类的创建;字符串的各种操作(定位某个特点字符在字符串中的下标、提取某段需要的子字符串、对于某个字符或某个子字符串的格式判断等等)、类的交互、函数的创建与使用以及正则表达式的运用等等。题量不大,除却第一次有9个题以外,第二次......
  • nrm 安装报错解决
    在执行nrmls时出现错误Error[ERR_REQUIRE_ESM]:MustuseimporttoloadESModule:...require()ofESmodulesisnotsupported....原因:应该使用open的CommonJs规范的包,现在openv9.0.0是ESModule版本的包解决办法:执行以下命令即可npminstall-gnrm......
  • System.Windows.Forms.TextBox ImeMode只输入数字或者只输入文字快以及捷键ctrl+c ctr
    //设置输入法发编辑模式,例如只输入数字或者只输入文字等等txtPassword.ImeMode=ImeMode.Off;//指示是否启用定义的快捷方式,例如设置快捷键ctrl+cctrl+v是否可用txtPassword.ShortcutsEnabled=false;txtPassword.Password......
  • 修改arm板开机logo,ppm转换需要用ascii而不是rawbits binary
    网上在线转ppm格式不好用,转出来的是rawbits的二进制格式,PPM编码(ASCII或binary),关于图片格式编码参见此处我需要ascii编码sudoapt-getinstallnetpbm        $bmptoppmpic.bmp>temp1.ppm//生成ppm        $ppmquant224temp1.ppm>temp2.ppm//转换成2......
  • 实验4 函数与异常处理编程
    实验任务一task1:程序源代码:1print(sum)2sum=423print(sum)45definc(n):6sum=n+17print(sum)8returnsum910sum=inc(7)+inc(7)11print(sum)运行结果:实验任务二task2-1源代码:1deffunc1(a,b,c,d,e,f):2......
  • 网络对抗实验八 Web安全
    目录一、实践内容(一)前端HTML1.打开Apache2.新建表单3.查看表单(二)前端javascipt1.添加一段JavaScript代码2.效果3.登录成功界面4.效果(三)Web后端:MySQL基础1.启动MySQL2.创建用户、修改密码、建表(四)Web后端:编写PHP网页1.安装php2.编写php代码3.效果(五)SQL注入,XSS攻击测试1......
  • 实验4 函数与异常处理编程
    任务1print(sum)sum=42print(sum)definc(n):sum=n+1print(sum)returnsumsum=inc(7)+inc(7)print(sum)问题答案:不是。line1为内置作用域,line3和line11为全局作用域,line7为局部作用域任务2_1deffunc1(a,b,c,d,e,f):'''返回......
  • 实验4
    实验任务1源代码:print(sum)sum=42print(sum)definc(n):sum=n+1print(sum)returnsumsum=inc(7)+inc(7)print(sum)运行结果:问题:task1.py源码中,共有4处有python语句 print(sum) (line1,line3,line7,line11)。 这4处使用的标识符sum是......
  • 实验四 函数与异常处理编辑
    实验任务一实验源码1print(sum)2sum=423print(sum)4definc(n):5sum=n+16print(sum)7returnsum8sum=inc(7)+inc(7)9print(sum)运行测试截图问题:实验任务1中,共有四处有print(sum)(line1,line3,line7,line11)。这四处使用的标识符sum......
  • 实验四
    实验任务一实验源码:1print(sum)2sum=423print(sum)45definc(n):6sum=n+17print(sum)8returnsum910sum=inc(7)+inc(7)11print(sum)实验结果截图:line1:内置作用域 line3:全局作用域 line7:局部作用域 line11:全局作用域实验......