方法:1、用“srvctl stop listener”關(guān)閉監(jiān)聽(tīng)并kill會(huì)話;2、用“export ORACLE_HOME=…”和“export PATH=…”配置兩個(gè)節(jié)點(diǎn);3、用“crsctl stop has”關(guān)閉rac即可。
本教程操作環(huán)境:Windows10系統(tǒng)、Oracle 11g版、Dell G3電腦。
oracle 11g怎么關(guān)閉rac
在11g由于CRS的信息也是放在ASM 實(shí)例里的,所以要關(guān)asm,必須關(guān)閉crs,在Oracle11g RAC的架構(gòu)如下
1、關(guān)閉數(shù)據(jù)庫(kù)前建議關(guān)閉監(jiān)聽(tīng)和kill會(huì)話
srvctl stop listener ps -ef|grep LOCAL=NO|awk -F' ' '{print $2}'|xargs kill -9
2、要關(guān)閉RAC,需在2個(gè)節(jié)點(diǎn)都配置好root的.bash_profile
export ORACLE_HOME=/u01/grid/product/11gr2 export PATH=$ORACLE_HOME/bin:$PATH
3、關(guān)閉RAC
[root@racnode1 ~]# crsctl stop has [root@racnode2 ~]# crsctl stop has
擴(kuò)展知識(shí):
啟動(dòng)RAC
[root@racnode1 ~]# crsctl start has [root@racnode2 ~]# crsctl start has
crsctl的其他選項(xiàng),通過(guò)以下命令只需要在一個(gè)節(jié)點(diǎn)上啟動(dòng)關(guān)閉RAC racnode1是節(jié)點(diǎn)的主機(jī)名
[root@racnode1 ~]# crsctl stop cluster -n racnode1 racnode2
啟動(dòng)RAC
[root@racnode1 ~]# crsctl start cluster -n racnode1 racnode2
推薦教程:《Oracle視頻教程》