1.解决数据库实例启动ORA-00205问题 (wei)
问题描述:ORA-00205: error in identifying control file, check alert log for more info
找到控制文件 show parameter control_files;
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /oradata/testdb/control01.ctl,
/oradata/testdb/control02.ctl
关闭数据库 shutdown immediate
在主机上root用户下复制一份控制文件
[root@localhost dbs]# cd /oradata/testdb/
[root@localhost testdb]# cp /oradata/testdb/control01.ctl /oradata/testdb/control03.ctl
以nomount方式启动实例 startup nomount
修改参数文件
SQL> alter system set control_files='/oradata/testdb/control01.ctl','/oradata/testdb/control02.ctl','/oradata/testdb/control03.ctl' scope=spfile;
修改成功 System altered.
关闭数据库 shutdown immediate
重新启动 startup
出现错误 ORA-00205: error in identifying control file, check alert log for more info
查看日志文件发现错误信息
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oradata/testdb/control03.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
ORA-205 signalled during: alter database mount
日志文件显示控制文件control03.ctl出现错误,无法正常打开
针对以上问题,出现的原因有两种:
1.数据库未正常关闭导致控制文件错误;
2.新复制的控制文件control03.ctl权限未修改
解决办法:
针对问题一:正常关闭数据库,重新拷贝覆盖控制文件control03.ctl
[root@localhost testdb]# cp /oradata/testdb/control01.ctl /oradata/testdb/control03.ctl
cp: overwrite `/oradata/testdb/control03.ctl'? 回复y,覆盖原有的
启动数据库startup nomount,按照上文再次执行修改参数文件,关闭数据库 shutdown immediate
重新启动数据库,问题消失。
针对问题二:拷贝控制文件control03.ctl后,修改control03.ctl权限
chown oracle:oinstall control03.ctl
问题解决!
ORA-01034: ORACLE not available如何解决
我们使用SQL Plus进行数据库连接时提示ORA-01034: ORACLE not available。一下是解决方法:
C:\Documents and Settings\Administrator>sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 3月 18 15:45:23 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
请输入用户名: sys/sys as sysdba
已连接到空闲例程。
SQL> select * from v$log;
select * from v$log
*
第 1 行出现错误:
ORA-01034: ORACLE not available
进程 ID: 0
会话 ID: 0 序列号: 0
SQL> alter database open resetlog;
alter database open resetlog
*
第 1 行出现错误:
ORA-01034: ORACLE not available
进程 ID: 0
会话 ID: 0 序列号: 0
SQL> alter database open resetlogs;
alter database open resetlogs
*
第 1 行出现错误:
ORA-01034: ORACLE not available
进程 ID: 0
会话 ID: 0 序列号: 0
SQL> shutdown immedate;
SP2-0717: 非法的 SHUTDOWN 选项
SQL> shutdown immediate
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area 6847938560 bytes
Fixed Size 2188768 bytes
Variable Size 3422554656 bytes
Database Buffers 3405774848 bytes
Redo Buffers 17420288 bytes
数据库装载完毕。
SQL> alter database open resetlogs;
alter database open resetlogs
*
第 1 行出现错误:
ORA-01139: RESETLOGS 选项仅在不完全数据库恢复后有效
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC
---------- ---------- ---------- ---------- ---------- ---------- ---
STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME
---------------- ------------- -------------- ------------ --------------
1 1 3823 52428800 512 1 NO
CURRENT 34344047 12-3月 -13 2.8147E+14
3 1 3822 52428800 512 1 NO
INACTIVE 34327500 12-3月 -13 34344047 12-3月 -13
2 1 3821 52428800 512 1 NO
INACTIVE 34324562 12-3月 -13 34327500 12-3月 -13
SQL> alter database open resetlogs;
alter database open resetlogs
*
第 1 行出现错误:
ORA-01139: RESETLOGS 选项仅在不完全数据库恢复后有效
SQL>
SQL> recover database until time '2013-03-01 12:12:12';
完成介质恢复。
ORA-01219:database not open:queries allowed on fixed tables/views only错误,经网络查找方案终解决问题
ORA-01219错误解决方案:
ORA-01219:database not open:queries allowed on fixed tables/views only
“ORA-01219:数据库未打开:仅允许在固定表/视图中查询”的警告窗口!
解决办法:
这一段是找出打开数据库的时候报错的地方
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 18 - see DBWR trace file
ORA-01110: data file 18: 'D:/qhms_db/EAS_D_EASDEV_STANDARD.dbf'
这里就是讲'D:/qhms_db/EAS_D_EASDEV_STANDARD.dbf'这个文件出问题
我们要做的就是删掉这个残留文件
进行下一步:
SQL> alter database datafile 'D:/qhms_db/EAS_D_EASDEV_STANDARD.dbf' offline drop;
Database altered.
SQL> alter database open;
Database altered.
执行SQL报ORA-01507: database not mounted错误
(参考链接2:https://www.cnblogs.com/thg999/p/9981766.html)
步骤一、关闭数据库
执行sql命令: shutdown ,并退出sqlplus
$ sqlplus / as sysdba
sql> shutdown
sql> exit
步骤二、进入oracle的家目录下的dbs目录里面
/oracle/SHP/11204/是本例的oracle的家目录,要根据自身安装目录做修改
$ cd /oracle/SHP/11204/dbs/
步骤三、查看未释放的lk*文件
语句为 fuser -u lk*(这个代表前缀为lk的文件),比如说我的数据库为ORACL,就会有一个lkORACL文件
$ fuser -u lk*
/oracle/SHP/11204/dbs/lkSHP: 109868(orashp) 109870(orashp) 109877(orashp) 109881(orashp) 109885(orashp) 109887(orashp) 109889(orashp) 109891(orashp) 109893(orashp) 109895(orashp) 109897(orashp) 109899(orashp) 109901(orashp) 109903(orashp) 109905(orashp)
步骤四、kill掉lk*文件中的内容
$ fuser -k lkSHP
/oracle/SHP/11204/dbs/lkSHP: 109868 109870 109877 109881 109885 109887 109889 109891 109893 109895 109897 109899 109901 109903 109905
步骤五、重启数据库
$ sqkplus / as sysdba
sql> startup
原文链接:https://blog.csdn.net/luoww1/article/details/88844907