search
HomeDatabaseOracleHow to close oracle rac

How to close oracle rac

Dec 29, 2021 pm 03:12 PM
oracle

Methods to shut down oracle rac: 1. Stop the listening service of each node; 2. Shut down the database instance; 3. Shut down the ASM instance; 4. Use the crs_stat command to check whether the service status of the RAC node is normal; 5. Stop CRS cluster software is enough.

How to close oracle rac

The operating environment of this tutorial: Windows 7 system, Oracle 11g version, Dell G3 computer.

How to start and shut down Oracle RAC correctly?

If you want to shut down the Oracle cluster database system, the simple and crude way is to execute the OS command on the operating system: shutdown -h now;

This method is more violent and can shut down the database system. However, some Oracle services may not be shut down properly. After restarting the OS, many services will be in the UNKNOW state.

So how to shut down and start RAC correctly according to the Oracle working mechanism?

##RAC Reasonable order for shutdown: (Note: Exit all client connections, such as SQLplus...)

Stop listening on each node Service-->>Close database (instance)-->>Close ASM instance-->>Close node cluster service-->>Close server

1. Stop the monitoring service of each node

Check the listening status: ##

srvctl status listener -n node1

##Close listening:

[oracle@node1 ~]$ srvctl stop listener -n node1
[oracle@node2 ~]$ srvctl stop listener -n node2

You can use the above command to stop the corresponding monitoring on two nodes, or you can use the following command to execute on one node to stop All monitoring.

[oracle@node1 ~]$ srvctl stop listener

Check the listening status again:

2. Close the database instance

(1) View the database Instance name: select instance_name from v$instance;


For example, the database instance name found is: DEVDB

(2) Use the srvctl (service control) command to shut down the cluster services in sequence (note: exit the sqlplus client above, otherwise the database cannot be shut down normally)

A. Check the database instance status (executed under oracle user)


srvctl status database -d DEVDB (数据库实例名根据实际填写,并且区分大小写)

b Close the database instance:

srvctl stop database -d DEVDB

The above command can only be used in one You can execute it on the node, or you can execute the following commands separately on two nodes to achieve the same function.

srvctl stop instance -d DEVDB -i devdb1  (填写自实际的INSTANCE_NAME)
srvctl stop instance -d DEVDB -i devdb2

C Check the shutdown status: srvctl status database -d DEVDB

3.关闭ASM实例

查看ASM运行状态:srvctl status asm -n node1

停止ASM实例:

srvctl stop asm -n node1

4.关闭RAC(CRS)集群服务

(1)使用crs_stat 命令查询RAC节点的服务状态是否正常 (root或者grid用户)

crs_stat -t -v

(2)停止CRS集群服务

停止两个节点的服务:

srvctl stop nodeapps -n node1
srvctl stop nodeapps -n node2

****

(3)停止CRS集群软件

[root@node1 ~]# find / -name crsctl 

[root@node1 ~]# /u01/grid/11.2.0.4/bin/crsctl stop crs   (分别在两个节点的root用户下执行)

CRS-2791: 正在启动用于关闭 'rac1' 上 Oracle High Availability Services 管理的资源的操作
CRS-2673: 尝试停止 'ora.crsd' (在 'rac1' 上)
CRS-2790: 正在启动关闭 'rac1' 上集群就绪服务管理的资源的操作
CRS-2673: 尝试停止 'ora.asm' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.asm' (在 'rac1' 上)
CRS-2792: 关闭 'rac1' 上集群就绪服务管理的资源的操作已完成
CRS-2677: 成功停止 'ora.crsd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.cssdmonitor' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.ctssd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.evmd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.asm' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.mdnsd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.cssdmonitor' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.evmd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.mdnsd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.ctssd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.asm' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.cssd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.cssd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.gpnpd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.diskmon' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.gpnpd' (在 'rac1' 上)
CRS-2673: 尝试停止 'ora.gipcd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.gipcd' (在 'rac1' 上)
CRS-2677: 成功停止 'ora.diskmon' (在 'rac1' 上)
CRS-2793: 关闭 'rac1' 上 Oracle High Availability Services 管理的资源的操作已完成
CRS-4133: Oracle High Availability Services has been stopped.

注意:停止数据库集群软件,在一个节点执行即可,在节点2就不用执行了。

(4)再次查看两个节点的CRS服务状态:

[grid@node1 ~]$ crs_stat -t -v 
CRS-0184: Cannot communicate with the CRS daemon. (服务已经关闭)
[grid@node2 ~]$ crs_stat -t -v
CRS-0184: Cannot communicate with the CRS daemon. (服务已经关闭)

当上述操作都执行完成,并且正常关闭后,就可以将服务器的关闭了。

================

启动的顺序和关闭相反

启动服务器-->>启动服务-->>启动ASM-->>启动实例-->>启动监听

这里我们需要注意;Oracle RAC集群软件有一个属性可以设置,就是当服务器操作系统重启后,集群服务是否会随着操作系统一块启动;上边启动的顺序步骤是在:当禁用该自启动属性的情况下的操作顺序;关于该属性的查看与设置,详见下一篇稳文章:关于集群自启动的查看

(1)首先启动服务器

(2)启动CRS软件:

[root@node1 ~]# find / -name crsctl 
[root@node1 ~]# /u01/grid/11.2.0.4/bin/crsctl start crs

查看服务:

srvctl status nodeapps -n node1
srvctl status nodeapps -n node2
crsctl status res – -t

(3)启动ASM

查看ASM状态

srvctl status asm -n node1

启动ASM

srvctl start asm -n node1
srvctl start asm -n node2

(4)启动实例

srvctl status database -d node1
srvctl start database -d node2

(5)启动监听

srvctl status listener   (RAC环境)
srvctl start listener  
或者 lsnrctl start

===============================

重启=关闭+启动

从上述各步可以看出,关闭和开启都是分步执行的,这样操作还有一个好处,可以帮助我们发现定位问题。

推荐教程:《Oracle使用教程

The above is the detailed content of How to close oracle rac. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Does Oracle Offer? Products and Services ExplainedWhat Does Oracle Offer? Products and Services ExplainedApr 16, 2025 am 12:03 AM

Oracleoffersacomprehensivesuiteofproductsandservicesincludingdatabasemanagement,cloudcomputing,enterprisesoftware,andhardwaresolutions.1)OracleDatabasesupportsvariousdatamodelswithefficientmanagementfeatures.2)OracleCloudInfrastructure(OCI)providesro

Oracle Software: From Databases to the CloudOracle Software: From Databases to the CloudApr 15, 2025 am 12:09 AM

The development history of Oracle software from database to cloud computing includes: 1. Originated in 1977, it initially focused on relational database management system (RDBMS), and quickly became the first choice for enterprise-level applications; 2. Expand to middleware, development tools and ERP systems to form a complete set of enterprise solutions; 3. Oracle database supports SQL, providing high performance and scalability, suitable for small to large enterprise systems; 4. The rise of cloud computing services further expands Oracle's product line to meet all aspects of enterprise IT needs.

MySQL vs. Oracle: The Pros and ConsMySQL vs. Oracle: The Pros and ConsApr 14, 2025 am 12:01 AM

MySQL and Oracle selection should be based on cost, performance, complexity and functional requirements: 1. MySQL is suitable for projects with limited budgets, is simple to install, and is suitable for small to medium-sized applications. 2. Oracle is suitable for large enterprises and performs excellently in handling large-scale data and high concurrent requests, but is costly and complex in configuration.

Oracle's Purpose: Business Solutions and Data ManagementOracle's Purpose: Business Solutions and Data ManagementApr 13, 2025 am 12:02 AM

Oracle helps businesses achieve digital transformation and data management through its products and services. 1) Oracle provides a comprehensive product portfolio, including database management systems, ERP and CRM systems, helping enterprises automate and optimize business processes. 2) Oracle's ERP systems such as E-BusinessSuite and FusionApplications realize end-to-end business process automation, improve efficiency and reduce costs, but have high implementation and maintenance costs. 3) OracleDatabase provides high concurrency and high availability data processing, but has high licensing costs. 4) Performance optimization and best practices include the rational use of indexing and partitioning technology, regular database maintenance and compliance with coding specifications.

How to delete oracle library failureHow to delete oracle library failureApr 12, 2025 am 06:21 AM

Steps to delete the failed database after Oracle failed to build a library: Use sys username to connect to the target instance. Use DROP DATABASE to delete the database. Query v$database to confirm that the database has been deleted.

How to create cursors in oracle loopHow to create cursors in oracle loopApr 12, 2025 am 06:18 AM

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

How to export oracle viewHow to export oracle viewApr 12, 2025 am 06:15 AM

Oracle views can be exported through the EXP utility: Log in to the Oracle database. Start the EXP utility, specifying the view name and export directory. Enter export parameters, including target mode, file format, and tablespace. Start exporting. Verify the export using the impdp utility.

How to stop oracle databaseHow to stop oracle databaseApr 12, 2025 am 06:12 AM

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.