RAC spfile 坑 +data INSTANCE_NUMBER thread x is mounted by another instance

RAC相关三个参数 

thread  reset 就可以默认

 instance_number   需要单独设置 sid=‘SIDX’

cluster_database                     boolean     TRUE

SQL> alter system reset instance_number sid='*'  scope=spfile;
alter system reset instance_number sid='*'  scope=spfile
*
ERROR at line 1:
ORA-32010: cannot find entry to delete in SPFILE

alter system  set instance_number=3 sid='*'  scope=spfile; 只要设错了才能改。

alter system reset thread scope=spfile;

----------ORA-29760---重现----


SQL> alter system reset instance_number sid='sid1' scope=spfile;
ORA-32010: cannot find entry to delete in SPFILE


SQL> alter system reset instance_number sid='cdb1' scope=spfile;

SQL> alter system reset instance_number sid='cdb2' scope=spfile;

SQL> alter system reset instance_number sid='cdb3' scope=spfile;

SQL> show spparameters instance_n

SID      NAME                          TYPE        VALUE
-------- ----------------------------- ----------- ----------------------------
*        instance_name                 string
*        instance_number               integer
SQL> show parameters instance_n

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_name                        string      cdb1
instance_number                      integer     1
SQL> exit
 

[oracle@rac1 ~]$ srvctl start database -d cdb
PRCR-1079 : Failed to start resource ora.cdb.db
CRS-5017: The resource action "ora.cdb.db start" encountered the following error: 
ORA-29760: instance_number parameter not specified
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/rac1/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.cdb.db' on 'rac1' failed
CRS-2632: There are no more servers to try to place resource 'ora.cdb.db' on that would satisfy its placement policy
CRS-5017: The resource action "ora.cdb.db start" encountered the following error: 
ORA-29760: instance_number parameter not specified
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/rac2/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.cdb.db' on 'rac2' failed

SQL> create pfile='/tmp/pfile' from spfile;----未启动

ERROR at line 1:
ORA-01565: error in identifying file '?=/dbs/spfile@.ora'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7

[oracle@rac1 ~]$ srvctl config database -d cdb |grep spfile
Spfile: +DATA/CDB/PARAMETERFILE/spfile.294.1173595505


SQL> create pfile='/tmp/pfile' from spfile='+DATA/CDB/PARAMETERFILE/spfile.294.1173595505';


[oracle@rac1 ~]$ vi /tmp/pfile---添加最后三行
[oracle@rac1 ~]$ tail -3 /tmp/pfile
cdb1.instance_number=1
cdb2.instance_number=2
cdb3.instance_number=3
[oracle@rac1 ~]$ s

SQL> create spfile='data' from pfile='/tmp/pfile';

File created.

SQL> exit
Disconnected
[oracle@rac1 ~]$ srvctl start database -d cdb

CRS-2674: Start of 'ora.cdb.db' on 'rac1' failed


[oracle@rac1 ~]$ s

SQL> startup
ORA-29760: instance_number parameter not specified
SQL> show parameters spfile;
ORA-01034: ORACLE not available
 


SQL> show parameter 
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


SQL> startup pfile='/tmp/pfile';
ORACLE instance started.

Total System Global Area  608170680 bytes
Fixed Size                  9167544 bytes
Variable Size             557842432 bytes
Database Buffers           33554432 bytes
Redo Buffers                7606272 bytes
Database mounted.
Database opened.
SQL> show parameters instance_number

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_number                      integer     1
SQL>  create spfile='data' from pfile='/tmp/pfile';   RAC所有节点会更新,都要找这个~data

File created.

SQL> startup force;
ORACLE instance started.


Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac1 ~]$ srvctl stop database -d cdb
[oracle@rac1 ~]$ srvctl start database -d cdb
PRCR-1079 : Failed to start resource ora.cdb.db
CRS-5017: The resource action "ora.cdb.db start" encountered the following error: 
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/19.0.0/db_1/dbs/initcdb2.ora'
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/rac2/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.cdb.db' on 'rac2' failed
CRS-2632: There are no more servers to try to place resource 'ora.cdb.db' on that would satisfy its placement policy

[oracle@rac2 ~]$ s--   -'data' 错误 找不到 只能用pfile!!!

SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/19.0.0/db_1/dbs/initcdb2.ora'

 


[oracle@rac1 ~]$ s 

SQL> show parameters spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/19.0.0
                                                 /db_1/dbs/data
SQL> create spfile='+data' from pfile='/tmp/pfile';

File created.

SQL> exit    
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac1 ~]$ srvctl stop database -d cdb
[oracle@rac1 ~]$ srvctl start database -d cdb
[oracle@rac1 ~]$ 

-------------------

APPLIES TO:

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

SYMPTOMS

After OS patching, the DB instance failed to come up with the below error on one node.

PRCR-1079 : Failed to start resource ora.<database>.db
CRS-5017: The resource action "ora.<database>.db start" encountered the following error:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
Additional information: 2582
Additional information: 890000679
Process ID: 0
Session ID: 0 Serial number: 0
. For details refer to "(:CLSN00107:)" in "/grid/app/diag/crs/<hostname>/crs/trace/crsd_oraagent_<instance>.trc".

From crsd_oraagent_oracle.trc:

: USRTHRD:11: CLSN.AQPROC.EMRMAXD.MASTER CssSemaphore::tryAcquire, acquired semaphore CLSN.AQPROC.<database>.MASTER
: USRTHRD:11: AQPROC.EMRMAXD CssSemMM::tryMaster I am the master
:CLSDYNAM:7: [ora.<database>.db]{1:45586:5510} [start] ORA-00304: requested INSTANCE_NUMBER is busy<<<<<<<<<<<<<<<<<<<<<<<<<

:CLSDYNAM:7: [ora.<database>.db]{1:45586:5510} [start] InstAgent::start: 1 errcode 304
:CLSDYNAM:7: [ora.<database>.db]{1:45586:5510} [start] InstAgent::start: ORA-304 instance busy m_instanceType 1 m_lastOCIError 304
:CLSDYNAM:7: [ora.<database>.db]{1:45586:5510} [start] InstAgent::start: ORA-304 instance busy dbType RAC
:CLSDYNAM:7: [ora.<database>.db]{1:45586:5510} [start] InstConnection::connectInt: server not attached
:CLSDYNAM:7: [ora.<database>.db]{1:45586:5510} [start] ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
Additional information: 2582
Additional information: 890000679
Process ID: 0
Session ID: 0 Serial number: 0

CHANGES

 OS patching and server reboot

CAUSE

Created pfile from spfile and found the incorrect below entry

*.instance_number=1

SOLUTION

1. Correct the instance numbers:
alter system set instance_number=2 scope=spfile sid='<instance_2>';
alter system set instance_number=1 scope=spfile sid='<instance_1>';

2. Stop and start the database using srvctl

--------------ORA-00304:

SQL> show parameter instance

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
active_instance_count                integer
cluster_database_instances           integer     3
instance_abort_delay_time            integer     0
instance_groups                      string
instance_mode                        string      READ-WRITE
instance_name                        string      cdb1
instance_number                      integer     3
instance_type                        string      RDBMS
open_links_per_instance              integer     4
parallel_instance_group              string
 

SQL>  alter system  set  instance_number=2 sid='cdb2' scope=spfile;

System altered.

SQL> alter system  set  instance_number=3 sid='cdb3' scope=spfile;

System altered.

SQL>  show parameter instance

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_number                      integer  
  3

SQL> alter system  set  instance_number=1 sid='cdb1' scope=spfile;

System altered.

SQL> startup force;
ORACLE instance started.

Total System Global Area  608170680 bytes
Fixed Size                  9167544 bytes
Variable Size             557842432 bytes
Database Buffers           33554432 bytes
Redo Buffers                7606272 bytes
Database mounted.
Database opened.

----------ORA-01619

[oracle@rac1 ~]$ srvctl start database -d cdb
PRCR-1079 : Failed to start resource ora.cdb.db
CRS-5017: The resource action "ora.cdb.db start" encountered the following error: 
ORA-01619: thread 3 is mounted by another instance
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/rac3/crs/trace/crsd_oraagent_oracle.trc".

CRS-5017: The resource action "ora.cdb.db start" encountered the following error: 
ORA-01619: thread 3 is mounted by another instance
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/rac2/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.cdb.db' on 'rac2' failed
CRS-2674: Start of 'ora.cdb.db' on 'rac3' failed

SQL> show parameters instance_number

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_number                      integer     1
SQL> show spparameters instance_number

SID      NAME                          TYPE        VALUE
-------- ----------------------------- ----------- ----------------------------
cdb1     instance_number               integer     1
cdb2     instance_number               integer     2
cdb3     instance_number               integer     3

 

SQL> show spparameters sid
SQL> show spparameters cdb

SID      NAME                          TYPE        VALUE
-------- ----------------------------- ----------- ----------------------------
*        cdb_cluster                   boolean
*        cdb_cluster_name              string
*        noncdb_compatible             boolean
 
[oracle@rac1 ~]$ srvctl stop database -d cdb
[oracle@rac1 ~]$ srvctl start database -d cdb
PRCR-1079 : Failed to start resource ora.cdb.db
CRS-5017: The resource action "ora.cdb.db start" encountered the following error: 
ORA-01619: thread 3 is mounted by another instance
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/rac2/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.cdb.db' on 'rac2' failed
[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jul 6 19:21:50 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> show parameters clust

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
_optimizer_cluster_by_rowid_control  integer     129
cdb_cluster                          boolean     FALSE
cdb_cluster_name                     string
cluster_database                     boolean     TRUE
cluster_database_instances           integer     3
cluster_interconnects                string
SQL>  show parameters  instance_number

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_number                      integer     1
SQL> show spparameters  instance_number

SID      NAME                          TYPE        VALUE
-------- ----------------------------- ----------- ----------------------------
cdb1     instance_number               integer     1
cdb2     instance_number               integer     2
cdb3     instance_number               integer     3
SQL> show parameters thread

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
ofs_threads                          integer     4
parallel_threads_per_cpu             integer     1
thread                               integer     3
threaded_execution                   boolean     FALSE
SQL> show spparameters thread

SID      NAME                          TYPE        VALUE
-------- ----------------------------- ----------- ----------------------------
*        ofs_threads                   integer
*        parallel_threads_per_cpu      integer
*        thread                        integer     3
*        threaded_execution            boolean
SQL> alter system reset thread scope=spfile;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area  608170680 bytes
Fixed Size                  9167544 bytes
Variable Size             557842432 bytes
Database Buffers           33554432 bytes
Redo Buffers                7606272 bytes
Database mounted.
Database opened.
SQL> show spparameters thread

SID      NAME                          TYPE        VALUE
-------- ----------------------------- ----------- ----------------------------
*        ofs_threads                   integer
*        parallel_threads_per_cpu      integer
*        thread                        integer
*        threaded_execution            boolean
SQL> show parameters thread

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
ofs_threads                          integer     4
parallel_threads_per_cpu             integer     1
thread                               integer     0
threaded_execution                   boolean     FALSE
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0
[oracle@rac1 ~]$ srvctl stop database -d cdb
[oracle@rac1 ~]$ srvctl start database -d cdb
[oracle@rac1 ~]$ show spparameters thread
-bash: show: command not found
[oracle@rac1 ~]$ s

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jul 6 19:26:19 2024
Version 19.20.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.20.0.0.0

SQL> show spparameters thread

SID      NAME                          TYPE        VALUE
-------- ----------------------------- ----------- ----------------------------
*        ofs_threads                   integer
*        parallel_threads_per_cpu      integer
*        thread                        integer
*        threaded_execution            boolean
SQL> show parameters thread

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
ofs_threads                          integer     4
parallel_threads_per_cpu             integer     1
thread                               integer     0
threaded_execution                   boolean     FALSE
SQL> 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/42616.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

解析Torch中`Transformer`

解析torch官方代码脚本文件&#xff1a;transformer.py。版本&#xff1a;1.9.1cu111。 首先查看《Torch中多头注意力MultiheadAttention的中文注释》解析&#xff1b; 最后查看下方transformer解析。 话不多说&#xff0c;看代码吧&#xff01; import copy from typing imp…

Vue的学习之class与style绑定

<!DOCTYPE html> <html><head><meta charset"utf-8"><title>Vue的学习</title><script src"vue.js" type"text/javascript" charset"utf-8"></script></head><body><…

如何在std::map中查找元素

在std::map中查找元素可以通过几种不同的方式完成&#xff0c;但最常用的方法是使用find成员函数。std::map是一个基于键值对的关联容器&#xff0c;其中每个元素都是一个键值对。键是唯一的&#xff0c;并且用于排序和快速查找。 使用find成员函数 find成员函数接受一个键作…

io流 多线程

目录 一、io流 1.什么是io流 2.流的方向 i.输入流 ii.输出流 3.操作文件的类型 i.字节流 1.拷贝 ii.字符流 ​3.字符流输出流出数据 4.字节流和字符流的使用场景 5.练习 6.缓冲流 1.字节缓冲流拷贝文件 2.字符缓冲流特有的方法 1.方法 2.总结 7.转换流基本用法…

第2集《修习止观坐禅法要》

请打开补充讲表第一面&#xff0c;附表一、念佛摄心方便法。 我们前面讲到修止&#xff0c;就是善取所缘境的相貌&#xff0c;然后心于所缘&#xff0c;专一安住&#xff1b;心于所缘&#xff0c;相续安住&#xff1b;达到心一境性的目的。 站在修学净土的角度&#xff0c;他…

FastAPI+SQLAlchemy数据库连接

FastAPISQLAlchemy数据库连接 目录 FastAPISQLAlchemy数据库连接配置数据库连接创建表模型创建alembic迁移文件安装初始化编辑env.py编辑alembic.ini迁移数据库 视图函数查询 配置数据库连接 # db.py from sqlalchemy import create_engine from sqlalchemy.orm import sessio…

9、程序化创意

程序化创意 程序化创意&#xff08;Programmatic Creative&#xff09;是指通过自动化的方式制作并优化广告创意&#xff0c;以提高广告效果。针对不同受众的多样化需求&#xff0c;以及同一受众在不同场景下的消费需求&#xff0c;程序化创意能够自动生成个性化的精准创意&am…

《C语言》预处理

文章目录 一、预定义符号二、#define定义常量三、#define定义宏四、宏更函数的对比五、#和##1、#运算符2、##运算符 一、预定义符号 C语言设置了一些预定义符号&#xff0c;可以直接使用&#xff0c;在预处理期间进行处理的。 __FILE__//进行编译的源文件 __LINE__//文件当前的…

在网站存在漏洞的情况下强化安全防御

一、引言 网络安全是一个持续的战斗&#xff0c;尤其是在网站存在已知或未知漏洞的情况下。本文将探讨如何在网站存在漏洞的情况下&#xff0c;采取有效措施进行安全防御。 二、理解漏洞 首先&#xff0c;我们需要理解网站的漏洞。这些可能包括SQL注入、跨站脚本&#xff08…

【数据结构与算法】插入排序

&#x1f493; 博客主页&#xff1a;倔强的石头的CSDN主页 &#x1f4dd;Gitee主页&#xff1a;倔强的石头的gitee主页 ⏩ 文章专栏&#xff1a;《数据结构与算法》 期待您的关注 ​

深入Laravel服务容器:构建灵活应用的秘诀

标题&#xff1a;深入Laravel服务容器&#xff1a;构建灵活应用的秘诀 Laravel框架的服务容器是一个强大的工具&#xff0c;它负责管理类的依赖关系和执行依赖注入&#xff08;DI&#xff09;。服务容器是Laravel依赖注入系统的核心&#xff0c;使得应用组件之间的耦合度降低&…

一周速递|全球车联网产业动态(2024年7月7日)

政策法规 1、7月5日&#xff0c;工业和信息化部部长金壮龙在新闻发布会上表示&#xff0c;新兴产业要培育壮大。对新材料、人工智能、智能网联新能源汽车、新型储能、氢能、生物制造、商业航天、低空经济等新兴产业&#xff0c;要继续用好国内大市场和丰富应用场景&#xff0c…

人工智能、机器学习、神经网络、深度学习和卷积神经网络的概念和关系

人工智能&#xff08;Artificial Intelligence&#xff0c;缩写为AI&#xff09;--又称为机器智能&#xff0c;是研究、开发用于模拟、延伸和扩展人的智能的理论、方法、技术及应用系统的一门新的技术科学。 人工智能是智能学科重要的组成部分&#xff0c;它企图了解智能的实质…

【问题解决】 pyocd 报错 No USB backend found 的解决方法

pyocd 报错 No USB backend found 的解决方法 本文记录了我在Windows 10系统上遇到的pyocd命令执行报错——No USB backend found 的分析过程和解决方法。遇到类似问题的朋友可以直接参考最后的解决方法&#xff0c;向了解问题发送原因的可以查看原因分析部分。 文章目录 pyoc…

排序-java(插入排序和选择排序)

一&#xff0c;分类 主要的排序大致分为以下几类&#xff1a; 1&#xff0c;插入排序&#xff0c;又分为直接插入排序和希尔排序 2&#xff0c;选择排序&#xff0c;又分为选择排序和堆排序 3&#xff0c;交换排序&#xff0c;又分为冒泡排序和快速排序 4&#xff0c;归并…

springboot配置扫描生效顺序

文章目录 举例分析项目结构如下noddles-user-backend 两个配置文件noddles-user-job 配置文件noddles-user-server 配置文件问题:server和Job启动时对应加载的数据库配置为哪一个&#xff1f; 总结 在微服务架构中&#xff0c;backend模块会定义一个基础的配置文件&#xff0c;…

Report Design Analysis报告之logic level详解

目录 一、前言 二、Logic Level distribution 2.1 logic level配置 2.2 Logic Level Distribution报告 2.3 Logic Level 报告详情查看 2.4 Route Distributions 报告详情查看 2.5 示例代码 一、前言 ​在工程设计中&#xff0c;如果需要了解路径的逻辑级数&#xff0c;可…

CentOS7安装部署Anaconda

文章目录 CentOS7安装部署Anaconda一、前言1.组件2.环境 二、正文1.下载安装脚本2.安装Anaconda3.常用指令 CentOS7安装部署Anaconda 一、前言 1.组件 Anaconda 开源的Anaconda个人版 &#xff08;正式为Anaconda发行版&#xff09;是在Linux&#xff0c;Windows和Mac OS X上…

卷积神经网络基础篇

文章目录 1、卷积层1.1、激活函数1.3、sigmoid1.4、Tanh1.5、ReLU1.6、Leaky ReLU1.7、误差计算 2、池化层3、全连接层4、CNN训练 参考链接1 参考链接2 1、卷积层 卷积层&#xff08;Convolutional layer&#xff09;&#xff0c;这一层就是卷积神经网络最重要的一个层次&…

动手学深度学习(Pytorch版)代码实践 -循环神经网络- 56门控循环单元(`GRU`)

56门控循环单元&#xff08;GRU&#xff09; 我们讨论了如何在循环神经网络中计算梯度&#xff0c; 以及矩阵连续乘积可以导致梯度消失或梯度爆炸的问题。 下面我们简单思考一下这种梯度异常在实践中的意义&#xff1a; 我们可能会遇到这样的情况&#xff1a;早期观测值对预测…