admin 管理员组文章数量: 1087135
2023年12月18日发(作者:windows创建oracle数据库)
1)、检查集群状态:
grid@rsadb1:/home/grid$ crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
2)、所有Oracle实例 —(数据库状态):
grid@rsadb1:/home/grid$ srvctl status database -d rsadb
Instance rsadb1 is running on node rsadb1
Instance rsadb2 is running on node rsadb2
3)、检查单个实例状态:
grid@rsadb1:/home/grid$ srvctl status instance -d rsadb -i rsadb1
Instance rsadb1 is running on node rsadb1
4)、节点应用程序状态:
grid@rsadb1:/home/grid$ srvctl status nodeapps
VIP rsadb1-vip is enabled
VIP rsadb1-vip is running on node: rsadb1
VIP rsadb2-vip is enabled
VIP rsadb2-vip is running on node: rsadb2
Network is enabled
Network is running on node: rsadb1
Network is running on node: rsadb2
GSD is disabled
GSD is not running on node: rsadb1
GSD is not running on node: rsadb2
ONS is enabled
ONS daemon is running on node: rsadb1
ONS daemon is running on node: rsadb2
5)、列出所有的配置数据库:
grid@rsadb1:/home/grid$ srvctl config database
Rsadb
6)、数据库配置:
grid@rsadb1:/home/grid$ srvctl config database -d rsadb -a
Database unique name: rsadb
Database name: rsadb
Oracle home: /oracle/app/oracle/product/11.2.0.3/db
Oracle user: oracle
Spfile: +DATA/rsadb/
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: rsadb
Database instances: rsadb1,rsadb2
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
7)、ASM状态以及ASM配置:
grid@rsadb1:/home/grid$ srvctl status asm
ASM is running on rsadb2,rsadb1
grid@rsadb1:/home/grid$ srvctl config asm -a
ASM home: /oracle/app/11.2.0/grid
ASM listener: LISTENER
ASM is enabled.
8)、TNS监听器状态以及配置:
grid@rsadb1:/home/grid$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rsadb2,rsadb1
grid@rsadb1:/home/grid$ srvctl config listener -a
Name: LISTENER
Network: 1, Owner: grid
Home:
/oracle/app/11.2.0/grid on node(s) rsadb2,rsadb1
End points: TCP:1521
9)、SCAN状态以及配置:
grid@rsadb1:/home/grid$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rsadb1
grid@rsadb1:/home/grid$ srvctl config scan
SCAN name: scan, Network: 1/65.0.8.0/255.255.255.0/en0
SCAN VIP name: scan1, IP: /scan/65.0.8.245
10)、VIP各个节点的状态以及配置:
grid@rsadb1:/home/grid$ srvctl status vip -n rsadb1
VIP rsadb1-vip is enabled
VIP rsadb1-vip is running on node: rsadb1
grid@rsadb1:/home/grid$ srvctl status vip -n rsadb2
VIP rsadb2-vip is enabled
VIP rsadb2-vip is running on node: rsadb2
grid@rsadb1:/home/grid$ srvctl config vip -n rsadb1
VIP exists: /rsadb1-vip/65.0.8.243/65.0.8.0/255.255.255.0/en0, hosting node rsadb1
grid@rsadb1:/home/grid$ srvctl config vip -n rsadb2
VIP exists: /rsadb2-vip/65.0.8.244/65.0.8.0/255.255.255.0/en0, hosting node rsadb2
11)、节点应用程序配置 —(VIP、GSD、ONS、监听器)
grid@rsadb1:/home/grid$ srvctl config nodeapps -a -g -s -l
Warning:-l option has been deprecated and will be ignored.
Network exists: 1/65.0.8.0/255.255.255.0/en0, type static
VIP exists: /rsadb1-vip/65.0.8.243/65.0.8.0/255.255.255.0/en0, hosting node rsadb1
VIP exists: /rsadb2-vip/65.0.8.244/65.0.8.0/255.255.255.0/en0, hosting node rsadb2
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
Name: LISTENER
Network: 1, Owner: grid
Home:
/oracle/app/11.2.0/grid on node(s) rsadb2,rsadb1
End points: TCP:1521
12)、验证所有集群节点间的时钟同步:
grid@rsadb1:/home/grid$ cluvfy comp clocksync -verbose
Verifying Clock Synchronization across the cluster nodes
Checking if Clusterware is installed on
Check of Clusterware install passed
Checking if CTSS Resource is running on
Check: CTSS Resource running on all nodes
Node Name Status
------------------------------------ ------------------------
rsadb1 passed
Result: CTSS resource check passed
Querying CTSS for time offset on
Result: Query of CTSS for time offset passed
Check CTSS
Check: CTSS state
Node Name State
------------------------------------ ------------------------
rsadb1 Observer
CTSS is in Observer state. Switching over to clock synchronization checks using NTP
Starting Clock synchronization checks using Network Time Protocol(NTP)...
NTP Configuration file
The NTP configuration file "/etc/" is available on all nodes
NTP Configuration file check passed
Checking
Check: Liveness for "xntpd"
Node Name Running?
------------------------------------ ------------------------
rsadb1 yes
Result: Liveness check passed for "xntpd"
Check for NTP daemon or service alive passed on all nodes
Checking NTP daemon command line for slewing option "-x"
Check: NTP daemon command line
Node Name Slewing Option Set?
------------------------------------ ------------------------
rsadb1 yes
Result:
NTP daemon slewing option check passed
Checking NTP daemon's boot time configuration, in file "/etc/", for slewing option "-x"
Check: NTP daemon's boot time configuration
Node Name Slewing Option Set?
------------------------------------ ------------------------
rsadb1 yes
Result:
NTP daemon's boot time configuration check for slewing option passed
Checking whether NTP daemon or service is using UDP port 123 on all nodes
Check for NTP daemon or service using UDP port 123
Node Name Port Open?
------------------------------------ ------------------------
rsadb1 yes
Result: Clock synchronization check using Network Time Protocol(NTP) passed
Oracle Cluster Time Synchronization Services check passed
Verification of Clock Synchronization across the cluster nodes was successful.
13)、集群中所有正在运行的实例 — (SQL):
SQL> SELECT inst_id , instance_number inst_no , instance_name inst_name , parallel , status ,database_status
db_status , active_state state , host_name host FROM gv$instance ORDER BY inst_id;
INST_ID INST_NO INST_NAME PARALLEL
---------- ---------- ------------------------------------------------ ---------
STATUS
------------------------------------
DB_STATUS STATE
--------------------------------------------------- ---------------------------
HOST
--------------------------------------------------------------------------------
1 1 rsadb1
OPEN
ACTIVE NORMAL
rsadb1
INST_ID INST_NO INST_NAME
---------- ---------- ------------------------------------------------ ---------
STATUS
------------------------------------
DB_STATUS STATE
--------------------------------------------------- ---------------------------
HOST
--------------------------------------------------------------------------------
2 2 rsadb2
OPEN
YES
PARALLEL
YES
ACTIVE NORMAL
rsadb2
14)、所有数据库文件及它们所在的 ASM 磁盘组 — (SQL):
15)、ASM 磁盘卷:
16)、启动和停止集群:
以下操作需用root用户执行。
(1)、在本地服务器上停止Oracle Clusterware 系统:
[root@rac01 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster
注:在运行―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 database -d racdb
[oracle@rac01 ~]#srvctl start database -d racdb
版权声明:本文标题:oracle11grac管理与测试 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/b/1702847858a433094.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论