【故障处理】告警日志报“ORA-01565 Unable To open Spfile”

【故障处理】告警日志报“ORA-01565 Unable To open Spfile”

1.1  BLOG文档结构图

wps1248.tmp 

1.2  故障分析及解决过程

1.2.1  故障环境介绍

 

项目

source db

db 类型

RAC

db version

12.1.0.2.0

db 存储

ASM

OS版本及kernel版本

SuSE Linux Enterprise Server(SLES 1164

1.2.2  故障发生现象及报错信息

客户的12.1.0.2的RAC库告警日志报ORA-01565: Unable To open Spfile的错误,其中一个节点在每天凌晨3点多,另外一个节点在凌晨1点多。

 

1.2.3  故障分析及解决过程

根据MOS How to troubleshoot ORA-01565 being reported in alert log (文档 ID 1950208.1)查询出来是由于$ORACLE_HOME/dbs/init$ORACLE_SIDOCR 中的配置(srvctl config db -d racdb1)查询出来的结果不一致导致的。

解决:将两者配置修改为一致即可。

可以设置trace事件来追踪该问题,生成trace后再关闭该跟踪事件:

alter system set events '1565 trace name errorstack level 10';

alter system set events '1565 trace name context off';

 

另外,在12.1.0.2的RAC中,文件“<DB_HOME>/dbs/init<ORACLE_SID>.ora”不再使用:

The only reference to the incorrect spfile name is in <DB_HOME>/dbs/init<ORACLE_SID>.ora which isn't being used in 12.1.0.2:

$ cat initeaipprd1.ora
SPFILE='+DATA/eaipprd/spfileeaipprd.ora'

 

1.3  MOS

1.3.1  Grid Infrastructure 12.1.0.2 ORA-01565 Unable To open Spfile (文档 ID 1970979.1)

wps1249.tmp

In this Document

Symptoms
Cause
Solution
References


APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.

SYMPTOMS

Newly created database using dbca, seeing the following in database alert.log frequently:

The spfile doesn't exist, the spfile in the OCR for the database is correct:

The only reference to the incorrect spfile name is in <DB_HOME>/dbs/init<ORACLE_SID>.ora which isn't being used in 12.1.0.2:

  

CAUSE

The issue was investigated in multiple bugs: 

BUG 20133332 - FREQUENT ALERT.LOG MSG: ORA-01565: UNABLE TO OPEN SPFILE +DATA/EAIPPRD/SPFILEEAI
BUG 19064439 - ORA-01565: UNABLE TO OPEN SPFILE ON AN IDLE SYSTEM - FOR 1 SECOND 
BUG 20025790 - EM CAUSES ORA-1565 TO BE GENERATED DUE TO DBCA ISSUE

The exact cause wasn't determined.

 

 

SOLUTION

After applied 12.1.0.2 GI PSU2, the issue stopped.


 

1.3.2  How to troubleshoot ORA-01565 being reported in alert log (文档 ID 1950208.1)

wps124A.tmp

 

In this Document

Goal
Solution
References


APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.

GOAL

 Troubleshooting "ORA-01565: Unable to open Spfile"

SOLUTION

When "ORA-01565: Unable to open Spfile" is being reported in the instance alert log, then some process is trying to access the spfile but referring to the incorrect location

 

Database Instance alert log reports the following errors

Wed Nov 19 19:26:44 2014
ORA-01565: Unable to open Spfile +DATA/racdb1/spfileracdb1.ora.
Wed Nov 19 19:26:44 2014
ORA-01565: Unable to open Spfile +DATA/racdb1/spfileracdb1.ora.
Wed Nov 19 19:26:44 2014
ORA-01565: Unable to open Spfile +DATA/racdb1/spfileracdb1.ora.
Wed Nov 19 19:26:44 2014
ORA-01565: Unable to open Spfile +DATA/racdb1/spfileracdb1.ora.
Wed Nov 19 19:26:44 2014
ORA-01565: Unable to open Spfile +DATA/racdb1/spfileracdb1.ora.

 

 

In a situation where the error is not generating any trace files we need to set the following event at the database level

 

alter system set events ' 1565 trace name errorstack level 10 ';

 

Once the above event is set we can see messages as follows in the alert log when the issue occurs again

 

From alert log

Mon Dec 01 19:26:44 2014
ORA-01565: Unable to open Spfile +DATA/racdb1/spfileracdb1.ora.
Mon Dec 01 19:26:44 2014
Errors in file /u01/app/oracle/diag/rdbms/racdb1/racdb1/trace/racdb1_ora_3106.trc: <<<<<<<<<<<<<<<Trace files for the event are getting generated
ORA-01565: error in identifying file '+DATA/racdb1/spfileracdb1.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/racdb1/spfileracdb1.ora
ORA-15173: entry 'spfileracdb1.ora' does not exist in directory 'racdb1'
Mon Dec 01 19:26:48 2014
Dumping diagnostic data in directory=[cdmp_20141201192648], requested by (instance=1, osid=3106), summary=[abnormal process termination].
Mon Dec 01 19:26:49 2014
ORA-01565: Unable to open Spfile +DATA/racdb1/spfileracdb1.ora.
Mon Dec 01 19:26:49 2014
Errors in file /u01/app/oracle/diag/rdbms/racdb1/racdb1/trace/racdb1_ora_3233.trc:
ORA-01565: error in identifying file '+DATA/racdb1/spfileracdb1.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/racdb1/spfileracdb1.ora
ORA-15173: entry 'spfileracdb1.ora' does not exist in directory 'racdb1'

 

After the event has occurred, the tracing can be disabled as follows

 

alter system set events ' 1565 trace name context off ';

 

In the current example the trace file has the following information

 

Trace file output

 

*** 2014-12-01 19:26:44.771
*** SESSION ID:(15.63147) 2014-12-01 19:26:44.771
*** CLIENT ID:() 2014-12-01 19:26:44.771
*** SERVICE NAME:(SYS$USERS) 2014-12-01 19:26:44.771
*** MODULE NAME:(sqlplus@nracdb1 (TNS V1-V3)) 2014-12-01 19:26:44.771
*** CLIENT DRIVER:(SQL*PLUS) 2014-12-01 19:26:44.771
*** ACTION NAME:() 2014-12-01 19:26:44.771
*** CONTAINER ID:(1) 2014-12-01 19:26:44.771

dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x0, level=10, mask=0x0)
----- Error Stack Dump -----
ORA-01565: error in identifying file '+DATA/racdb1/spfileracdb1.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/racdb1/spfileracdb1.ora
ORA-15173: entry 'spfileracdb1.ora' does not exist in directory 'racdb1'
----- Current SQL Statement for this session (sql_id=37hr89tuy952y) -----
CREATE PFILE='/tmp/RUwOs966FJ' FROM SPFILE='+DATA/racdb1/spfileracdb1.ora'

 

The actual SPFILE location of the database can be checked from the alert log or database configuration

 

From alert log


Thu Oct 30 10:55:26 2014
Starting ORACLE instance (normal) (OS id: 10576)
Thu Oct 30 10:55:26 2014
RECOMMENDATION:
Thu Oct 30 10:55:26 2014
1. For optimal performance, configure system with expected number 
of pages for every supported system pagesize prior to the next 
instance restart operation.
Thu Oct 30 10:55:26 2014
**********************************************************************
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Initial number of CPU is 4
Picked latch-free SCN scheme 3
Autotune of undo retention is turned on. 
IMODE=BR
ILAT =101
LICENSE_MAX_USERS = 0
SYS auditing is enabled
NOTE: remote asm mode is local (mode 0x1; from cluster type)
NOTE: Using default ASM root directory ASM
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options.
ORACLE_HOME = /u01/app/oracle/product/12.1.0/db_1
System name: Linux
Node name: lo03dox3
Release: 2.6.32-431.29.2.el6.x86_64
Version: #1 SMP Sun Jul 27 15:55:46 EDT 2014
Machine: x86_64
Using parameter settings in server-side spfile +DATA/spfileracdb1.ora





From the config output

srvctl config database -d racdb1
Database unique name: racdb1
Database name: racdb1
Oracle home: /u01/app/oracle/product/12.1.0/db_1
Oracle user: oracle
Spfile: +DATA/spfileracdb1.ora
Password file: 
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: FRA,DATA
Services: test1, test2
OSDBA group: 
OSOPER group: 
Database instance: racdb1

 

 

From the above it is clear that the actual location of the spfile is "+DATA/spfileracdb1.ora" however the process is trying to access the spfile from "+DATA/racdb1/spfileracdb1.ora"

In such a situation the reference of the spfile needs to be corrected by the process.

REFERENCES

BUG:18334406  - ORA-01565 ERROR ON THE TWO RAC NODES
BUG:9906253  - ORA-01565: UNABLE TO OPEN SPFILE EACH SIX HOURS


 

About Me

...............................................................................................................................

本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用

本文在itpubhttp://blog.itpub.net/26736162)、博客园http://www.cnblogs.com/lhrbest和个人微信公众号(xiaomaimiaolhr)上有同步更新

本文itpub地址:http://blog.itpub.net/26736162/viewspace-2131070/

本文博客园地址:http://www.cnblogs.com/lhrbest/p/6204654.html

本文pdf小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/

● QQ群:230161599     微信群:私聊

联系我请加QQ好友(642808185),注明添加缘由

2016-11-28 10:00 ~ 2016-11-30 22:00农行完成

文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

版权所有,欢迎分享本文,转载请保留出处

...............................................................................................................................

手机长按下图识别二维码或微信客户端扫描下边的二维码来关注小麦苗的微信公众号:xiaomaimiaolhr,免费学习最实用的数据库技术。

wpsF8C8.tmp

 

ico_mailme_02.png

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2131070/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26736162/viewspace-2131070/

<think>好的,我现在要解决用户在Oracle数据库创建控制文件时遇到的ORA-01503、ORA-01565ORA-27048错误。首先,我需要回忆这些错误代码的具体含义,以及它们在创建控制文件时可能出现的原因。 首先,ORA-01503错误通常与创建控制文件时指定的参数不正确有关,比如数据库名称、数据文件路径或日志文件信息不匹配。ORA-01565则涉及无法识别或访问控制文件,可能是指定的控制文件路径错误或权限问题。而ORA-27048是操作系统级别的错误,可能与存储设备、文件权限或空间不足有关。 接下来,我需要考虑用户在创建控制文件时的具体步骤是否正确。用户可能执行了CREATE CONTROLFILE语句,但可能在指定数据文件、日志文件或数据库名称时有误。另外,检查是否有文件路径拼写错误,或者Oracle进程对目标目录没有足够的读写权限。 对于ORA-27048,可能需要检查存储设备的状态,比如ASM磁盘组是否可用,或者文件系统是否有足够的空间。此外,文件权限是否正确,例如控制文件所在的目录是否允许Oracle用户写入。 用户可能需要验证当前数据库的状态,是否处于NOMOUNT或MOUNT阶段,因为创建控制文件需要在NOMOUNT状态下进行。如果数据库处于其他状态,可能需要先关闭数据库,再启动到NOMOUNT模式。 另外,备份和现有控制文件的情况也需要检查。如果用户尝试重建控制文件,可能需要先备份现有的控制文件,或者确认是否需要覆盖现有的文件。如果存在旧的控制文件残留,可能会导致冲突。 可能的解决方案包括:仔细核对CREATE CONTROLFILE语句中的数据库名称、数据文件和日志文件的路径是否正确;检查文件系统权限和空间;确保数据库处于正确的状态;以及处理可能存在的文件冲突。 最后,用户可能需要生成新的控制文件后,进行恢复或打开数据库的操作,这时需要注意是否有数据文件丢失或日志文件不完整的情况,可能需要进一步的恢复步骤。</think>### Oracle创建控制文件错误解决方案 #### 错误原因分析 1. **ORA-01503**:创建控制文件时参数与数据库不一致(如DB_NAME、数据文件路径、日志组配置)[^1] 2. **ORA-01565**:控制文件路径错误或访问权限问题 3. **ORA-27048**:操作系统级存储异常(权限/空间/ASM磁盘组状态) #### 具体解决步骤 1. **验证数据库状态** ```sql SHUTDOWN IMMEDIATE; STARTUP NOMOUNT; -- 必须在NOMOUNT状态执行 ``` 2. **检查关键参数** ```sql CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 '/oradata/redo01.log' SIZE 50M, GROUP 2 '/oradata/redo02.log' SIZE 50M DATAFILE '/oradata/system01.dbf', '/oradata/sysaux01.dbf'; ``` - 使用`ALTER DATABASE BACKUP CONTROLFILE TO TRACE`获取原库配置 - 确认所有路径大小写一致(Linux区分大小写) 3. **处理存储问题** ```bash # 检查权限 ls -l /oradata/*.dbf chown oracle:oinstall /oradata/*.dbf # ASM环境验证 asmcmd ls DATA/ORCL/CONTROLFILE ``` 4. **强制覆盖操作(慎用)** ```sql CREATE CONTROLFILE SET DATABASE ... RESETLOGS; ``` 5. **后续恢复操作** ```sql RECOVER DATABASE; ALTER DATABASE OPEN RESETLOGS; ``` #### 关键验证点 1. 控制文件路径在`SPFILE`中的定义: $$ control_files='+DATA/orcl/control01.ctl','+FRA/orcl/control02.ctl' $$ 2. 数据文件头SCN与控制文件记录的SCN一致性[^2]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值