热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

Oracleundo_management参数不一致错误

因RAC的undo_management参数不一致导致Oracle数据库mount报ORA-01105ORA-01606错误,本文就这个问题
环境Linux 5.8 10.2.0.5 RAC,两个节点只能一个节点mount,如果尝试mount另外节点就报ORA-01105和ORA-01606错误
数据库版本
代码如下:

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE    10.2.0.5.0      Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production

crs资源情况
代码如下:

[oracle@node1 dbs]$ $ORA_CRS_HOME/bin/crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....D1.inst application    OFFLINE   OFFLINE               
ora....D2.inst application    ONLINE    ONLINE    node2       
ora.PROD.db    application    ONLINE    ONLINE    node2       
ora....SM1.asm application    ONLINE    ONLINE    node1       
ora....E1.lsnr application    ONLINE    ONLINE    node1       
ora.node1.gsd  application    ONLINE    ONLINE    node1       
ora.node1.ons  application    ONLINE    ONLINE    node1       
ora.node1.vip  application    ONLINE    ONLINE    node1       
ora....SM2.asm application    ONLINE    ONLINE    node2       
ora....E2.lsnr application    ONLINE    ONLINE    node2       
ora.node2.gsd  application    ONLINE    ONLINE    node2       
ora.node2.ons  application    ONLINE    ONLINE    node2       
ora.node2.vip  application    ONLINE    ONLINE    node2
 

节点1 mount报错
代码如下:

SQL> startup
ORACLE instance started.

Total System Global Area  171966464 bytes
Fixed Size                  2094832 bytes
Variable Size             113248528 bytes
Database Buffers           50331648 bytes
Redo Buffers                6291456 bytes
ORA-01105: mount is incompatible with mounts by other instances
ORA-01606: gc_files_to_locks not identical to that of another mounted instance
Error:    ORA 1105 
Text:     mount is incompatible with mounts by other instances 
-------------------------------------------------------------------------------
Cause:  An attempt was made to mount the database, but another instance has already mounted 
        a database by the same name, and the mounts are not compatible.
        dditional messages will accompany this message to report why the mounts are incompatible.
Action:  See the accompanying messages for the appropriate action to take.

Error:  ORA 1606 
Text:   GC_FILES_TO_LOCKS not identical to that of another mounted instance 
-------------------------------------------------------------------------------
Cause:  The initialization parameter GC_FILES_TO_LOCKS is not the same as 
        another instance mounted in parallel mode.
        This parameter must be the same as that for all shared instances.
Action: Modify the parameter to be compatible with the other instances, then
        shut down and restart the instance.
 

根据这个错误提示,查询两个节点的gc_files_to_locks参数,均为空值(默认值),也就是值相同
代码如下:

SQL> show parameter gc_files_to_locks;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
gc_files_to_locks                    string
 

检查两个节点的gc相关隐含参数,发现所有值也均一致
代码如下:

NAME                           DESCRIPTION                                                           VALUE  
------------------------------ --------------------------------------------------------------------- -------
_gc_affinity_limit             dynamic affinity limit                                                50     
_gc_affinity_minimum           dynamic affinity minimum activity per minute                          6000   
_gc_affinity_time              if non zero, enable dynamic object affinity                           10     
_gc_async_memcpy               if TRUE, use async memcpy                                             FALSE  
_gc_check_bscn                 if TRUE, check for stale blocks                                       TRUE   
_gc_coalesce_recovery_reads    if TRUE, coalesce recovery reads                                      TRUE   
_gc_defer_time                 how long to defer down converts for hot buffers                       3      
_gc_dissolve_undo_affinity     if TRUE, dissolve undo affinity after an offline                      FALSE  
_gc_dynamic_affinity_locks     if TRUE, get dynamic affinity locks                                   TRUE   
_gc_element_percent            global cache element percent                                          103    
_gc_global_lru                 turn global lru off, make it automatic, or turn it on                 AUTO   
_gc_initiate_undo_affinity     if TRUE, initiate undo affinity after an online                       TRUE   
_gc_integrity_checks           set the integrity check level                                         1      
_gc_keep_recovery_buffers      if TRUE, make recovery buffers current                                TRUE   
_gc_latches                    number of latches per LMS process                                     8      
_gc_maximum_bids               maximum number of bids which can be prepared                          0      
_gcs_fast_reconfig             if TRUE, enable fast reconfiguration for gcs locks                    TRUE   
_gcs_latches                   number of gcs resource hash latches to be allocated per LMS process   64     
_gcs_pkey_history              number of pkey remastering history                                    4000   
_gcs_process_in_recovery       if TRUE, process gcs requests during instance recovery                TRUE   
_gcs_resources                 number of gcs resources to be allocated                                      
_gcs_shadow_locks              number of pcm shadow locks to be allocated                                   
_gc_statistics                 if TRUE, kcl statistics are maintained                                TRUE   
_gcs_testing                   GCS testing parameter                                                 0      
_gc_tsn_undo_affinity          if TRUE, use TSN undo affinity                                        TRUE   
_gc_undo_affinity              if TRUE, enable dynamic undo affinity                                 TRUE   
_gc_undo_affinity_locks        if TRUE, get affinity locks for undo                                  TRUE   
_gc_use_cr                     if TRUE, allow CR pins on PI and WRITING buffers                      TRUE   
_gc_vector_read                if TRUE, vector read current buffers                                  TRUE
 

仔细对比数据库参数,发现undo异常
代码如下:

--节点1
SQL>  show parameter undo

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      MANUAL
undo_retention                       integer     900
undo_tablespace                      string      SYSTEM

 
--节点2
SQL>  show parameter undo

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS1
 

这里已经明确,因为两个节点的undo_*相关参数配置不正确,导致数据库只能一个节点mount。进一步定位问题发现,原来是因为dba粗心在编辑节点1的参数文件的时候把undo_*相关的参数给弄丢了,从而数据库使用了默认值undo_management=manual,undo_tablespace=system
推荐阅读
  • 本文详细介绍如何使用Python进行配置文件的读写操作,涵盖常见的配置文件格式(如INI、JSON、TOML和YAML),并提供具体的代码示例。 ... [详细]
  • 1:有如下一段程序:packagea.b.c;publicclassTest{privatestaticinti0;publicintgetNext(){return ... [详细]
  • 本文详细介绍了如何在 Linux 平台上安装和配置 PostgreSQL 数据库。通过访问官方资源并遵循特定的操作步骤,用户可以在不同发行版(如 Ubuntu 和 Red Hat)上顺利完成 PostgreSQL 的安装。 ... [详细]
  • 优化联通光猫DNS服务器设置
    本文详细介绍了如何为联通光猫配置DNS服务器地址,以提高网络解析效率和访问体验。通过智能线路解析功能,域名解析可以根据访问者的IP来源和类型进行差异化处理,从而实现更优的网络性能。 ... [详细]
  • 构建基于BERT的中文NL2SQL模型:一个简明的基准
    本文探讨了将自然语言转换为SQL语句(NL2SQL)的任务,这是人工智能领域中一项非常实用的研究方向。文章介绍了笔者在公司举办的首届中文NL2SQL挑战赛中的实践,该比赛提供了金融和通用领域的表格数据,并标注了对应的自然语言与SQL语句对,旨在训练准确的NL2SQL模型。 ... [详细]
  • 数据库内核开发入门 | 搭建研发环境的初步指南
    本课程将带你从零开始,逐步掌握数据库内核开发的基础知识和实践技能,重点介绍如何搭建OceanBase的开发环境。 ... [详细]
  • 本文深入探讨 MyBatis 中动态 SQL 的使用方法,包括 if/where、trim 自定义字符串截取规则、choose 分支选择、封装查询和修改条件的 where/set 标签、批量处理的 foreach 标签以及内置参数和 bind 的用法。 ... [详细]
  • 使用C#开发SQL Server存储过程的指南
    本文介绍如何利用C#在SQL Server中创建存储过程,涵盖背景、步骤和应用场景,旨在帮助开发者更好地理解和应用这一技术。 ... [详细]
  • 本文探讨了适用于Spring Boot应用程序的Web版SQL管理工具,这些工具不仅支持H2数据库,还能够处理MySQL和Oracle等主流数据库的表结构修改。 ... [详细]
  • 本文详细介绍了如何通过多种编程语言(如PHP、JSP)实现网站与MySQL数据库的连接,包括创建数据库、表的基本操作,以及数据的读取和写入方法。 ... [详细]
  • 在当前众多持久层框架中,MyBatis(前身为iBatis)凭借其轻量级、易用性和对SQL的直接支持,成为许多开发者的首选。本文将详细探讨MyBatis的核心概念、设计理念及其优势。 ... [详细]
  • 在使用 DataGridView 时,如果在当前单元格中输入内容但光标未移开,点击保存按钮后,输入的内容可能无法保存。只有当光标离开单元格后,才能成功保存数据。本文将探讨如何通过调用 DataGridView 的内置方法解决此问题。 ... [详细]
  • 如何在PostgreSQL中查看数据表
    本文将指导您使用pgAdmin工具连接到PostgreSQL数据库,并展示如何浏览和查找其中的数据表。通过简单的步骤,您可以轻松访问所需的表结构和数据。 ... [详细]
  • 利用存储过程构建年度日历表的详细指南
    本文将介绍如何使用SQL存储过程创建一个完整的年度日历表。通过实例演示,帮助读者掌握存储过程的应用技巧,并提供详细的代码解析和执行步骤。 ... [详细]
  • 本文介绍了如何通过 Maven 依赖引入 SQLiteJDBC 和 HikariCP 包,从而在 Java 应用中高效地连接和操作 SQLite 数据库。文章提供了详细的代码示例,并解释了每个步骤的实现细节。 ... [详细]
author-avatar
林白LS
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有