解决ORA-01109的链接错误

ORA-01109: database not open 提示数据库没有开启。

解决办法:

1、使用dba帐户登入sqlplus;

     sqlplus sys/password as sysdba;

2、关闭实例

SQL> shutdown immediate;

ORA-01109: database not op

Database dismounted.
ORACLE instance shut down.

3、SQL> startup;

Total System Global Area 171966464 bytes
Fixed Size                   787988 bytes
Variable Size             145488364 bytes
Database Buffers           25165824 bytes
Redo Buffers                 524288 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: 'filePath'

4、在第4 步出现ORA-01157错误,仔细查看了filePath才发现datafile文件路径和现在存的文件路径不正确。

查看了相关资料,出现ORA-01157和ORA-01110错误一般因为数据文件已经在被使用了从而导致数据库的后台进程不能找到相应的数据文件或者不能锁定相应的数据文件,这样数据库将禁止访问这些数据文件而其他的数据文件则没有影响.

5、分析了第4步的原因后,执行 alter database rename file命令修改datafile的文件路径;

SQL> alter database rename file 'filePath' to 'changeFilePath';

6、再执行第2、3步。

SQL> startup;
ORACLE instance started.

Total System Global Area 171966464 bytes
Fixed Size                   787988 bytes
Variable Size             145488364 bytes
Database Buffers           25165824 bytes
Redo Buffers                 524288 bytes
Database mounted.
Database opened.

该问题到此就搞定了。

 

 

  1. da shang
    donate-alipay
               donate-weixin weixinpay

发表评论↓↓