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

本文涉及的产品
日志服务 SLS,月写入数据量 50GB 1个月
简介:

【故障处理】告警日志报“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 11) 64

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:

Wed Nov 19 10:00:40 2014 
ORA-01565: Unable to open Spfile +DATA/eaipprd/spfileeaipprd.ora. 
Wed Nov 19 10:00:40 2014 
ORA-01565: Unable to open Spfile +DATA/eaipprd/spfileeaipprd.ora. 
Wed Nov 19 10:00:41 2014

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

$ srvctl config database -d eaipprd 
Database unique name: eaipprd 
Database name: eaipprd 
Oracle home: /oracle/oracle/product/12.1.0.2_eaip 
Oracle user: oracle 
Spfile: +DATA/EAIPPRD/PARAMETERFILE/spfile.279.861715841

SQL> show parameter spfile;

NAME TYPE VALUE 
------------------------------------ ----------- ------------------------------ 
spfile string +DATA/EAIPPRD/PARAMETERFILE/spfile.279.861715841

ASMCMD [+DATA/EAIPPRD/PARAMETERFILE] > ls -l 
Type Redund Striped Time Sys Name 
PARAMETERFILE UNPROT COARSE NOV 20 07:00:00 Y spfile.279.861715841

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'

  

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




     本文转自lhrbest 51CTO博客,原文链接:http://blog.51cto.com/lhrbest/1884539 ,如需转载请自行联系原作者



相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
相关文章
|
17天前
|
存储 Prometheus 监控
Docker容器内进行应用调试与故障排除的方法与技巧,包括使用日志、进入容器检查、利用监控工具及检查配置等,旨在帮助用户有效应对应用部署中的挑战,确保应用稳定运行
本文深入探讨了在Docker容器内进行应用调试与故障排除的方法与技巧,包括使用日志、进入容器检查、利用监控工具及检查配置等,旨在帮助用户有效应对应用部署中的挑战,确保应用稳定运行。
27 5
|
1月前
|
Oracle 关系型数据库 数据库
【赵渝强老师】Oracle的参数文件与告警日志文件
本文介绍了Oracle数据库的参数文件和告警日志文件。参数文件分为初始化参数文件(PFile)和服务器端参数文件(SPFile),在数据库启动时读取并分配资源。告警日志文件记录了数据库的重要活动、错误和警告信息,帮助诊断问题。文中还提供了相关视频讲解和示例代码。
|
6月前
|
运维 Serverless API
Serverless 应用引擎产品使用合集之sls日志告警调用函数计算,出现抛出的结果异常,是什么原因
阿里云Serverless 应用引擎(SAE)提供了完整的微服务应用生命周期管理能力,包括应用部署、服务治理、开发运维、资源管理等功能,并通过扩展功能支持多环境管理、API Gateway、事件驱动等高级应用场景,帮助企业快速构建、部署、运维和扩展微服务架构,实现Serverless化的应用部署与运维模式。以下是对SAE产品使用合集的概述,包括应用管理、服务治理、开发运维、资源管理等方面。
|
6月前
|
存储 运维 Serverless
函数计算产品使用问题之日志告警不生效,一般是由于什么造成的
函数计算产品作为一种事件驱动的全托管计算服务,让用户能够专注于业务逻辑的编写,而无需关心底层服务器的管理与运维。你可以有效地利用函数计算产品来支撑各类应用场景,从简单的数据处理到复杂的业务逻辑,实现快速、高效、低成本的云上部署与运维。以下是一些关于使用函数计算产品的合集和要点,帮助你更好地理解和应用这一服务。
|
7月前
|
机器学习/深度学习 运维 监控
用SLS配置日志关键字告警的N种方法
本文由日志关键词告警出发,介绍了使用SLS进行关键词监控告警配置,并且介绍了几种常见的配置方法,可以覆盖关键词监控的大部分场景。
389 0
用SLS配置日志关键字告警的N种方法
|
7月前
|
存储 运维 监控
使用Terraform玩转SLS告警
本文主要介绍使用Terraform来操作SLS告警监控,告警管理。
112 0
使用Terraform玩转SLS告警
|
7月前
|
运维 监控 安全
SLS相同监控规则太多?试试告警监控模板
本文主要介绍了SLS自定义告警监控模板的使用场景以及最佳实践。
149 0
SLS相同监控规则太多?试试告警监控模板
|
7月前
|
SQL 监控 关系型数据库
基于日志服务实现PolarDB秒级监控告警实践
数据复用场景。SLS统一平台利用一份数据发掘出多个use case,让数据发挥其最大价值。
130 0
基于日志服务实现PolarDB秒级监控告警实践
|
1月前
|
XML 安全 Java
【日志框架整合】Slf4j、Log4j、Log4j2、Logback配置模板
本文介绍了Java日志框架的基本概念和使用方法,重点讨论了SLF4J、Log4j、Logback和Log4j2之间的关系及其性能对比。SLF4J作为一个日志抽象层,允许开发者使用统一的日志接口,而Log4j、Logback和Log4j2则是具体的日志实现框架。Log4j2在性能上优于Logback,推荐在新项目中使用。文章还详细说明了如何在Spring Boot项目中配置Log4j2和Logback,以及如何使用Lombok简化日志记录。最后,提供了一些日志配置的最佳实践,包括滚动日志、统一日志格式和提高日志性能的方法。
271 30
【日志框架整合】Slf4j、Log4j、Log4j2、Logback配置模板
|
6天前
|
监控 安全 Apache
什么是Apache日志?为什么Apache日志分析很重要?
Apache是全球广泛使用的Web服务器软件,支持超过30%的活跃网站。它通过接收和处理HTTP请求,与后端服务器通信,返回响应并记录日志,确保网页请求的快速准确处理。Apache日志分为访问日志和错误日志,对提升用户体验、保障安全及优化性能至关重要。EventLog Analyzer等工具可有效管理和分析这些日志,增强Web服务的安全性和可靠性。