Linux下ORACLE误删除数据文件恢复操作(二)

2014-11-24 11:32:26 · 作者: · 浏览: 2
nstall 64 Jan 30 17:18 1 -> /dev/null
lr-x------ 1 oracle oinstall 64 Jan 30 17:18 0 -> /dev/null

将数据文件复制回去
[oracle@hpserver2 fd]$ cp 23 /u01/app/oracle/oradata/marven/temp02.dbf
[oracle@hpserver2 fd]$ cp 22 /u01/app/oracle/oradata/marven/marven01.dbf
[oracle@hpserver2 fd]$ cp 21 /u01/app/oracle/oradata/marven/users01.dbf
[oracle@hpserver2 fd]$ cp 20 /u01/app/oracle/oradata/marven/sysaux01.dbf
[oracle@hpserver2 fd]$ cp 19 /u01/app/oracle/oradata/marven/undotbs1.dbf
[oracle@hpserver2 fd]$ cp 18 /u01/app/oracle/oradata/marven/system01.dbf

将实例关闭后做介质恢复:


SQL> shutdown immediate

ORA-03113: end-of-file on communication channel
SQL> SQL> conn /as sysdba
Connected to an idle instance.
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size 2084296 bytes
Variable Size 385876536 bytes
Database Buffers 1207959552 bytes
Redo Buffers 14692352 bytes
Database mounted.
SQL> recover database;
Media recovery complete.

数据库可以正常打开额,当然由于我这测试库几乎无事务,所以不用太多的复制操作即可完成
SQL> alter database open;

Database altered.

摘自 Jose Mourinho的专栏