啟動ASM 例項報錯

kewin發表於2009-02-26

在一個10G的環境下,啟動 ASM INSTANCE 報錯:
$ export ORACLE_SID=+ASM
$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 25 22:33:51 2009

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

Connected to an idle instance.

SQL> startup
ORA-29701: unable to connect to Cluster Manager
SQL> select * from v$instance;
select * from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available

第一次遇到unable to connect to Cluster Manager 這樣的錯誤,有點不知所措的。
後來翻閱了文件,報錯是因為沒有啟動CSS程式造成的。 原來是需要啟動css 後臺程式。
下面是啟動的步驟:
1) 用root使用者登入;
2) 確認 $ORACLE_HOME/bin 在環境變數PATH中;
3) 輸入下面的命令:
#  localconfig add

如果使用localconfig add 有報錯,那嘗試使用:[B]localconfig reset[/B]
# ./localconfig reset
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.
        h3cap61
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)

./localconfig 會在inittab中加入一個項內容,讓程式在伺服器啟動後會自動執行:
h1:2:respawn:/etc/init.cssd run >/dev/null 2>&1 檢查程式是否在執行,可以通過ps命令來檢查:
# ps -ef|grep css
    root 122976 102866   0 22:53:30  pts/0  0:00 grep css
  oracle 303132      1   0 22:44:43      -  0:00 /oracle/product/10g/bin/ocssd.bin

或者通過oracle 使用者的crsctl  命令來檢查。

$       crsctl check cssd
Failure 1 contacting CSS daemon (這樣的反饋為css程式沒有執行)
$ crsctl check cssd
CSS appears healthy (css程式已經在執行)

css程式已經在執行,這時可以起到ASM例項:
$ ORACLE_SID=+ASM
$ sqlplus "/ as  sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 25 22:58:10 2009

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

Connected to an idle instance.

SQL> startup
ASM instance started

Total System Global Area  130023424 bytes
Fixed Size                  2019136 bytes
Variable Size             102838464 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted

 

ADMINISTRATOR MUNUAL關於CSS程式的說明:
[Size=11]CSS requirement:
The Cluster Synchronization Services (CSS) daemon is required to enable synchronization between ASM and its client database instances. The CSS daemon is normally started (and configured to start upon reboot) when you use Database Configuration Assistant (DBCA) to create your database. If you did not use DBCA to create the database, you must ensure that the CSS daemon is running before you start
the ASM instance.
[/Size]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/40239/viewspace-557980/,如需轉載,請註明出處,否則將追究法律責任。

相關文章