Oracle表空间恢复

Linux大全评论1.1K views阅读模式

如果误删除了一个表空间中test的数据文件test.dbf,然后下次重新启动数据库的时候发      数据库不能打开了(open),
老是报错:SQL> alter database open;
alter database open*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 6 - see DBWRtrace file
ORA-01110: data file 6:'/u01/app/Oracle/oradata/orcl/test.dbf'

解决方案:
1、 在路径/u01/app/oracle/oradata/orcl/新建一个test.dbf文件;
2、  以sqlplus  / as sysdba登录数据库startup force;不过此时还会报错,没关系;
3、  执行:
SQL> alter database datafile'/u01/app/oracle/oradata/orcl/test.dbf' offline drop;
Database altered.
 
4、接着执行:
SQL> startupforce
ORACLE instance started.
Total System Global Area 1570009088 bytes
Fixed Size                2253584 bytes
Variable Size            973081840 bytes
Database Buffers        587202560 bytes
Redo Buffers              7471104 bytes
Database mounted.
Database opened.

5、经过上述的步骤,就将数据库open了。

企鹅博客
  • 本文由 发表于 2019年7月24日 03:24:16
  • 转载请务必保留本文链接:https://www.qieseo.com/191103.html

发表评论