grid after setting environment variables can be executed in any directory, such as root words you need not set with absolute path
Export ORACLE_HOME = / u01 / App / 11.2.0 / grid
Export the PATH = $ ORACLE_HOME / bin: $ the PATH
- / u01 / App /11.2.0/grid/bin/crsctl or srvctl
View cluster status
[Grid testdb1 @ ~] $ the crs_stat -t -v
[Grid testdb1 @ ~] $ srvctl Status Database -d TESTDB
[Grid testdb1 @ ~] $ srvctl Status the DATA diskgroup -g -n testdb2, testdb1
[Grid @ ~ testdb1] Status the srvctl ASM $
[Grid testdb1 @ ~] Status ASM $ -n testdb1 the srvctl
1、停监听
[grid@testdb1 ~]$ crsctl status res -t
[grid@testdb1 ~]$ srvctl stop scan_listener
[grid@testdb1 ~]$ srvctl stop listener
2, kill session / two nodes
select 'alter system disconnect session' ' ' || sid || ',' || serial # || '' 'immediate;' from v $ session where type = 'USER';
3, do checkpoint / two nodes
ALTER System Switch logfile;
ALTER System the checkpoint;
4, close the database and CRS
off library / -o immediate any node can immediately stop
[grid @ testdb1 ~] $ srvctl stop database -d TESTDB -o immediate
execution or after each SQL database node login> shutdown immediate
Shimonoseki CRS / both nodes
[root] User
[testdb1 root @ ~] STOP # /u01/app/11.2.0/grid/bin/crsctl CRS
[testdb2 root @ ~] # /u01/app/11.2. 0 / grid / bin / crsctl stop crs
5, stop ASM / two nodes
if you want to stop ASM, [root] user
[root @ testdb1 ~] # /etc/init.d/oracleasm STOP
Dropping the Oracle ASMLib Disks: [the OK]
Shutting Down the Oracle ASMLib at The Driver: [the OK ]
[root @ testdb2 ~] # /etc/init.d/oracleasm STOP
Dropping the Oracle ASMLib Disks: [the OK]
Shutting Down the Oracle ASMLib at The Driver: [the OK]
6, Kai library
Contrary to stop the library order
RAC 11gR2, if it is with the shutdown immediate instead srvctl stop database -d xxx -o immediate stop library, then Kai CRS also need to manually start up the database
if the instance manually start up in crsctl status res -t display or an instance instance Shutdown words, but in fact instance already started up, the available commands srvctl start instance -d xxx -n xxx resolved.
/ *
Start
each node performs
[testdb1 the root @ ~] # /etc/init.d/oracleasm Start
the Initializing the Oracle the ASMLib The Driver: [the OK]
Scanning System for the Oracle the ASMLib The Disks: [the OK]
[root@testdb2 ~]# /etc/init.d/oracleasm start
- off / on CRS, a node need only be performed where
[the root testdb1 @ ~] # /u01/app/11.2.0/grid/bin/crsctl STOP / Start CRS
[testdb1 the root @ ~] # / u01 / App /11.2.0/grid/bin/crsctl start cluster
Any node that performs a
[testdb1 the root @ ~] -d Database # /u01/app/11.2.0/grid/bin/srvctl Start the TESTDB
* /
portion of a user command to execute the grid
[root @ testdb1 ~] # / u01 / app Status /11.2.0/grid/bin/crsctl / Start / STOP RES -t
[testdb1 the root @ ~] STOP # /u01/app/11.2.0/grid/bin/srvctl scan_listener
[testdb1 the root @ ~] # / u01 /app/11.2.0/grid/bin/srvctl stop listener
[root@testdb1 ~]# /u01/app/11.2.0/grid/bin/srvctl stop database -d TESTDB -o immediate
[root@testdb1 ~]# /u01/app/11.2.0/grid/bin/srvctl start database -d MYDB
////////////////////////////////////////////////////////////////////////////
[Order] Close
Off DB
the srvctl the TESTDB -o -d Database immediate STOP
停HAS (用root)
/u01/app/11.2.0/grid/bin/crsctl stop has -f
Stop Cluster (with root)
- stop all nodes
/u01/app/11.2.0/grid/bin/crsctl stop cluster -all
- stop local node
/u01/app/11.2.0/grid/bin/crsctl stop cluster
- associated control node
/u01/app/11.2.0/grid/bin/crsctl cluster -n rac1 rac2
[Start sequence]
11g R2 default boot from the start, manually start the cluster / HAS / database
open cluster
- all nodes
/u01/app/11.2.0/grid/bin/crsctl Start Cluster -all
- specify that a node / nodes 2 At the same time start
/u01/app/11.2.0/grid/bin/crsctl start cluster -n rac1 rac2
Enable a HAS (with root) were performed in each node
/u01/app/11.2.0/grid/bin/crsctl start has
Kai Database
- all nodes start
/u01/app/11.2.0/grid/bin/srvctl start database -d testdb
or per-node SQL> STARTUP;
or /u01/app/11.2.0/grid/bin/srvctl start instance -d testdb -i testdb1
Verify
/u01/app/11.2.0/grid/bin/crs_stat -t -v
or -t Resource /u01/app/11.2.0/grid/bin/crsctl
the crsctl Check Cluster
check node cluster state
crsctl check crs
/ *
Prohibit CRS from the start
./crsctl disable crs
check whether the self-starting
./crsctl config crs
set from the start / each node performs
crs enables crs
grid ocr / votedisk check
the crsctl Query CSS votedisk;
ocrcheck
* /
crsctl command is a command cluster level, can be unified for all cluster resources to start, stop and other management operations
srvctl command is a command-level service, you can start a single unified service resources, stop and other management operations
where
-d, namely database name, It represents a database name
-n, i.e. node name, node name indicates
-i, i.e., instance name, the instance name represents
Architecture Oracle 11g RAC with the startup sequence
https://blog.csdn.net/xianjuke008/article/details/84283458
RAC 管理(crs_stat、crsctl、srvctl)
http://www.voidcn.com/article/p-okvacbgg-cr.html