手机版
你好,游客 登录 注册
背景:
阅读新闻

Oracle表空间恢复

[日期:2015-03-18] 来源:Linux社区  作者:meirenyu [字体:大 中 小]

如果误删除了一个表空间中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了。

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-03/115159.htm

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款