RAC常用開啟關閉命令 - CRSCTL和SRVCTL 用法
1. How the crs related services startup when OS startup or reboot:
OS: Linux
From the directory (/etc/init.d), There are four executable shell scripts:
init.crs (Combination of all services' start)
init.crsd (crs daemon)
init.cssd (cluster synchronization service)
init.evmd (event manager)
init.crs (Combination of all services' start)
init.crsd (crs daemon)
init.cssd (cluster synchronization service)
init.evmd (event manager)
Note: /etc/init.d/init.crs start is not supported until 10.1.0.4
/etc/init.d/init.crs stop is supported since 10.1.0.2
/etc/init.d/init.crs stop is supported since 10.1.0.2
2. How to start/stop crs related services ?
From the directory: $CRS_HOME/bin, there are several executable shell scripts (Start with crs_):
crsctl (Combination of all crs conctrl command)
crsd (crs daemon)
crs_getperm (Get parameter)
crs_profile
crs_register (Register targets on the host)
crsd (crs daemon)
crs_getperm (Get parameter)
crs_profile
crs_register (Register targets on the host)
crs_unregister (Unregister targets on the host)
Maybe this command is useful when you want to remove error register information which has been detected by CRS.
Steps:
#list all listener of cluster env
crs_stat |grep lsnr
#list all listener of cluster env
crs_stat |grep lsnr
# resource_name comes from: crs_stat |grep name
crs_unregister resource_name -q
crs_unregister resource_name -q
crs_relocate (Relocate targets on the host)
3. Detailed usage
3.1 crsctl
Note: There are some relationship between CSS,CRS,EVM services.Bouncing CRS service will start CRS resources first, then bounce CSS and EVM service automatically;
Shutting down CRS service will stop CRS resources only, It doesn't affect other related services(CSS,EVM)
If user wanna shutdown CSS service, CRS, EVM service will be stopped as well;
If user wanna shutdown CRS or CSS service, EVM service will be stopped as well;
So, In order to eliminate the dependency of these services, we'd better use command line tool "crsctl" to bounce crs service. Issue the command "crsctl" and it will list all available commands:
crsctl check crs - checks the viability of the CRS stack
crsctl check cssd - checks the viability of CSS
crsctl check crsd - checks the viability of CRS
crsctl check evmd - checks the viability of EVM
crsctl set css <parameter> <value> - sets a parameter override
crsctl get css <parameter> - gets the value of a CSS parameter
crsctl unset css <parameter> - sets CSS parameter to its default
crsctl query css votedisk - lists the voting disks used by CSS
crsctl add css votedisk <path> - adds a new voting disk
crsctl delete css votedisk <path> - removes a voting disk
crsctl enable crs - enables startup for all CRS daemons
crsctl disable crs - disables startup for all CRS daemons
crsctl start crs - starts all CRS daemons.
crsctl stop crs - stops all CRS daemons. Stops CRS resources in case of cluster.
crsctl add css votedisk <path> - adds a new voting disk
crsctl delete css votedisk <path> - removes a voting disk
crsctl enable crs - enables startup for all CRS daemons
crsctl disable crs - disables startup for all CRS daemons
crsctl start crs - starts all CRS daemons.
crsctl stop crs - stops all CRS daemons. Stops CRS resources in case of cluster.
Note: Since 10.2, User can choose either "init.crs start/stop" or "crsctl start/stop crs" to start/stop all CRS daemons.
crsctl start resources - starts CRS resources.
crsctl stop resources - stops CRS resources.
crsctl stop resources - stops CRS resources.
crsctl debug statedump evm - dumps state info for evm objects
crsctl debug statedump crs - dumps state info for crs objects
crsctl debug statedump css - dumps state info for css objects
crsctl debug log css [module:level]{,module:level} ...
- Turns on debugging for CSS
crsctl debug trace css - dumps CSS in-memory tracing cache
crsctl debug log crs [module:level]{,module:level} ...
- Turns on debugging for CRS
crsctl debug trace crs - dumps CRS in-memory tracing cache
crsctl debug log evm [module:level]{,module:level} ...
- Turns on debugging for EVM
crsctl debug trace evm - dumps EVM in-memory tracing cache
crsctl debug log res <resname:level> turns on debugging for resources
crsctl debug statedump crs - dumps state info for crs objects
crsctl debug statedump css - dumps state info for css objects
crsctl debug log css [module:level]{,module:level} ...
- Turns on debugging for CSS
crsctl debug trace css - dumps CSS in-memory tracing cache
crsctl debug log crs [module:level]{,module:level} ...
- Turns on debugging for CRS
crsctl debug trace crs - dumps CRS in-memory tracing cache
crsctl debug log evm [module:level]{,module:level} ...
- Turns on debugging for EVM
crsctl debug trace evm - dumps EVM in-memory tracing cache
crsctl debug log res <resname:level> turns on debugging for resources
crsctl query crs softwareversion [<nodename>]
- lists the version of CRS software installed
- lists the version of CRS software installed
crsctl query crs activeversion
- lists the CRS software operating version
- lists the CRS software operating version
crsctl lsmodules css
- lists the CSS modules that can be used for debugging
- lists the CSS modules that can be used for debugging
crsctl lsmodules crs
- lists the CRS modules that can be used for debugging
- lists the CRS modules that can be used for debugging
crsctl lsmodules evm
- lists the EVM modules that can be used for debugging
- lists the EVM modules that can be used for debugging
If necesary any of these commands can be run with additional tracing by adding a "trace" argument at the very front.
Example: crsctl trace check css
Example: crsctl trace check css
3.2 Startup/shutdown steps
In windows, the correct startup/shutdown steps is:
Shutdown:
1. Shutdown db console service if it's running
2. Shutdown OraService<sid> via "control panel" ->"services"
3. srvctl stop instance -d <db_name> -i <instance_name>
4. srvctl stop asm -n <node_name> if using asm
5. srvctl stop nodeapps -n <node_name>
6. Shutdown crs service via "control panel" ->"services"
1. Shutdown db console service if it's running
2. Shutdown OraService<sid> via "control panel" ->"services"
3. srvctl stop instance -d <db_name> -i <instance_name>
4. srvctl stop asm -n <node_name> if using asm
5. srvctl stop nodeapps -n <node_name>
6. Shutdown crs service via "control panel" ->"services"
Startup:
1. Startup crs service via "control panel" ->"services"
2. srvctl start nodeapps -n <node_name>
3. srvctl start asm -n <node_name> if using asm
4. srvctl start instance -d <db_name> -i <instance_name>
5. Startup OraService<sid> via "control panel" ->"services"
6. Startup db console service if it's running
1. Startup crs service via "control panel" ->"services"
2. srvctl start nodeapps -n <node_name>
3. srvctl start asm -n <node_name> if using asm
4. srvctl start instance -d <db_name> -i <instance_name>
5. Startup OraService<sid> via "control panel" ->"services"
6. Startup db console service if it's running
In Linux, almost all steps are same except how to startup/shutdown crs service. You can execute "/etc/init.d/init.crs stop/start" or issue "crsctl start/stop crs" to bounce or shutdown crs service.
EXAMPLE:
STARTUP:
rac1->srvctl start nodeapps -n rac1
rac1->srvctl start nodeapps -n rac2
rac1->srvctl start asm -n rac1
rac1->srvctl start asm -n rac2
rac1->srvctl start -d devdb
rac1->srvctl start service -d devdb
rac1->crs_stat -t
SHUTDOWN:
rac1->srvctl stop service -d devdb
rac1->srvctl stop database -d devdb
rac1->srvctl stop asm -n rac2
rac1->srvctl stop asm -n rac1
rac1->srvctl stop nodeapps -n rac2
rac1->srvctl stop nodeapps -n rac1
rac1->crs_stat–t
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28211342/viewspace-2129673/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC常用開啟關閉命令 – SRVCTL用法
- CRSCTL和SRVCTL的命令用法
- oracle10g rac(rhel4)__crsctl_srvctl_ocrctl命令Oracle
- oracle rac crsctl 命令大全Oracle
- RAC中的srvctl和crs命令
- Oracle11gRAC中關於srvctl和crsctl的解釋?Oracle
- linux關閉防火牆命令 linux防火牆關閉和開啟命令Linux防火牆
- rac 命令 srvctl 報錯
- nginx 開啟、關閉、重啟常用操作Nginx
- oracle rac的vip與srvctl啟動關係Oracle
- oracle 11g RAC 啟動和關閉和一些維護命令Oracle
- ORACLE RAC 的啟動和關閉順序Oracle
- Oracle 10g RAC中Srvctl基本用法Oracle 10g
- MySQL啟動和關閉命令總結MySql
- 開啟/關閉子系統的命令
- Oracle RAC 啟動與關閉Oracle
- Oracle10g RAC開啟關閉過程Oracle
- 10G RAC: srvctl 命令總結
- 【RAC】使用crsctl工具控制Oracle RAC叢集的啟停Oracle
- Oracle10g RAC開啟關閉時候究竟在關閉什麼Oracle
- 【RAC】使用crsctl命令獲取Oracle CRS版本資訊Oracle
- Oracle 11gR2 RAC的關閉和啟動Oracle
- SElinux的開啟和關閉Linux
- centos:開啟和關閉selinuxCentOSLinux
- nginx啟動,重啟,關閉命令Nginx
- RAC之srvctl 命令不能用的問題
- oracle 10g rac srvctl 命令總結Oracle 10g
- RAC: SRVCTL and VIPCA 命令報錯解決方法PCA
- oracle 11gR2 RAC crsctl 命令的增強Oracle
- ubuntu下開啟/關閉防火牆 及埠 - 命令Ubuntu防火牆
- rac常用維護工具和命令
- rac 常用命令和工具
- 關閉和開啟歸檔日誌
- 批處理開啟和關閉OracleOracle
- oracle資料庫不同啟動命令和關閉命令全面解析Oracle資料庫
- rac 管理 啟動關閉資料庫資料庫
- 11gR2和10gR2中crsctl/srvctl的區別
- RAC 11.2.0.3 維護命令(三) SRVCTL管理services