Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle rac start and stop

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

=

Crsctl command is a cluster-level command, which can uniformly start, stop and other management operations on all cluster resources.

The srvctl command is a service-level command that can perform unified start, stop and other management operations on a single service resource.

Confirm the db_unique_name of the cluster

Show parameter name

DB_UNIQUE_NAME mservs183 unique name

Service_names mservs183 service name SERVICE_NAMES= global database name (GLOBAL_DB_NAME) = db_name+db_domain

The db_name mservs database name is uniquely identified, and there is only one db_name in a database. Db_name cannot be changed after the database is created

Instance_name mservs1 mservs2 instance name

SID mservs1 mservs2, whose full name is Oracle System Identifier, appears in the form of environment variables to distinguish between different instances.

=

Rac cluster start and stop

Closing order:

Turn off snooping

Srvctl status listener

Srvctl stop listener

Srvctl status listener

Make sure there is no session executing on the instance before shutting down. If there is a shutdown window, it is recommended to kill a local=no session.

Select 'alter system disconnect session''| | sid | |','| | serial# | |''immediate;' from v$session where type='USER'

Ps-ef | grep-I local=no | wc-l

Ps-ef | grep-I local=no | cut-c 10-15 | xargs kill-9

Close the database, and the oracl user executes the srvctl command:

Alter system switch logfile

Alter system checkpoint

Srvctl stop database-o immediate-d mservs

Srvctl status database-d mservs or crs_stat-t-v

Crs must be stopped with root user, each node

(this command can only shut down the CRS service of the current node, so it needs to be executed on all nodes of the RAC, as does startup. Has is equivalent to crs)

Cd / u183/app/11.2.0/grid/bin/

. / crsctl stop crs (- f) or. / crsctl stop has (- f)

. / crsctl check crs

. / crsctl check has

Ps-ef | grep-I ora

Ps-ef | grep-I asm

Boot sequence:

RAC for 11g R2 starts itself by default, of course, if you need to start it manually. Manual startup can be started in the order of cluster,crs,database. The specific commands are as follows:

You must start crs,HAS (High Availability Services) as the root user

(this command can only start the CRS service of the current node, so it needs to be executed on all nodes of RAC, as well as startup. Has is equivalent to crs)

Cd / u183/app/11.2.0/grid/bin/

. / crsctl start crs (- f) (usually self-booting, no need to start manually)

Crsctl check crs

Start the database, and the oracl user executes the srvctl command (assuming the database name is mservs):

Srvctl start database-d mservs

Crsctl check cluster

Crsctl stat res-t or crs_stat-t-v

Turn on monitoring

Srvctl status listener

Srvctl start listener

Srvctl status listener

=

Rac database single node startup and shutdown

Srvctl status listener-n GDSDB002

Srvctl stop listener-n GDSDB002

Srvctl status listener-n GDSDB002

Ps-ef | grep-I local=no | wc-l

Ps-ef | grep-I local=no | cut-c 10-15 | xargs kill-9

Alter system switch logfile

Alter system checkpoint

Srvctl stop instance-o immediate-d mservs-I mservs2

Srvctl status database-d mservs

/ u183/app/11.2.0/grid/bin/crsctl stop crs (executed on Node 2)

Ps-ef | grep-I ora

Ps-ef | grep-I asm

/ u183/app/11.2.0/grid/bin/crsctl start crs (executed on Node 2, usually booting itself, no need to start manually)

Srvctl status asm

Srvctl start instance-d mservs-I mservs2

Srvctl status database-d mservs

Srvctl start listener-n GDSDB002

Srvctl status listener

Crsctl stat res-t or crs_stat-t-v

=

Repair of incorrect display of node status in cluster

Srvctl remove database-d mservs

Srvctl add database-d mservs-o / u183/app/oracle/product/11.2.0/db_1

Srvctl add instance-d mservs-I mservs1-n GDSDB010

Srvctl add instance-d mservs-I mservs2-n GDSDB002

Srvctl start db-d mservs

# # srvctl start instance-d mservs-n GDSDB010

# # srvctl start instance-d mservs-n GDSDB002

Srvctl enable database-d mservs

Srvctl status database-d mservs

Crsctl stat res-t or crs_stat-t-v

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report