glogin.sql與srvctl

 本文轉載:http://hi.baidu.com/linuxocp/blog/item/3c09acb769969ed036d3cab4.html

glogin.sql與srvctl
2011-12-29 15:54

  今天打開虛擬機中rac的一個節點,等了好久crs依舊沒有

把數據庫啓動好,於是嘗試手動啓動,但是在啓動instance

時出現下面的一串錯誤:

 

[oracle@node1 admin]$ srvctl start instance -d racdb -i racdb1

PRKP-1001 : 在節點 node1 上啓動實例 racdb1 時出錯

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 29                                                                                                  14:47:31 2011

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:Copyright (c) 1982, 2005, Oracle.  All rights reserved.

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:Enter user-name:

node1:ora.node1.ASM1.asm:Connected to:

node1:ora.node1.ASM1.asm:Oracle Database 10g Enterprise Edition Release 10.2.0.1                                                                                                 .0 - 64bit Production

node1:ora.node1.ASM1.asm:With the Partitioning, Real Application Clusters, OLAP                                                                                                  and Data Mining options

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:from global_name

node1:ora.node1.ASM1.asm:     *

node1:ora.node1.ASM1.asm:ERROR at line 2:

node1:ora.node1.ASM1.asm:ORA-01219: database not open: queries allowed on fixed                                                                                                  tables/views only

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:Enter value for gname: shutdown immediate>Disconnected                                                                                                  from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Productio                                                                                                 n

node1:ora.node1.ASM1.asm:With the Partitioning, Real Application Clusters, OLAP                                                                                                  and Data Mining options

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 29                                                                                                  14:47:33 2011

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:Copyright (c) 1982, 2005, Oracle.  All rights reserved.

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:Enter user-name:

node1:ora.node1.ASM1.asm:Connected to:

node1:ora.node1.ASM1.asm:Oracle Database 10g Enterprise Edition Release 10.2.0.1                                                                                                 .0 - 64bit Production

node1:ora.node1.ASM1.asm:With the Partitioning, Real Application Clusters, OLAP                                                                                                  and Data Mining options

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:from global_name

node1:ora.node1.ASM1.asm:     *

node1:ora.node1.ASM1.asm:ERROR at line 2:

node1:ora.node1.ASM1.asm:ORA-01219: database not open: queries allowed on fixed                                                                                                  tables/views only

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:

node1:ora.node1.ASM1.asm:Enter value for gname: shutdown abort>Disconnected from                                                                                                  Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

node1:ora.node1.ASM1.asm:With the Partitioning, Real Application Clusters, OLAP                                                                                                  and Data Mining options

node1:ora.node1.ASM1.asm:

CRS-0215: Could not start resource 'ora.racdb.racdb1.inst'.

 

  從上面信息中我看到了gname,而這個東西是我在glogin.sql中加入了下面一段東西:

 

col global_name new_value gname;

select lower(user)||'@'||lower(regexp_substr(global_name,'[[:alpha:]]{1,}')) as global_name

from global_name;

set sqlprompt '&gname>';

 

  看過tom書的都知道這段是幹嗎的,就不多說了。

 

  於是在glogin.sql中去掉了這段內容,再次啓動,OK!

 

  所以使用rac的同志要注意glogin.sql與srvctl的關係了,其實srvctl命令最終還是被解釋成

sql*plus命令去執行,而sql*plus的配置文件就是glogin.sql,所以它的改變當然會對srvctl。

 

 

  RAC關閉與啓動順序:

 

cd $CRS_HOME/bin

./srvctl stop instance -d racdb -i racdb1

./srvctl stop asm -n node1

./srvctl stop nodeapps -n node1

 su - root: crsctl stop crs

 

 

啓動:

su - root:  crsctl start crs

./srvctl start nodeapps -n node1

./srvctl start instance -d racdb -i racdb1

 

crsd日誌目錄:

 

/opt/ora10g/product/10.2.0/crs_1/log/node1/crsd

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章