oracle11g RAC 启动和停止操作说明

更新时间:2023-05-20 23:14:09 阅读: 评论:0

(ORACLE)查看集群中的数据库运行状态,最后接着是RAC名,不是实例的名称。
srvctl status databa -d tax
oracle@svrtrpc001:~> srvctl status databa -d tax
Instance tax1 is running on node svrtrpc001
Instance tax2 is running on node svrtrpc002
Instance tax3 is running on node svrtrpc003
-----------------------------------------------------
(ORACLE)查看数据库的运行状态,最后接着是RAC名,不是实例的名称。
srvctl status databa -d tax -v
oracle@svrtrpc001:~> srvctl status databa -d tax -v
Instance tax1 is running on node svrtrpc001. Instance status: Open.
Instance tax2 is running on node svrtrpc002. Instance status: Open.
Instance tax3 is running on node svrtrpc003. Instance status: Open.
-----------------------------------------
(ORACLE)查看实例运行状态,最后接着节点名
srvctl status instance -d tax -i tax1
oracle@svrtrpc001:~> srvctl status instance -d tax -i tax1
Instance tax1 is running on node svrtrpc001
---------------------------------------------------
(ORACLE)查看集群的配置情况
srvctl config -p tax -n tax
oracle@svrtrpc001:~> srvctl config -p tax -n tax
Databa unique name: tax
Databa name: tax
Oracle home: /u01/app/oracle/product/11.2.0
Oracle ur: oracle
Spfile: +DATADG/a
Domain:
Start options: openperl脚本
Stop options: immediate
Databa role: PRIMARY
Management policy: AUTOMATIC
Server pools: tax
Databa instances: tax1,tax2,tax3
Disk Groups: DATADG
Mount point paths:
Services:
Type: RAC
Databa is administrator managed
-----------------------------------------------
启动
2.3 srvctl start
I think maybe it's one of the most frequently ud commands as well as 'srvctl stop'.
Available options: databa|instance|rvice|nodeapps|asm
# Start databa
srvctl start databa -d orcl -o nomount
srvctl start databa -d orcl -o mount
srvctl start databa -d orcl -o open
# Grammar for start instance
srvctl start instance -d [db_name] -i [instance_name]
-o [start_option] -c [connect_str] -q
# Start all instances on the all nodes
srvctl start instance -d orcl -i orcl1,orcl2,...
# Start ASM instance
srvctl start ASM -n [node_name] -i asm1 -o open
# Start all apps in one node
srvctl start nodeapps -n [node_name]
# New: srvctl can manage listener's startup in DB 10.2
srvctl start listener -n <node_name>
-------------------------------------------------
闪电的直径关闭
2.4 srvctl stop
I think maybe it's also one of the most frequently ud
commands as well as 'srvctl start'.
Available options: databa|instance|rvice|nodeapps|asm
# Stop databa
srvctl stop databa -d orcl -o normal
srvctl stop databa -d orcl -o immediate
srvctl stop databa -d orcl -o abort
# Grammar for start instance
srvctl stop instance -d [db_name] -i [instance_name]
-o [start_option] -c
--------------------------
1、检查集群状态:
[grid@rac02 ~]$ crsctl chec
k cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online黄豆芽生长过程
CRS-4533: Event Manager is online
2、所有 Oracle 实例 —(数据库状态):
[grid@rac02 ~]$ srvctl status databa -d racdb
Instance racdb1 is running on node rac01
Instance racdb2 is running on node rac02
3、检查单个实例状态:
[grid@rac02 ~]$ srvctl status instance -d racdb -i racdb1
Instance racdb1 is running on node rac01
4、节点应用程序状态:
[grid@rac02 ~]$  srvctl status nodeapps
VIP rac01-vip is enabled
VIP rac01-vip is running on node: rac01
VIP rac02-vip is enabled
VIP rac02-vip is running on node: rac02
Network is enabled
Network is running on node: rac01
Network is running on node: rac02
GSD is disabled
GSD is not running on node: rac01
GSD is not running on node: rac02
ONS is enabled
ONS daemon is running on node: rac01
ONS daemon is running on node: rac02
eONS is enabled
eONS daemon is running on node: rac01
eONS daemon is running on node: rac02
5、列出所有的配置数据库:
[grid@rac02 ~]$ srvctl config databa
racdb
6、数据库配置:
[grid@rac02 ~]$ srvctl config databa -d racdb -a
Databa unique name: racdb
Databa name: racdb
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle ur: oracle
Spfile: +RACDB_DATA/a
Domain:
Start options: open
Stop options: immediate
Databa role: PRIMARY
Management policy: AUTOMATIC英文求职信格式
Server pools: racdb
Databa instances: racdb1,racdb2
放高球
Disk Groups: RACDB_DATA,FRA
Services:
Databa is enabled
Databa is administrator managed
7、ASM状态以及ASM配置:
[grid@rac02 ~]$ srvctl status asm
ASM is running on rac01,rac02
[grid@rac02 ~]$ srvctl config asm -a
ASM home: /u01/app/11.2.0/grid
ASM listener: LISTENER
ASM is enabled.
8、TNS监听器状态以及配置:
[grid@rac02 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac01,rac02
羊肉火锅怎么做[grid@rac02 ~]$ srvctl config listener -a
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
/u01/app/11.2.0/grid on node(s) rac02,rac01
End points: TCP:1521
9、SCAN状态以及配置:
[grid@rac02 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac02
[grid@rac02 ~]$ srvctl config scan
SCAN name: , Network: 1/192.168.1.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: //192.168.1.55
10、VIP各个节点的状态以及配置:
[grid@rac02 ~]$ srvctl status vip -n rac01
VIP rac01-vip is enabled
VIP rac01-vip is running on node: rac01
[grid@rac02 ~]$ srvctl status vip -n rac02
VIP rac02-vip is enabled
VIP rac02-vip is running on node: rac02
[grid@rac02 ~]$  srvctl config vip -n rac01
VIP exists.:rac01
VIP exists.: /rac01-vip/192.168.1.53/255.255.255.0/eth0
[grid@rac02 ~]$  srvctl config vip -n rac02
VIP exists.:rac02
VIP exists.: /rac02-vip/192.168.1.54/255.25
5.255.0/eth0
11、节点应用程序配置 —(VIP、GSD、ONS、监听器)
[grid@rac02 ~]$ srvctl config nodeapps -a -g -s -l
-
l option has been deprecated and will be ignored.
VIP exists.:rac01
VIP exists.: /rac01-vip/192.168.1.53/255.255.255.0/eth0
VIP exists.:rac02
VIP exists.: /rac02-vip/192.168.1.54/255.255.255.0/eth0
GSD exists.
ONS daemon exists. Local port 6100, remote port 6200
Name: LISTENER
Network: 1, Owner: grid
Home: <CRS home>
/u01/app/11.2.0/grid on node(s) rac02,rac01
End points: TCP:1521
12、验证所有集群节点间的时钟同步:
[grid@rac02 ~]$ cluvfy comp clocksync -verbo
Verifying Clock Synchronization across the cluster nodes
Checking if Clusterware is installed on
Check of Clusterware install pasd
Checking if CTSS Resource is running on
Check: CTSS Resource running on all nodes
Node Name                            Status                 
------------------------------------  ------------------------
rac02                                pasd                 
Result: CTSS resource check pasd
Querying CTSS for time offt on
Result: Query of CTSS for time offt pasd
Check CTSS
Check: CTSS state
Node Name                            State                 
------------------------------------  ------------------------
rac02                                Active                 
CTSS is in Active state. Proceeding with check of clock time offts on
Reference Time Offt Limit: 1000.0 mcs
Check: Reference Time Offt
Node Name    Time Offt              Status                 
------------  ------------------------  ------------------------
rac02        0.0                      pasd                 
Time offt is within the specified limits on the following t of nodes:
"[rac02]"
Result: Check of clock time offts pasd
Oracle Cluster Time Synchronization Services check pasd
Verification of Clock Synchronization across the cluster nodes was successful.
13、集群中所有正在运行的实例 — (SQL):
SELECT inst_id , instance_number inst_no , instance_name inst_name , parallel , status , databa_status db_status , active_state state , host_name host FROM gv$instance ORDER BY inst_id;
14、所有数据库文件及它们所在的 ASM 磁盘组 — (SQL):
15、ASM 磁盘卷:
16、启动和停止集群:
以下操作需用root用户执行。
(1)、在本地服务器上停止Oracle Clusterware 系统:
[root@rac01 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster
CRS-2673: Attempting to stop 'sd' on 'rac01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac01'
CRS-2673: Attempting to stop 'ora.CRS.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.racdb.db' on 'rac01'
CRS-2673: Attempting to stop 'istry.acfs' on 'rac01'
CR
S-2677: Stop of 'ora.LISTENER.lsnr' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.rac01.vip' on 'rac01'
CRS-2677: Stop of 'ora.rac01.vip' on 'rac01' succeeded
CRS-2672: Attempting to start 'ora.rac01.vip' on 'rac02'
CRS-2677: Stop of 'istry.acfs' on 'rac01' succeeded
CRS-2676: Start of 'ora.rac01.vip' on 'rac02' succeeded
CRS-2677: Stop of 'ora.CRS.dg' on 'rac01' succeeded
CRS-2677: Stop of 'ora.racdb.db' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'rac01'
CRS-2673: Attempting to stop 'ora.RACDB_DATA.dg' on 'rac01'
CRS-2677: Stop of 'ora.FRA.dg' on 'rac01' succeeded
CRS-2677: Stop of 'ora.RACDB_DATA.dg' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac01'
CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded
CRS-2673: Attempting to stop 's' on 'rac01'
CRS-2673: Attempting to stop 's' on 'rac01'
CRS-2677: Stop of 's' on 'rac01' succeeded
CRS-2673: Attempting to stop 'work' on 'rac01'
CRS-2677: Stop of 'work' on 'rac01' succeeded
CRS-2677: Stop of 's' on 'rac01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac01' has completed
CRS-2677: Stop of 'sd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac01'
CRS-2673: Attempting to stop 'ssd' on 'rac01'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac01'
CRS-2673: Attempting to stop 'ora.asm' on 'rac01'
CRS-2677: Stop of 'ora.cssdmonitor' on 'rac01' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac01' succeeded
CRS-2677: Stop of 'ssd' on 'rac01' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac01'
CRS-2677: Stop of 'ora.cssd' on 'rac01' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'rac01'
CRS-2677: Stop of 'ora.diskmon' on 'rac01' succeeded
注:在运行“crsctl stop cluster”命令之后,如果 Oracle Clusterware 管理的资源中有任何一个还在运行,则整个命令失败。使用 -f 选项无条件地停止所有资源并停止 Oracle Clusterware 系统。
另请注意,可通过指定 -all 选项在集群中所有服务器上停止 Oracle Clusterware 系统。如下所示,在rac01和rac02上停止oracle clusterware系统:
[root@rac02 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster –all
在本地服务器上启动oralce clusterware系统:
[root@rac01 ~]# /u01/app/11.2.0/grid/bin/crsctl start cluster
注:可通过指定 -all 选项在集群中所有服务器上启动 Oracle Clusterware 系统。
[root@rac02 ~]# /u01/app/11.2.0/grid/bin/crsctl start cluster –all
还可以通过列出服务器(各服务器之间以空格分隔)在集群中一个或多个指定的服务器上启动 Oracle Clusterware 系统:
[root@rac01 ~]# /u01/app/11.2.0/grid/bin/crsctl start cluster -n rac01 rac02
使用 SRVCTL 启动/停止所有实例:
[oracle@rac01 ~]#srvctl stop databa -d racdb
[oracle@rac01 ~]#
srvctl start databa -d racdb
安装的后置任务:
1.官方建议的两个安装后置任务
(1) 备份 root.sh 脚本
官方建议在完成安装后要备份root.sh脚本文件。如果在Oracle Home目录中又安装其它的产品,安装时OUI会升级已存在的root.sh文件。如果需要root.sh内的原始信息,就可以在备份中找到。
cd $ORACLE_HOME;cp root.sh root.sh.bak
(2)重新编译无效对象
运行 utlrp.sql 脚本立即重新编译所有无效的 PL/SQL 程序包,而不是在首次访问它们时再重新编译。这是个可选步骤,但建议您选择该步骤。
[oracle@racnode1 ~]$ sqlplus / as sysdba
SQL> @?/rdbms/admin/utlrp.sql2.
在 RAC 环境中启用存档日志
(1)、以 oracle 用户身份登录到一个节点(即 racnode1),通过在当前实例中将 cluster_databa 设置为 FALSE 来禁用集群实例参数:
[oracle@rac01 ~]$ sqlplus / as sysdba
SQL> alter system t cluster_databa=fal scope=spfile sid='racdb1';
System altered.
(2)、以 oracle 用户身份关闭所有 访问集群化数据库的实例:
[oracle@rac01 ~]$ srvctl stop databa -d racdb
(3)、使用本地实例,挂载数据库:
[oracle@rac01 ~]$ sqlplus / as sysdba
SQL*Plus: Relea 11.2.0.1.0 Production on Sat Nov 21 19:26:47 2009 Copyright (c) 1982, 2009, Oracle. All rights rerved. Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2213896 bytes
Variable Size 1073743864 bytes
Databa Buffers 570425344 bytes
Redo Buffers 7135232 bytes
(4)、启用存档功能:
SQL> alter databa archivelog;
Databa altered.
(5)、通过在当前实例中将实例参数 cluster_databa 修改为 TRUE,重新启用对集群的支持:
SQL> alter system t cluster_databa=true scope=spfile sid='racdb1';
System altered.
(6)、关闭本地实例:
SQL> shutdown immediate
ORA-01109: databa not open
Databa dismounted.
ORACLE instance shut down.
(7)、以 oracle 帐户身份使用 srvctl 命令重启所有实例:
[oracle@rac01 ~]$ srvctl start databa -d racdb
(8)、登录到本地实例,验证存档日志模式已启用:
[oracle@rac01 ~]$ sqlplus / as sysdba
SQL*Plus: Relea 11.2.0.1.0 Production on Sat Nov 21 19:33:38 2009 Copyright (c) 1982, 2009, Oracle. All rights rerved. Connected to: Oracle Databa 11g Enterpri Edition Relea 11.2.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SQL> archive log list
Databa log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log quence 69
Next log quence to archive 70
Current log quence 703
在两个RAC节点都备份spfile初始化参数文件:创建一个备份目录:
[oracle@rac02 ~]$ mkdir $ORACLE_HO
ME/spfile_bak
[oracle@rac02 ~]$ sqlplus “/as sysdba”抱怨英文
==============================================
成人论理crsctl说明
crsctl add resource
crsctl add type
crsctl check css
crsctl delete resource
crsctl delete type
crsctl get hostname
crsctl getperm resource
crsctl getperm type
crsctl modify resource
crsctl modify type
crsctl tperm resource
crsctl tperm type
crsctl start resource
crsctl status resource
crsctl status type
crsctl stop resource
集群启动和停止
./crsctl stop cluster
./crsctl start cluster
./crsctl check crs

本文发布于:2023-05-20 23:14:09,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/712815.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:实例   集群   安装   状态   数据库   停止
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图