时间:2015-01-19 17:56:43 作者:qipeng 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20150119/35276.html 手机查看 评论 反馈
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL》 alter database datafile 5 offline;
Database altered.
SQL》 recover datafile 5;
Media recovery complete.
SQL》 alter database datafile 5 online;
Database altered.
SQL》 shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL》 startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1273276 bytes
Variable Size 130024004 bytes
Database Buffers 150994944 bytes
Redo Buffers 2920448 bytes
Database mounted.
Database opened.
SQL》
成功恢复数据库
注:如果数据库重启之后,还能恢复吗,测试一下:
[oracle@primary dbwdn]$ rm users01.dbf[oracle@primary dbwdn]$ ps -ef |grep dbw0
oracle 3798 1 0 21:56 ? 00:00:00 ora_dbw0_dbwdn
oracle 4147 3439 0 22:07 pts/1 00:00:00 grep dbw0
[oracle@primary dbwdn]$ ll /proc/3798/fd
total 0
lr-x------ 1 oracle oinstall 64 Nov 27 22:07 0 -》 /dev/null
lr-x------ 1 oracle oinstall 64 Nov 27 22:07 1 -》 /dev/null
lr-x------ 1 oracle oinstall 64 Nov 27 22:07 10 -》 /dev/zero
lr-x------ 1 oracle oinstall 64 Nov 27 22:07 11 -》 /dev/zero
lr-x------ 1 oracle oinstall 64 Nov 27 22:07 12 -》 /u01/app/oracle/product/10.2.0/db_1/rdbms/mesg/oraus.msb
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 13 -》 /u01/app/oracle/product/10.2.0/db_1/dbs/hc_dbwdn.dat
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 14 -》 /u01/app/oracle/product/10.2.0/db_1/dbs/lkDBWDN
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 15 -》 /u01/app/oracle/oradata/dbwdn/control01.ctl
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 16 -》 /u01/app/oracle/oradata/dbwdn/control02.ctl
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 17 -》 /u01/app/oracle/oradata/dbwdn/control03.ctl
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 18 -》 /u01/app/oracle/oradata/dbwdn/system01.dbf
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 19 -》 /u01/app/oracle/oradata/dbwdn/undotbs01.dbf
lr-x------ 1 oracle oinstall 64 Nov 27 22:07 2 -》 /dev/null
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 20 -》 /u01/app/oracle/oradata/dbwdn/sysaux01.dbf
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 21 -》 /u01/app/oracle/oradata/dbwdn/users01.dbf (deleted)lrwx------ 1 oracle oinstall 64 Nov 27 22:07 22 -》 /u01/app/oracle/oradata/dbwdn/test01.dbf
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 23 -》 /u01/app/oracle/oradata/dbwdn/ggs01.dbf
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 24 -》 /u01/app/oracle/oradata/dbwdn/perfstat.dbf
lrwx------ 1 oracle oinstall 64 Nov 27 22:07 25 -》 /u01/app/oracle/oradata/dbwdn/shkz_data_01.dbf
数据库没有重启,这个数据文件还能恢复,如果我重启数据库之后,还能看见这个数据文件吗?
[oracle@primary dbwdn]$ sqlplus “/as sysdba”
SQL*Plus: Release 10.2.0.5.0 - Production on Tue Nov 27 22:08:01 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL》 shutdown immediate;
ORA-01116: error in opening database file 4
ORA-01110: data file 4: ‘/u01/app/oracle/oradata/dbwdn/users01.dbf’
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
SQL》 shutdown abort;ORACLE instance shut down.
SQL》 exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@primary dbwdn]$ sqlplus “/as sysdba”
SQL*Plus: Release 10.2.0.5.0 - Production on Tue Nov 27 22:08:19 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL》 startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1273276 bytes
Variable Size 130024004 bytes
Database Buffers 150994944 bytes
Redo Buffers 2920448 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: ‘/u01/app/oracle/oradata/dbwdn/users01.dbf’
SQL》 exit
发表评论
共0条
评论就这些咯,让大家也知道你的独特见解
立即评论以上留言仅代表用户个人观点,不代表系统之家立场