之前机器重启过,重启之后,在启动+ASM实例的时候,就无法启动
报错如下:
$ export ORACLE_SID=+ASM
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Mar 8 10:39:46 2016
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> exit
Disconnected
$ crsctl check css
Failure 1 contacting CSS daemon
$ ps -ef | grep css
root 5636162 1 0 Mar 03 - 0:08 /bin/sh /etc/init.cssd run
oracle 9961500 9240792 0 10:40:47 pts/4 0:00 grep css
$ crsctl check crs
Failure 1 contacting CSS daemon
Cannot communicate with CRS
Cannot communicate with EVM
之后使用root执行:
228-750测试机/oracle/app/oracle/product/10.2.0/db_1/bin#./localconfig delete
Stopping CSSD.
Failure in CSS initialization opening OCR.
Shutdown has begun. The daemons should exit soon.
228-750测试机/oracle/app/oracle/product/10.2.0/db_1/bin#
228-750测试机/oracle/app/oracle/product/10.2.0/db_1/bin#./localconfig add
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
p750_a05_lp03
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
进程启动正常!
启动+ASM实例
$ export ORACLE_SID=+ASM
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Mar 8 14:02:47 2016
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 130023424 bytes
Fixed Size 2082312 bytes
Variable Size 102775288 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ cd $ORACLE_HOME/dbs
$ ls
ab_+ASM.dat hc_orcl.dat homefvsdoradataTBS_ITSM_IMRC.dbf initorcl.ora orapw+ASM
arch homefvsdoracleTBS_ITSM_3_6.dbf init.ora lk+ASM orapworcl
hc_+ASM.dat homefvsdoradataTBS_ITSM_3_6.dbf initdw.ora lkORCL spfile+ASM.ora
$ export ORACLE_SID=orcl
$
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Mar 8 14:03:51 2016
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1610612736 bytes
Fixed Size 2084400 bytes
Variable Size 402653648 bytes
Database Buffers 1191182336 bytes
Redo Buffers 14692352 bytes
SQL> alter database mount;
Database altered.
SQL> alter database open;
Database altered.
SQL>
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 08-MAR-2016 14:04:56
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.61.228)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 08-MAR-2016 11:07:52
Uptime 0 days 2 hr. 57 min. 4 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /oracle/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.61.228)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
$ sqlplus system/oracle@ORCL228
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Mar 8 14:07:07 2016
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show user
USER is "SYSTEM"
数据库可以正常登陆!
参考文章:
http://hzhg12345.blog.163.com/blog/static/4537634220118743915828/
ORA-29701 :unable to connect to Cluster Manager
到网上搜了一下,发现很多资料,摘抄了一下,呵呵
Cause
Connect to CM failed or timed out.
Action
Verify that the CM was started. If the CM was not started, start it and then
retry the database startup. If the CM died or is not responding, check the
Oracle and CM trace files for errors.
参考资料,如果出现上面的错误,就检查文件/etc/inittab,看看是否有下面的行:
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1</dev/null
如果没有上面的行,请添加上;如果注释掉,请取消注释
我按着说明也添加了.可还是提示同样的错误,我在oracle的官方论坛找到一种方法:
Please run the following batch files in the $ORACLE_HOME/bin directory(在root用户下)
localconfig delete
[root@localhost bin]# ./localconfig delete
/etc/init.d/init.cssd: line 519: /etc/oracle/scls_scr/localhost/root/cssrun: 没
有那个文件或目录
/bin/touch: cannot touch ‘/etc/oracle/scls_scr/localhost/root/nooprocd’: 没有
那个文件或目录
/bin/touch: cannot touch ‘/etc/oracle/scls_scr/localhost/root/noclsmon’: 没有
那个文件或目录
Stopping CSSD.
Failure in CSS initialization opening OCR.
Shutdown has begun. The daemons should exit soon.
localconfig add
[root@localhost bin]# ./localconfig add
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
localhost
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
This will help you to solve your problem
问题解决了,asm实例可以启动了
——————————————————
其它人遇到到另外一种情况
客户的数据库无法正常启动,登录服务器检查后发现,ASM实例没有启动。尝试启动ASM实例时报错ORA-29701。
启动ASM实例:
p55a@/home/oracle> export ORACLE_SID=+ASM
p55a@/home/oracle> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jun 23 22:21:20 2011
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> exit
Disconnected
检查发现当主机存在多个ORACLE_HOME时,CLUSTER服务连接的ORACLE_HOME和启动ASM实例的ORACLE_HOME不一致,导致了这个错误,metalink文档ID 459775.1描述了这个问题。
检查当前环节的设置:
p55a@/home/oracle> env | grep HOME
ORACLE_CRS_HOME=/u01/crs
HOME=/home/oracle
ORACLE_HOME=/u01/db10g
p55a@/home/oracle> ps -ef|grep css
oracle 184536 299068 0 22:31:43 pts/1 0:00 grep css
root 237570 1 0 22:00:09 - 0:00 /bin/sh /etc/init.cssd run
这里设置了ORACLE_CRS_HOME,但是当前数据库并非是一个RAC环境,而是单机下启动的ASM实例,显然这个设置ORACLE_CRS_HOME存在问题。
p55a@/home/oracle> cd /u01/crs
ksh: /u01/crs: not found.
而ORACLE_CRS_HOME对应的目录根本就不存在,正是这个设置导致了问题的产生。
解决问题并不复杂,首先注释或删除环境变量中ORACLE_CRS_HOME的设置:
p55a@/home/oracle> vi .profile
export ORACLE_BASE=/u01
#export ORACLE_CRS=$ORACLE_BASE/crs
#export ORACLE_CRS_HOME=$ORACLE_BASE/crs
export ORACLE_HOME=$ORACLE_BASE/db10g
export PATH=$ORACLE_HOME/bin:$ORACLE_CRS/bin:$PATH
export ORACLE_SID=cnddr
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.:$ORACLE_HOME/bin:$ORACLE_CRS_HOME/bin:$PATH
export PATH
切换到root,kill当前的css进程:
p55a@/home/oracle> su -
root's Password:
# ps -ef|grep css
root 237570 1 0 22:00:09 - 0:00 /bin/sh /etc/init.cssd run
root 270456 328084 0 23:32:53 pts/1 0:00 grep css
# kill -9 237570
然后利用重置ORACLE_HOME:
# cd /u01/db10g/bin
# ./localconfig reset $ORACLE_HOME
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
p55a
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
启动css进程:
# /etc/init.cssd start
Startup will be queued to init within 30 seconds.
下面检查数据库的状态:
# su - oracle
p55a@/home/oracle> ps -ef | grep ora
oracle 184370 332060 0 22:35:53 pts/1 0:00 -ksh
oracle 217308 1 0 23:29:35 - 0:00 ora_dbw1_cnddr
oracle 241672 1 0 23:40:43 - 0:00 /var/www/nagios/bin/nrpe -c /var/www/nagios/etc/nrpe.cfg -d
oracle 250100 1 0 23:29:34 - 0:02 ora_mman_cnddr
oracle 253992 1 0 23:29:35 - 0:00 ora_lgwr_cnddr
oracle 258138 1 0 23:29:35 - 0:00 ora_smon_cnddr
oracle 266296 1 0 23:29:35 - 0:00 ora_ckpt_cnddr
oracle 274462 1 0 23:29:35 - 0:00 ora_d000_cnddr
oracle 278572 1 0 23:29:35 - 0:00 ora_mmon_cnddr
oracle 282678 1 0 22:03:10 pts/0 0:00 /u01/db10g/bin/tnslsnr LISTENER -inherit
oracle 290942 1 0 23:29:35 - 0:00 ora_reco_cnddr
oracle 299022 352718 0 23:42:30 pts/1 0:00 grep ora
oracle 180614 1 0 23:29:35 - 0:00 ora_cjq0_cnddr
oracle 262420 287004 0 22:00:24 pts/0 0:00 -ksh
oracle 295422 1 0 23:29:34 - 0:00 ora_psp0_cnddr
oracle 303432 1 0 23:29:35 - 0:00 ora_dbw0_cnddr
oracle 307642 1 0 23:29:35 - 0:00 ora_s000_cnddr
oracle 311626 1 0 23:29:34 - 0:00 ora_pmon_cnddr
oracle 315648 299318 0 23:27:22 pts/0 0:00 -ksh
oracle 319844 352718 0 23:42:30 pts/1 0:00 ps -ef
oracle 323920 1 0 23:29:35 - 0:00 ora_mmnl_cnddr
oracle 352718 328084 0 23:42:14 pts/1 0:00 -ksh
p55a@/home/oracle> ps -ef|grep ASM
oracle 299026 352718 0 23:42:46 pts/1 0:00 grep ASM
p55a@/home/oracle> ps -ef|grep asm
oracle 299028 352718 0 23:42:53 pts/1 0:00 grep asm
p55a@/home/oracle> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jun 23 23:43:28 2011
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> set pages 100 lines 120
SQL> select instance_number, instance_name, status from v$instance;
INSTANCE_NUMBER INSTANCE_NAME STATUS
--------------- ---------------- ---------
1 cnddr STARTED
SQL> select * from v$database;
select * from v$database
*
ERROR at line 1:
ORA-01507: database not mounted
SQL> select * from v$asm_diskgroup;
no rows selected
SQL> select * from v$asm_disk;
no rows selected
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
虽然数据库已经启动,但是只到了NOMOUNT状态,ASM实例没有启动,因此数据库无法MOUNT:
p55a@/home/oracle> env|grep SID
ORACLE_SID=cnddr
p55a@/home/oracle> export ORACLE_SID=+ASM
p55a@/home/oracle> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jun 23 23:45:06 2011
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 130023424 bytes
Fixed Size 2094648 bytes
Variable Size 102762952 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
p55a@/home/oracle> export ORACLE_SID=cnddr
p55a@/home/oracle> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jun 23 23:45:35 2011
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1.0737E+10 bytes
Fixed Size 2114208 bytes
Variable Size 3489664352 bytes
Database Buffers 7230980096 bytes
Redo Buffers 14659584 bytes
Database mounted.
Database opened.
SQL> alter database start logical standby apply;
Database altered.
手工启动ASM实例,并启动数据库,问题解决
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26366371/viewspace-2061950/
,如需转载,请注明出处,否则将追究法律责任。