熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> SQL語言 >> 正文

如何恢復一個丟失的數據文件

2013-11-13 12:38:54  來源: SQL語言 

  如果您目前擁有一個冷備份但是缺少了其中的一個數據文件但你目前存在所有的歸檔如果您要恢復數據文件可以參考以下的示例

  [oracle@jumper eygle]$ sqlplus / as sysdba

  SQL*Plus: Release Production on Sun Aug ::

  Copyright (c) Oracle Corporation All rights reserved

  Connected to an idle instance

  SQL> startup mount

  ORACLE instance started

  Total System Global Area bytes

  Fixed Size bytes

  Variable Size bytes

  Database Buffers bytes

  Redo Buffers bytes

  Database mounted

  SQL> alter database open;

  alter database open

  *

  ERROR at line :

  ORA: cannot identify/lock data file see DBWR trace file

  ORA: data file : /opt/oracle/oradata/eygle/eygledbf

  SQL> alter database create datafile as /opt/oracle/oradata/eygle/eygledbf;

  Database altered

  SQL> select name from v$datafile;

  NAME

  

  /opt/oracle/oradata/eygle/systemdbf

  /opt/oracle/oradata/eygle/undotbsdbf

  /opt/oracle/oradata/eygle/eygledbf

  /opt/oracle/oradata/eygle/eygledbf

  SQL> alter database open;

  alter database open

  *

  ERROR at line :

  ORA: file needs media recovery

  ORA: data file : /opt/oracle/oradata/eygle/eygledbf

  SQL> recover datafile ;

  Media recovery complete

  SQL> alter database open;

  Database altered

  SQL>


From:http://tw.wingwit.com/Article/program/SQL/201311/16313.html
  • 上一篇文章:

  • 下一篇文章:
  • 推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.