如果誤刪除了一個表空間中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了。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。