Oracle 11GR2 RAC Cluster service startup and shutdown summary ____oracle

Source: Internet
Author: User

Introduction: The source of this article is because one of my students recently set up a RAC cluster in the company, but the sequence and principle of its startup and shutdown are not particularly clear, and I have found many students who know very little about RAC knowledge in my teaching work. So I'm here to enumerate the most commonly used startup and shutdown sequences and commands involved in RAC, and because of the high background of the RAC, there are many commands involved, and finally, a help manual for temporary use in the work can be quickly detected, If this article can help everyone is my future efforts to write the momentum, thank you for my article to browse more valuable advice.

Shutdown process (CRS cluster shutdown-> shutdown database)
1. Close the database:
Execute srvctl command with ORACL user
Syntax: srvctl stop database-d dbname [-o immediate]
Function: You can turn off all instances of dbname at once
[Oracle@rac1 ~]$ srvctl stop database-d racdb-stopping instances on all nodes
Then view the status:
[Oracle@rac1 ~]$ srvctl status database-d racdb
Instance Rac1 is isn't running on node Rac1
Instance Rac2 is isn't running on node race
2. Stop has (high availability Services), must operate as root user
[Root@rac1 oracle]# Cd/u01/grid/11.2.0/grid/bin
[Root@rac1 bin]#./crsctl Stop Has-f
[Root@rac1 bin]#./crsctl Stop Crs-f
This command can only turn off the CRS service for the current node, so it needs to be performed on all nodes of the RAC, starting as well. Has is synonymous with CRS
3. Stop node Cluster service, must be root user:
[Root@rac1 oracle]# Cd/u01/grid/11.2.0/grid/bin
[Root@rac1 bin]#./crsctl Stop cluster----stopping Cluster service on this node
[Root@rac1 bin]#./crsctl Stop Cluster-all---stops all node services
You can also control the paused node as follows:
[Root@rac1 bin]# crsctl stop cluster-n Rac1 RAC2
Crs-2677:stop of ' ora.cssd ' on ' Rac1 ' succeeded
Crs-2677:stop of ' ora.cssd ' on ' Rac2 ' succeeded
。。。。。。。。。。。 Omit log output ........
You can use the above command if you want an order to stop all processes. If the parameter is not specified, it is valid for the current node and is valid for the relevant parameter node if the parameter is specified.
4. Check the status of the cluster process
[Root@rac1 bin]# crsctl Check Cluster
Verbose output
[Root@rac1 bin]# crs_stat-t-V
Check only the cluster status of this node
[Root@rac1 bin]# crsctl Check CRS

Startup process (CRS cluster startup-> startup database)
1. Start has
Single node startup
[Root@rac2 ~]# crsctl start has
[Root@rac2 ~]# crsctl start CRS
[Root@rac2 ~]# crsctl Check CRS
Crs-4638:oracle High Availability Services are online
Crs-4537:cluster Ready Services is online
Crs-4529:cluster Synchronization Services is online
Crs-4533:event Manager is online
All nodes started
[Root@rac1 bin]# crsctl start cluster-n Rac1 rac2
Crs-4123:oracle High Availability Services has been started.
[Root@rac1 bin]# crsctl start Cluster-all
[Root@rac2 ~]# crsctl Check Cluster
Crs-4537:cluster Ready Services is online
Crs-4529:cluster Synchronization Services is online
Crs-4533:event Manager is online
This command starts all RAC CRS-related processes in the background
[Root@rac2 ~]# crs_stat-t-V
Crs-0184:cannot communicate with the CRS daemon.
Since start has the CRS process started more slowly so it starts slower, my machine waits for 5 minutes and reports the above error before it is fully launched, and needs to be patient for a while before executing the following command to see that all CRS-related process services have started.
[Root@rac2 ~]# crs_stat-t-V
Name Type r/ra f/ft Target State Host
----------------------------------------------------------------------
Ora. DATA.DG ora....up.type 0/5 0/online ONLINE Rac1
Ora ..... Er.lsnr ora....er.type 0/5 0/online ONLINE Rac1
Ora ..... N1.lsnr ora....er.type 0/5 0/0 Online online Rac2
Ora ..... N2.lsnr ora....er.type 0/5 0/0 Online online Rac1
Ora ..... N3.lsnr ora....er.type 0/5 0/0 Online online Rac1
Ora.asm ora.asm.type 0/5 0/online ONLINE Rac1
ORA.CVU ora.cvu.type 0/5 0/0 Online online Rac1
ORA.GSD ora.gsd.type 0/5 0/offline OFFLINE
Ora....network ora....rk.type 0/5 0/online ONLINE Rac1
ora.oc4j ora.oc4j.type 0/1 0/2 Online online Rac1
Ora.ons ora.ons.type 0/3 0/online ONLINE Rac1
Ora ..... SM1.ASM application 0/5 0/0 online online Rac1
Ora ..... C1.lsnr application 0/5 0/0 online online Rac1
ORA.RAC1.GSD application 0/5 0/0 OFFLINE OFFLINE
Ora.rac1.ons application 0/3 0/0 online online Rac1
ORA.RAC1.VIP ora....t1.type 0/0 0/0 Online online Rac1
Ora ..... SM2.ASM application 0/5 0/0 online online Rac2
Ora ..... C2.lsnr application 0/5 0/0 online online Rac2
ORA.RAC2.GSD application 0/5 0/0 OFFLINE OFFLINE
Ora.rac2.ons application 0/3 0/0 online online Rac2
ORA.RAC2.VIP ora....t1.type 0/0 0/0 Online online Rac2
Ora....ry.acfs ora....fs.type 0/5 0/online ONLINE Rac1
ORA.SCAN1.VIP ora....ip.type 0/0 0/0 Online online Rac2
ORA.SCAN2.VIP ora....ip.type 0/0 0/0 Online online Rac1
ORA.SCAN3.VIP ora....ip.type 0/0 0/0 Online online Rac1
Description
English explanation
ORA.GSD is OFFLINE by default ifthere are no 9i database in the cluster.
ORA.OC4J is OFFLINE into 11.2.0.1 as Databaseworkload Management (DBWLM) is unavailable. These can be ignored IN11GR2 RAC.
Chinese explanation
ORA.GSD is a process that is used in cluster services to communicate with 9i databases and is saved for backward compatibility in the current release, and the status of offline does not affect the normal operation and performance of CRS.
ORA.OC4J is an effective service process in the 11.2.0.2 version and is used for DBWLM resource management, so the following versions are not used in 11.2.0.1
2. Start the database:
Oracl user to execute SRVCTL command:
Syntax: Srvctl start|stop|status database-d dbname [-o immediate]
Action: All instances of dbname can be started at a one-time
[Oracle@rac1 ~]$ srvctl start database-d racdb-Start an instance on all nodes
Then view the status:
[Oracle@rac1 ~]$ srvctl status database-d racdb
3. Detailed output resource full name and check status
Crsctl Status Resource-t
Crsctl Status Resource
4. Common SRVCTL Command
Specify an instance on dbname
Srvctl start|stop|status instance-d <dbname> I. <instance_name>
5. Show all instance configurations and status under RAC
Srvctl status|config database-d <dbname>
6. Show application services for all nodes (Vip,gsd,listener,ons)
Srvctl Start|stop|status nodeapps-n<node_name>
7.ASM Process Service Management
Srvctl start|stop|status|config asm-n <nodename>[-i <asm_inst_name>] [-o<oracle_home>]
Srvctl Config asm-a
Srvctl Status Asm-a
6. Access to all environmental information:
Srvctl getenv database-d <dbname> [-i<instance_name>]
7. Set up Global environment and variables:
Srvctl setenv database-d<dbname>-T lang=en
8. Delete existing database information in OCR
Srvctl Remove database-d <dbname>
9. Add an instance of a database to OCR:
Srvctl Add instance-d <dbname>-i<instance_name>-N <node1>
Srvctl Add instance-d <dbname>-i<instance_name>-N <node2>
10. Check the status of the monitor
SRVCTL Status Listener
Srvctl Config listener-a
Scan configuration information
Srvctl Config Scan
SCAN Listener status information
Srvctl Status Scan


Summary: The CRSCTL command is a cluster-level command that enables unified start, stop, and other management operations on all cluster resources
The SRVCTL command is a service-level command that enables unified start, stop, and other administrative operations on a single service resource


Attached: srvctl command start and stop detailed help
[Root@rac2 ~]# Srvctl start-h


The SRVCTL start command starts, Oracle Clusterware enabled, non-running objects.


Usage:srvctl start database-d <db_unique_name> [-o <start_options>] [-N <node>]
Usage:srvctl start instance-d <db_unique_name> {-N <node_name> [i <inst_name>] |-I <inst_name_lis T&GT} [-O <start_options>]
Usage:srvctl start service-d <db_unique_name> [-S "<service_name_list>" [-N <node_name> |-i <inst_ NAME&GT]] [o <start_options>]
Usage:srvctl start Nodeapps [-n <node_name>] [g] [-V]
Usage:srvctl start VIP {-N <node_name> | I <vip_name>} [-V]
Usage:srvctl start ASM [-n <node_name>] [-O <start_options>]
Usage:srvctl start listener [-l &LT;LSNR_NAME&GT;] [-N <node_name>]
Usage:srvctl start scan [-I <ordinal_number>] [-N <node_name>]
Usage:srvctl start Scan_listener [-n <node_name>] [-I <ordinal_number>]
Usage:srvctl start oc4j [-v]
Usage:srvctl start Home-o <oracle_home>-S <state_file>-n <node_name>
Usage:srvctl start filesystem-d <volume_device> [-n <node_name>]
Usage:srvctl start Diskgroup-g <dg_name> [-n ' <node_list>]
Usage:srvctl start GNS [-L &LT;LOG_LEVEL&GT;] [-N <node_name>] [-v]
Usage:srvctl start CVU [-N <node_name>]
For detailed help on the each command and object with the options use:
Srvctl <command> <object>-H


[Root@rac2 ~]# Srvctl stop-h


The SRVCTL Stop command stops, Oracle Clusterware enabled, starting or running objects.


Usage:srvctl stop database-d <db_unique_name> [o <stop_options>] [F]
Usage:srvctl Stop instance-d <db_unique_name> {-N <node_name> |-i <inst_name_list>} [-O <stop_opt Ions>] [F]
Usage:srvctl Stop service-d <db_unique_name> [-S <service_name_list>] [-N <node_name> |-i <inst_n Ame>]] [f]
Usage:srvctl Stop Nodeapps [-n <node_name>] [-G] [-f] [-r] [-V]
Usage:srvctl Stop VIP {-N <node_name> | I <vip_name>} [-F] [-r] [-V]
Usage:srvctl stop ASM [-n <node_name>] [-O <stop_options>] [F]
Usage:srvctl Stop listener [-l &LT;LSNR_NAME&GT;] [-N <node_name>] [F]
Usage:srvctl Stop Scan [-I <ordinal_number>] [F]
Usage:srvctl Stop Scan_listener [-I <ordinal_number>] [F]
Usage:srvctl Stop oc4j [-f] [-V]
Usage:srvctl Stop Home-o <oracle_home>-S <state_file>-n <node_name> [t <stop_options>] [F]
Usage:srvctl Stop filesystem-d <volume_device> [-n <node_name>] [F]
Usage:srvctl Stop Diskgroup-g <dg_name> [-N "<node_list>"] [f]
Usage:srvctl stop GNS [-n <node_name>] [-f] [-V]
Usage:srvctl stop CVU [f]
For detailed help on the each command and object with the options use:
Srvctl <command> <object>-H

More Oracle related information see Oracle feature page http://www.linuxidc.com/topicnews.aspx?tid=12

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.