您的位置:首页 > 数据库 > Oracle

oracle 连接失败问题——错误方式删除表空间文件

2014-03-04 23:15 543 查看
出现以下错误



错误信息:

连接失败

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.

完成即可连接数据库。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐