解决ORA-01109: database not open,ORA-01157:cannot identify/lock data file 6 - se问题

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.

 

该问题到此就搞定了。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值