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
MySQL vs. Oracle: Selecting the Right Database SystemMySQL vs. Oracle: Selecting the Right Database SystemMay 07, 2025 am 12:09 AM

MySQL and Oracle have significant differences in performance, cost and usage scenarios. 1) Performance: Oracle performs better in complex queries and high concurrency environments. 2) Cost: MySQL is open source, low cost, suitable for small and medium-sized projects; Oracle is commercialized, high cost, suitable for large enterprises. 3) Usage scenarios: MySQL is suitable for web applications and small and medium-sized enterprises, and Oracle is suitable for complex enterprise-level applications. When choosing, you need to weigh the specific needs.

Oracle Software: Maximizing Efficiency and PerformanceOracle Software: Maximizing Efficiency and PerformanceMay 06, 2025 am 12:07 AM

Oracle software can improve performance in a variety of ways. 1) Optimize SQL queries and reduce data transmission; 2) Appropriately manage indexes to balance query speed and maintenance costs; 3) Reasonably configure memory, optimize SGA and PGA; 4) Reduce I/O operations and use appropriate storage devices.

Oracle: Enterprise Software and Cloud ComputingOracle: Enterprise Software and Cloud ComputingMay 05, 2025 am 12:01 AM

Oracle is so important in the enterprise software and cloud computing sectors because of its comprehensive solutions and strong technical support. 1) Oracle provides a wide range of product lines from database management to ERP, 2) its cloud computing services such as OracleCloudPlatform and Infrastructure help enterprises achieve digital transformation, 3) Oracle database stability and performance and seamless integration of cloud services improve enterprise efficiency.

MySQL vs. Oracle: A Comparative Analysis of Database SystemsMySQL vs. Oracle: A Comparative Analysis of Database SystemsMay 04, 2025 am 12:13 AM

MySQL and Oracle have their own advantages and disadvantages, and comprehensive considerations should be taken into account when choosing: 1. MySQL is suitable for lightweight and easy-to-use needs, suitable for web applications and small and medium-sized enterprises; 2. Oracle is suitable for powerful functions and high reliability needs, suitable for large enterprises and complex business systems.

MySQL vs. Oracle: Understanding Licensing and CostMySQL vs. Oracle: Understanding Licensing and CostMay 03, 2025 am 12:19 AM

MySQL uses GPL and commercial licenses for small and open source projects; Oracle uses commercial licenses for enterprises that require high performance. MySQL's GPL license is free, and commercial licenses require payment; Oracle license fees are calculated based on processors or users, and the cost is relatively high.

Oracle: From Databases to Cloud ServicesOracle: From Databases to Cloud ServicesMay 02, 2025 am 12:05 AM

Oracle's evolution from database to cloud services demonstrates its strong technical strength and market insight. 1. Oracle originated in the 1970s and is famous for its relational database management system, and has launched innovative functions such as PL/SQL. 2. The core of Oracle database is relational model and SQL optimization, which supports multi-tenant architecture. 3. Oracle cloud services provide IaaS, PaaS and SaaS through OCI, and AutonomousDatabase performs well. 4. When using Oracle, you need to pay attention to the complex licensing model, performance optimization and data security issues in cloud migration.

Oracle and MySQL: Exploring Data Management ApproachesOracle and MySQL: Exploring Data Management ApproachesMay 01, 2025 am 12:13 AM

Oracle is suitable for enterprise-level applications that require high performance and complex queries, and MySQL is suitable for web applications that are rapidly developed and deployed. 1. Oracle supports complex transaction processing and high availability, suitable for financial and large ERP systems. 2.MySQL emphasizes ease of use and open source support, and is widely used in small and medium-sized enterprises and Internet projects.

MySQL vs. Oracle: A Look at the User ExperienceMySQL vs. Oracle: A Look at the User ExperienceApr 30, 2025 am 12:12 AM

The differences in user experience between MySQL and Oracle are mainly reflected in: 1. MySQL is simple and easy to use, suitable for quick access and high flexibility scenarios; 2. Oracle has powerful functions, suitable for scenarios that require enterprise-level support. MySQL's open source and free features attract startups and individual developers, while Oracle's complex features and tools meet the needs of large enterprises.

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

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),

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor