如何判断oracle是否rac模式,即是否是集群
采样rac集群
[oracle@shdb02 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 16 11:56:36 2022 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> SELECT value FROM v$parameter where name = 'cluster_database'; VALUE -------------------------------------------------------------------------------- TRUE
SQL> select inst_id,instance_number,instance_name,host_name,status from gv$instance;
INST_ID INSTANCE_NUMBER INSTANCE_NAME HOST_NAME STATUS
2 2 hts2 shdb02 OPEN
1 1 hts1 shdb01 OPEN
SQL> show parameter cluster_database;
NAME TYPE VALUE
------------------------------------ ----------- --------
cluster_database boolean TRUE
cluster_database_instances integer 2
SQL> select * from v$option a where a.PARAMETER='Real Application Clusters';
PARAMETER VALUE
----------------------------------------------------------------
Real Application Clusters TRUE
采样单数据库架构
[root@oraclemachine ~]# su - oracle Last login: Tue Mar 15 23:37:30 CST 2022 on pts/0 oracle@prd:/home/oracle$echo $ORACLE_SID prod oracle@prod:/home/oracle$sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 16 11:21:55 2022 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SELECT value FROM v$parameter where name = 'cluster_database'; VALUE -------------------------------------------------------------------------------- FALSE
SQL> select inst_id,instance_number,instance_name,host_name,status from gv$instance;
INST_ID INSTANCE_NUMBER INSTANCE_NAME HOST_NAME STATUS
1 1 prod rac-12c-2 OPEN
SQL> show parameter cluster_database;
NAME TYPE VALUE
------------------------------
cluster_database boolean FALSE
cluster_database_instances integer 1
SQL> select * from v$option a where a.PARAMETER='Real Application Clusters';
PARAMETER VALUE
------------------------------------------------------------------
Real Application Clusters FALSE
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类