设为首页 加入收藏

TOP

rm-rf误操作的恢复过程(二)
2014-11-24 08:14:11 来源: 作者: 【 】 浏览:6
Tags:rm-rf 操作 恢复 过程
racle/oradata/ora10g/undotbs01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3

--查看dbwr进程,判断需要恢复文件句柄所在目录
SQL> !ps -ef|grep ora_dbw
oracle 2912 1 0 12:37 00:00:00 ora_dbw0_ora10g
oracle 3078 3032 0 12:48 pts/3 00:00:00 /bin/bash -c ps -ef|grep ora_dbw
oracle 3080 3078 0 12:48 pts/3 00:00:00 grep ora_dbw

其实这个时候,所有oracle的进程都还在,都是以ora_开头的都是oracle的后台进程:
SQL> !ps -ef|grep ora_
oracle 2906 1 0 12:37 00:00:00 ora_pmon_ora10g
oracle 2908 1 0 12:37 00:00:00 ora_psp0_ora10g
oracle 2910 1 0 12:37 00:00:00 ora_mman_ora10g
oracle 2912 1 0 12:37 00:00:00 ora_dbw0_ora10g
oracle 2914 1 0 12:37 00:00:00 ora_lgwr_ora10g
oracle 2916 1 0 12:37 00:00:00 ora_ckpt_ora10g
oracle 2918 1 0 12:38 00:00:01 ora_smon_ora10g
oracle 2920 1 0 12:38 00:00:00 ora_reco_ora10g
oracle 2922 1 0 12:38 00:00:00 ora_cjq0_ora10g
oracle 2924 1 0 12:38 00:00:01 ora_mmon_ora10g
oracle 2926 1 0 12:38 00:00:00 ora_mmnl_ora10g
oracle 2928 1 0 12:38 00:00:00 ora_d000_ora10g
oracle 2930 1 0 12:38 00:00:00 ora_s000_ora10g
oracle 2934 1 0 12:38 00:00:00 ora_arc0_ora10g
oracle 2936 1 0 12:38 00:00:00 ora_arc1_ora10g
oracle 2941 1 0 12:38 00:00:00 ora_qmnc_ora10g
oracle 2943 1 0 12:38 00:00:00 ora_q000_ora10g
oracle 2945 1 0 12:38 00:00:00 ora_q001_ora10g
oracle 3077 1 0 12:48 00:00:00 ora_j000_ora10g
oracle 3085 3032 0 12:49 pts/3 00:00:00 /bin/bash -c ps -ef|grep ora_
oracle 3087 3085 0 12:49 pts/3 00:00:00 /bin/bash -c ps -ef|grep ora_

由此可知,我们需要的被删除的文件句柄在/proc/2912/fd下

三、开始恢复误删除的文件

--恢复数据文件和控制文件
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@ora10g ~]$ cd /proc/2912
[oracle@ora10g 2912]$ ll
total 0
dr-xr-xr-x 2 oracle oinstall 0 Aug 25 12:51 attr
-r-------- 1 oracle oinstall 0 Aug 25 12:51 auxv
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:48 cmdline
-rw-r--r-- 1 oracle oinstall 0 Aug 25 12:51 coredump_filter
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:51 cpuset
lrwxrwxrwx 1 oracle oinstall 0 Aug 25 12:51 cwd -> /u01/app/oracle/product/10.2.0/db_1/dbs
-r-------- 1 oracle oinstall 0 Aug 25 12:51 environ
lrwxrwxrwx 1 oracle oinstall 0 Aug 25 12:51 exe -> /u01/app/oracle/product/10.2.0/db_1/bin/oracle
dr-x------ 2 oracle oinstall 0 Aug 25 12:51 fd
-r-------- 1 oracle oinstall 0 Aug 25 12:51 limits
-rw-r--r-- 1 oracle oinstall 0 Aug 25 12:51 loginuid
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:37 maps
-rw------- 1 oracle oinstall 0 Aug 25 12:51 mem
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:51 mounts
-r-------- 1 oracle oinstall 0 Aug 25 12:51 mountstats
-rw-r--r-- 1 oracle oinstall 0 Aug 25 12:51 oom_adj
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:51 oom_score
lrwxrwxrwx 1 oracle oinstall 0 Aug 25 12:51 root -> /
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:51 schedstat
-r-------- 1 oracle oinstall 0 Aug 25 12:51 smaps
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:37 stat
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:51 statm
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:48 status
dr-xr-xr-x 3 oracle oinstall 0 Aug 25 12:51 task
-r--r--r-- 1 oracle oinstall 0 Aug 25 12:51 wchan
[oracle@ora10g 2912]$ cd fd
[oracle@ora10g fd]$ ls -ltr
total 0
lr-x------ 1 oracle oinstall 64 Aug 25 12:51 0 -> /dev/null
l-wx------ 1 oracle oinstall 64 Aug 25 12:51 6 -> /u01/app/oracle/admin/ora10g/bdump/alert_ora10g.log
l-wx------ 1 oracle oinstall 64 Aug 25 12:51 5 -> /u01/app/oracle/admin/ora10g/udump/
首页 上一页 1 2 3 4 5 6 7 下一页 尾页 2/11/11
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇利用分析函数实现翻页 下一篇Hadoop2.3.0详细安装过程

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis on AWS:Elast (2025-12-27 04:19:30)
·在 Spring Boot 项目 (2025-12-27 04:19:27)
·使用华为开发者空间 (2025-12-27 04:19:24)
·Getting Started wit (2025-12-27 03:49:24)
·Ubuntu 上最好用的中 (2025-12-27 03:49:20)