oracle 連接失敗問題——錯誤方式刪除表空間文件

出現以下錯誤

錯誤信息:

連接失敗

ORA-01034: ORACLE not available

ORA-27101:shared memory realm does not exist

Linux-x86_64 Error: 2: No such file or directory

Process ID: 0

Session ID: 0 Serial number: 0


主要原因是手動將創建的表空間文件刪除了。

解決方法:

登陸到命令行終端

SQL>sqlplus /nolog

SQL>conn sys / as sysdba

SQL>startup

通過startup命令,會出現錯誤信息

Total System Global Area  409194496 bytes
Fixed Size                  2213856 bytes
Variable Size             306186272 bytes
Database Buffers           96468992 bytes
Redo Buffers                4325376 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/opt/app/oracle/oradata/osa/music.dbf'

SQL>shutdown normal

ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

SQL>startup mount

ORACLE instance started.


Total System Global Area  409194496 bytes
Fixed Size                  2213856 bytes
Variable Size             306186272 bytes
Database Buffers           96468992 bytes
Redo Buffers                4325376 bytes
Database mounted.

SQL> alter database open;

alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/opt/app/oracle/oradata/osa/music.dbf'

SQL>alter database datafile 7 offline drop;

Database altered.

SQL>shutdown normal

ORA-01109: database not open
Database dismounted.

SQL>startup

ORACLE instance started.
Total System Global Area  409194496 bytes
Fixed Size                  2213856 bytes
Variable Size             306186272 bytes
Database Buffers           96468992 bytes
Redo Buffers                4325376 bytes
Database mounted.
Database opened.

完成即可連接數據庫。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章