ORA-29701: unable to connect to Cluster Synchronization Service

本文详细介绍了Oracle数据库在启动过程中遇到的问题,包括权限不足、集群同步服务无法连接等,并提供了相应的解决步骤。同时,文章还讨论了如何配置HAS(High Availability Service)以确保相关服务如ora.cssd和ora.diskmon随HAS启动自动运行,以及如何手动启动和检查这些服务的状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[grid@test170 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Sep 3 14:36:19 2012

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

Connected to an idle instance.

SQL> startup
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
SQL> exit
Disconnected
[grid@test170 ~]$ crsctl check css
CRS-4530: Communications failure contacting Cluster Synchronization Services daemon
[grid@test170 ~]$ ps -ef|grep cssd
grid      3530  3372  0 14:37 pts/1    00:00:00 grep cssd
[grid@test170 ~]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[grid@test170 ~]$  ps -ef|grep d.bin
grid      3032     1  0 13:33 ?        00:00:05 /g01/app/oracle/product/grid/bin/ohasd.bin reboot
grid      3237     1  0 13:34 ?        00:00:02 /g01/app/oracle/product/grid/bin/oraagent.bin
grid      3253     1  0 13:34 ?        00:00:00 /g01/app/oracle/product/grid/bin/evmd.bin
grid      3282  3253  0 13:34 ?        00:00:00 /g01/app/oracle/product/grid/bin/evmlogger.bin -o /g01/app/oracle/product/grid/evm/log/evmlogger.info -l /g01/app/oracle/product/grid/evm/log/evmlogger.log
grid      3537  3372  0 14:37 pts/1    00:00:00 grep d.bin
[grid@test170 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type OFFLINE   OFFLINE               
ora.asm        ora.asm.type   OFFLINE   OFFLINE               
ora.cssd       ora.cssd.type  ONLINE    OFFLINE               
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    test170     
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora.tcyang.db  ora....se.type OFFLINE   OFFLINE               
[grid@test170 ~]$ crsctl status resource -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               OFFLINE OFFLINE      test170                                      
ora.asm
               OFFLINE OFFLINE      test170                  Instance Shutdown   
ora.ons
               OFFLINE OFFLINE      test170                                      
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  OFFLINE                                                   
ora.diskmon
      1        OFFLINE OFFLINE                                                   
ora.evmd
      1        ONLINE  ONLINE       test170                                      
ora.tcyang.db
      1        OFFLINE OFFLINE                               Instance Shutdown   
[grid@test170 ~]$ crs_stat -p ora.cssd
NAME=ora.cssd
TYPE=ora.cssd.type
ACTION_SCRIPT=
ACTIVE_PLACEMENT=0
AUTO_START=never
CHECK_INTERVAL=30
DESCRIPTION="Resource type for CSSD"
FAILOVER_DELAY=0
FAILURE_INTERVAL=3
FAILURE_THRESHOLD=5
HOSTING_MEMBERS=
PLACEMENT=balanced
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=600
STOP_TIMEOUT=900
UPTIME_THRESHOLD=1m

[grid@test170 ~]$ crs_stat -p ora.diskmon
NAME=ora.diskmon
TYPE=ora.diskmon.type
ACTION_SCRIPT=
ACTIVE_PLACEMENT=0
AUTO_START=never
CHECK_INTERVAL=3
DESCRIPTION="Resource type for Diskmon"
FAILOVER_DELAY=0
FAILURE_INTERVAL=3
FAILURE_THRESHOLD=5
HOSTING_MEMBERS=
PLACEMENT=balanced
RESTART_ATTEMPTS=10
SCRIPT_TIMEOUT=60
START_TIMEOUT=600
STOP_TIMEOUT=60
UPTIME_THRESHOLD=5s

[grid@test170 ~]$ crsctl start resource ora.cssd
CRS-2672: Attempting to start 'ora.cssd' on 'test170'
CRS-2672: Attempting to start 'ora.diskmon' on 'test170'
CRS-2676: Start of 'ora.diskmon' on 'test170' succeeded
CRS-2676: Start of 'ora.cssd' on 'test170' succeeded
[grid@test170 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type OFFLINE   OFFLINE               
ora.asm        ora.asm.type   OFFLINE   OFFLINE               
ora.cssd       ora.cssd.type  ONLINE    ONLINE    test170     
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    test170     
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora.tcyang.db  ora....se.type OFFLINE   OFFLINE               
[grid@test170 ~]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[grid@test170 ~]$ crsctl --help
Usage: crsctl add       - add a resource, type or other entity
       crsctl check     - check a service, resource or other entity
       crsctl config    - output autostart configuration
       crsctl debug     - obtain or modify debug state
       crsctl delete    - delete a resource, type or other entity
       crsctl disable   - disable autostart
       crsctl discover  - discover DHCP server
       crsctl enable    - enable autostart
       crsctl get       - get an entity value
       crsctl getperm   - get entity permissions
       crsctl lsmodules - list debug modules
       crsctl modify    - modify a resource, type or other entity
       crsctl query     - query service state
       crsctl pin       - pin the nodes in the node list
       crsctl relocate  - relocate a resource, server or other entity
       crsctl replace   - replaces the location of voting files
       crsctl release   - release a DHCP lease
       crsctl request   - request a DHCP lease
       crsctl setperm   - set entity permissions
       crsctl set       - set an entity value
       crsctl start     - start a resource, server or other entity
       crsctl status    - get status of a resource or other entity
       crsctl stop      - stop a resource, server or other entity
       crsctl unpin     - unpin the nodes in the node list
       crsctl unset     - unset an entity value, restoring its default
[grid@test170 ~]$ crsctl start resource ora.asm
CRS-2672: Attempting to start 'ora.asm' on 'test170'
CRS-2676: Start of 'ora.asm' on 'test170' succeeded
[grid@test170 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    test170     
ora.asm        ora.asm.type   ONLINE    ONLINE    test170     
ora.cssd       ora.cssd.type  ONLINE    ONLINE    test170     
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    test170     
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora.tcyang.db  ora....se.type OFFLINE   OFFLINE               
[grid@test170 ~]$ crsctl start resource ora.ons
CRS-2501: Resource 'ora.ons' is disabled
CRS-4000: Command Start failed, or completed with errors.
[grid@test170 ~]$ crsctl start resource ora.diskmon
CRS-2672: Attempting to start 'ora.diskmon' on 'test170'
CRS-2676: Start of 'ora.diskmon' on 'test170' succeeded
[grid@test170 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    test170     
ora.asm        ora.asm.type   ONLINE    ONLINE    test170     
ora.cssd       ora.cssd.type  ONLINE    ONLINE    test170     
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    test170     
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora.tcyang.db  ora....se.type OFFLINE   OFFLINE               
[grid@test170 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Sep 3 14:45:02 2012

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option

SQL> startup
ORA-01031: insufficient privileges
SQL> exit        
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Automatic Storage Management option
[grid@test170 ~]$ asmcmd
ASMCMD> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
ASMCMD> shutdown immediate;
ASM diskgroups dismounted
ASM instance shutdown
Connected to an idle instance.
ASMCMD> !csr_stat -t
sh: csr_stat: command not found
ASMCMD> exit
[grid@test170 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type OFFLINE   OFFLINE               
ora.asm        ora.asm.type   OFFLINE   OFFLINE               
ora.cssd       ora.cssd.type  ONLINE    ONLINE    test170     
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    test170     
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora.tcyang.db  ora....se.type OFFLINE   OFFLINE               
[grid@test170 ~]$ asmcmd
Connected to an idle instance.
ASMCMD> startup
ASM instance started

Total System Global Area  283930624 bytes
Fixed Size                  2227664 bytes
Variable Size             256537136 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
ASMCMD> exit
[grid@test170 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    test170     
ora.asm        ora.asm.type   ONLINE    ONLINE    test170     
ora.cssd       ora.cssd.type  ONLINE    ONLINE    test170     
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    test170     
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora.tcyang.db  ora....se.type OFFLINE   OFFLINE               
[grid@test170 ~]$ su - oracle
Password: 
[oracle@test170 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Sep 3 14:46:30 2012

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  626327552 bytes
Fixed Size                  2230952 bytes
Variable Size             222299480 bytes
Database Buffers          394264576 bytes
Redo Buffers                7532544 bytes
Database mounted.
Database opened.


发现HAS的服务确实启动了的,而ora.cssd和ora.diskmon这2个服务是依赖于HAS维护的.

注意:启动ASM实例用:sqlplus "/as sysasm"

1)默认情况下HAS(High Availability Service)是自动启动的.通过如下命令可以取消和启用自动启动
        crsctl disable has
       crsctl enable has
2)HAS手动启动和停止
        crsctl start has
       crsctl stop has
3)查看HAS的状态
        crsctl check has
4)如果想让ora.css和ora.diskmon服务随着HAS的启动而自动启动,那么你可以这两个服务的AUTO_START属性
        crsctl modify resource "ora.cssd" -attr "AUTO_START=1"
        or 
        crsctl modify resource "ora.diskmon" -attr "AUTO_START=1"
5)如果想取消ora.css和ora.diskmon的Auto start 
        crsctl modify resource "ora.cssd" -attr "AUTO_START=never"
        crsctl modify resource "ora.diskmon" -attr "AUTO_START=never"


 

### 解析ORA-30926错误 ORA-30926错误表示无法获取连接表中的一组稳定行。此错误通常发生在执行DML操作(如更新或删除)时,涉及多个表之间的联接,并且这些表之间存在重复数据或缺少唯一键约束。 #### 错误原因分析 该错误的根本原因是查询条件未能唯一标识要修改的数据行。具体来说: - 如果两个或更多行满足相同的WHERE子句条件,则数据库不知道应该处理哪一行。 - 缺少适当索引或唯一约束可能导致这种情况发生[^1]。 #### 解决方案建议 为了修复这个问题,可以采取以下措施之一来确保每条记录都能被唯一识别: 1. **增加唯一性约束** 对于参与联接操作的列组合施加唯一约束,从而保证每一行都是唯一的。例如: ```sql ALTER TABLE table_name ADD CONSTRAINT unique_constraint UNIQUE (column_list); ``` 2. **调整SQL语句逻辑** 修改原始SQL语句以更精确地定位目标行。可以通过添加额外过滤条件或将模糊匹配改为严格相等比较等方式实现这一点。 3. **清理冗余数据** 首先找出并移除那些违反业务规则的多余副本项,然后再尝试重新运行原命令。 4. **使用MERGE替代UPDATE/DELETE** 当面对复杂多表关联场景下的批量变更需求时,考虑采用`MERGE INTO`语法结构代替传统的`UPDATE ... WHERE EXISTS (...)`模式,因为前者能够更好地应对潜在冲突情况。 5. **验证外键关系** 检查是否存在未定义良好参照完整性的外键字段;必要的话对其进行完善设置以便维持父子实体间一致性。 ```sql -- 示例:创建唯一索引来防止重复 CREATE UNIQUE INDEX idx_unique ON employees(department_id, job_title); -- 或者通过ALTER TABLE直接添加UNIQUE KEY ALTER TABLE employees ADD CONSTRAINT uk_emp_dept_job UNIQUE (department_id, job_title); ``` 上述方法可以帮助消除因非唯一性而导致的操作失败现象,进而成功完成预期事务处理过程。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值