DM7使用DMASM安装DMRAC

一.环境准备
主机 IP地址(对外服务) IP地址(内部通信) 实例名 操作系统
dmrac1 10.18.13.161 10.10.10.161 rac0 Redhat 6.7
dmrac2 10.18.13.162 10.10.10.162 rac1 Redhat 6.7

共享存储
/dev/sdb /dev/raw/raw1 dcr disk 2G
/dev/sdc /dev/raw/raw2 voting disk 2G
/dev/sdd /dev/raw/raw3 log disk 10G
/dev/sde /dev/raw/raw4 data disk1 10G
/dev/sdf /dev/raw/raw5 data disk2 10G

二、操作系统配置

1、关闭防火墙和SELINUX

[root@cs ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: nat mangle filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@cs ~]# chkconfig iptables off
[root@cs ~]# setenforce 0
[root@cs ~]# sed -i s:^SELINUX=.*$:SELINUX=disabled:g /etc/selinux/config

[root@cs ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: nat mangle filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@cs ~]# chkconfig iptables off
[root@cs ~]# setenforce 0
[root@cs ~]# sed -i s:^SELINUX=.*$:SELINUX=disabled:g /etc/selinux/config

2、修改主机名

[root@cs ~]# hostname dmrac1
[root@cs ~]# hostname dmrac2
[root@cs ~]# sed -i s:^HOSTNAME=.*$:HOSTNAME=dmrac1:g /etc/sysconfig/network
[root@cs ~]# sed -i s:^HOSTNAME=.*$:HOSTNAME=dmrac2:g /etc/sysconfig/network

3、修改hosts文件

[root@cs ~]# echo "
> 10.18.13.161 dmrac1
> 10.18.13.162 dmrac2" >> /etc/hosts

[root@cs ~]# echo "
> 10.18.13.161 dmrac1
> 10.18.13.162 dmrac2" >> /etc/hosts

三、 安装达梦软件
为了减少对操作系统的影响,用户不应该以root系统用户来安装和运行DM。用户可以在安装之前为DM创建一个专用的系统用户。具体操作详见Oracle Linux 7.1中安装达梦数据库DM7

四、绑定UDEV

[root@dmrac1 rules.d]# vi 99-dm-devices.rules
ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf", RUN+="/bin/raw /dev/raw/raw5 %N"


ACTION=="add", KERNEL=="raw[1-5]", OWNER="dmdba", GROUP="dinstall", MODE="660"
~
[root@dmrac1 rules.d]# start_udev
Starting udev: [ OK ]
[root@dmrac1 rules.d]# ls -lrt /dev/raw/
total 0
crw-rw----. 1 root disk 162, 0 Apr 24 14:08 rawctl
crw-rw----. 1 dmdba dinstall 162, 2 Apr 24 14:08 raw2
crw-rw----. 1 dmdba dinstall 162, 1 Apr 24 14:08 raw1
crw-rw----. 1 dmdba dinstall 162, 4 Apr 24 14:08 raw4
crw-rw----. 1 dmdba dinstall 162, 3 Apr 24 14:08 raw3
crw-rw----. 1 dmdba dinstall 162, 5 Apr 24 14:08 raw5


[root@dmrac2 rules.d]# vi 99-dm-devices.rules
ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf", RUN+="/bin/raw /dev/raw/raw5 %N"


ACTION=="add", KERNEL=="raw[1-5]", OWNER="dmdba", GROUP="dinstall", MODE="660"
~
[root@dmrac2 rules.d]# start_udev
Starting udev: [ OK ]
[root@dmrac2 rules.d]# ls -lrt /dev/raw/
total 0
crw-rw----. 1 root disk 162, 0 Apr 24 14:08 rawctl
crw-rw----. 1 dmdba dinstall 162, 2 Apr 24 14:08 raw2
crw-rw----. 1 dmdba dinstall 162, 1 Apr 24 14:08 raw1
crw-rw----. 1 dmdba dinstall 162, 4 Apr 24 14:08 raw4
crw-rw----. 1 dmdba dinstall 162, 3 Apr 24 14:08 raw3
crw-rw----. 1 dmdba dinstall 162, 5 Apr 24 14:08 raw5

可以通过blockdev –getsize64 /dev/raw/raw1命令查看裸设备大小

[root@dmrac1 rules.d]# blockdev --getsize64 /dev/raw/raw1
2147483648
[root@dmrac1 rules.d]# blockdev --getsize64 /dev/raw/raw2
2147483648
[root@dmrac1 rules.d]# blockdev --getsize64 /dev/raw/raw3
10737418240
[root@dmrac1 rules.d]# blockdev --getsize64 /dev/raw/raw4
10737418240
[root@dmrac1 rules.d]# blockdev --getsize64 /dev/raw/raw5
10737418240

[root@dmrac2 rules.d]# blockdev --getsize64 /dev/raw/raw1
2147483648
[root@dmrac2 rules.d]# blockdev --getsize64 /dev/raw/raw2
2147483648
[root@dmrac2 rules.d]# blockdev --getsize64 /dev/raw/raw3
10737418240
[root@dmrac2 rules.d]# blockdev --getsize64 /dev/raw/raw4
10737418240
[root@dmrac2 rules.d]# blockdev --getsize64 /dev/raw/raw5
10737418240

六、配置dmdcr_cfg.ini文件
在2个节点的/dm7/data目录下创建配置文件dmdcr_cfg.ini,在文件中添加如下内容:

[root@dmrac1 /]# su - dmdba
[dmdba@dmrac1 ~]$ mkdir /dm7/data
[dmdba@dmrac1 ~]$cd /dm7/data
[dmdba@dmrac1 data]$ cat dmdcr_cfg.ini
DCR_N_GRP = 3
DCR_VTD_PATH = /dev/raw/raw2
DCR_OGUID = 63635

[GRP]
DCR_GRP_TYPE = CSS
DCR_GRP_NAME = GRP_CSS
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_CSS]
DCR_EP_NAME = CSS0
DCR_EP_HOST = 10.10.10.161
DCR_EP_PORT = 9541
[GRP_CSS]
DCR_EP_NAME = CSS1
DCR_EP_HOST = 10.10.10.162
DCR_EP_PORT = 9542

[GRP]
DCR_GRP_TYPE = ASM
DCR_GRP_NAME = GRP_ASM
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_ASM]
DCR_EP_NAME = ASM0
DCR_EP_SHM_KEY = 93360
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.18.13.161
DCR_EP_PORT = 9641
DCR_EP_ASM_LOAD_PATH = /dev/raw
[GRP_ASM]
DCR_EP_NAME = ASM1
DCR_EP_SHM_KEY = 93361
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.18.13.162
DCR_EP_PORT = 9642
DCR_EP_ASM_LOAD_PATH = /dev/raw

[GRP]
DCR_GRP_TYPE = DB
DCR_GRP_NAME = GRP_RAC
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_RAC]
DCR_EP_NAME = RAC0
DCR_EP_SEQNO = 0
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 9741
[GRP_RAC]
DCR_EP_NAME = RAC1
DCR_EP_SEQNO = 1
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 9742


[root@dmrac2 /]# su - dmdba
[dmdba@dmrac2 ~]$ mkdir /dm7/data
[dmdba@dmrac2 ~]$cd /dm7/data
[dmdba@dmrac2 data]$ cat dmdcr_cfg.ini
DCR_N_GRP = 3
DCR_VTD_PATH = /dev/raw/raw2
DCR_OGUID = 63635

[GRP]
DCR_GRP_TYPE = CSS
DCR_GRP_NAME = GRP_CSS
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_CSS]
DCR_EP_NAME = CSS0
DCR_EP_HOST = 10.10.10.161
DCR_EP_PORT = 9541
[GRP_CSS]
DCR_EP_NAME = CSS1
DCR_EP_HOST = 10.10.10.162
DCR_EP_PORT = 9542

[GRP]
DCR_GRP_TYPE = ASM
DCR_GRP_NAME = GRP_ASM
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_ASM]
DCR_EP_NAME = ASM0
DCR_EP_SHM_KEY = 93360
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.18.13.161
DCR_EP_PORT = 9641
DCR_EP_ASM_LOAD_PATH = /dev/raw
[GRP_ASM]
DCR_EP_NAME = ASM1
DCR_EP_SHM_KEY = 93361
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.18.13.162
DCR_EP_PORT = 9642
DCR_EP_ASM_LOAD_PATH = /dev/raw

[GRP]
DCR_GRP_TYPE = DB
DCR_GRP_NAME = GRP_RAC
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_RAC]
DCR_EP_NAME = RAC0
DCR_EP_SEQNO = 0
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 9741
[GRP_RAC]
DCR_EP_NAME = RAC1
DCR_EP_SEQNO = 1
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 9742

七、使用 DMASMCMD 工具初始化(任意一节点执行)

[dmdba@dmrac1 data]$ dmasmcmd
DMASMCMD V7.1.6.46-Build(2018.02.08-89107)ENT
ASM>create dcrdisk '/dev/raw/raw1' 'dcr'
the ASM initialize dcrdisk /dev/raw/raw1 to name DMASMdcr
Used time: 9.322(ms).
ASM>create votedisk '/dev/raw/raw2' 'vote'
the ASM initialize votedisk /dev/raw/raw2 to name DMASMvote
Used time: 6.251(ms).
ASM>create asmdisk '/dev/raw/raw3' 'LOG0'
the ASM initialize asmdisk /dev/raw/raw3 to name DMASMLOG0
Used time: 8.825(ms).
ASM>create asmdisk '/dev/raw/raw4' 'DATA0'
the ASM initialize asmdisk /dev/raw/raw4 to name DMASMDATA0
Used time: 6.145(ms).
ASM>init dcrdisk '/dev/raw/raw1' from '/dm7/data/dmdcr_cfg.ini' identified by 'dameng123'
[Trace]DG 126 allocate 4 extents for file 0xfe000002.
Check dcr disk failed, please check and try again
Used time: 84.489(ms).提示检查dcr磁盘失败请再次执行
ASM>init dcrdisk '/dev/raw/raw1' from '/dm7/data/dmdcr_cfg.ini' identified by 'dameng123'
[Trace]DG 126 allocate 4 extents for file 0xfe000002.
Used time: 00:00:06.078.
ASM>init votedisk '/dev/raw/raw2' from '/dm7/data/dmdcr_cfg.ini'
[Trace]DG 125 allocate 4 extents for file 0xfd000002.
Used time: 36.305(ms).

八、准备DMASM 的 MAL 配置文件
在2个节点的/dm7/data目录下创建 DMASM 的 MAL 配置文件(命名为 dmasvrmal.ini),使用 DMASM 的所有节点都要配置,内容完全一样。

[dmdba@dmrac1 data]$ vi dmasvrmal.ini
[MAL_INST1]
MAL_INST_NAME = ASM0
MAL_HOST = 10.10.10.161
MAL_PORT = 7236

[MAL_INST2]
MAL_INST_NAME = ASM1
MAL_HOST = 10.10.10.162
MAL_PORT = 7237
[dmdba@dmrac2 data]$ vi dmasvrmal.ini
[MAL_INST1]
MAL_INST_NAME = ASM0
MAL_HOST = 10.10.10.161
MAL_PORT = 7236

[MAL_INST2]
MAL_INST_NAME = ASM1
MAL_HOST = 10.10.10.162
MAL_PORT = 7237
~

九、准备dmdcr.ini 配置文件
dmdcr.ini 是 dmcss、dmasmsvr、dmasmtool 工具的输入参数。记录了当前节点序列号以及 DCR 磁盘路径。
在2个节点的/dm/dmdbms/data目录下创建dmdcr.ini 配置文件,dmdcr_path 相同,dmasvrmal.ini 文件内容也相同,dmdcr_seqo 分别为 0 和 1。
节点 1:

[dmdba@dmrac1 data]$ vi dmdcr.ini
DMDCR_PATH = /dev/raw/raw1
DMDCR_MAL_PATH =/dm7/data/dmasvrmal.ini
DMDCR_SEQNO = 0

#ASM
DMDCR_ASM_RESTART_INTERVAL = 0
DMDCR_ASM_STARTUP_CMD = /dm7/bin/dmasmsvr dcr_ini=/dm7/data/dmdcr.ini

#DB
DMDCR_DB_RESTART_INTERVAL = 0
DMDCR_DB_STARTUP_CMD = /dm7/bin/dmserver path=/dm7/data/rac0_config/dm.ini dcr_ini=/dm7/data/dmdcr.ini

节点2:

[dmdba@dmrac2 data]$ vi dmdcr.ini
DMDCR_PATH = /dev/raw/raw1
DMDCR_MAL_PATH =/dm7/data/dmasvrmal.ini
DMDCR_SEQNO = 1

#ASM
DMDCR_ASM_RESTART_INTERVAL = 0
DMDCR_ASM_STARTUP_CMD = /dm7/bin/dmasmsvr dcr_ini=/dm7/data/dmdcr.ini

#DB
DMDCR_DB_RESTART_INTERVAL = 0
DMDCR_DB_STARTUP_CMD = /dm7/bin/dmserver path=/dm7/data/rac1_config/dm.ini dcr_ini=/dm7/data/dmdcr.ini

十、启动DMCSS、DMASM 服务程序
1、注册 DMCSS和DMASM服务
节点一:

[root@dmrac1 ~]# /dm7/script/root/dm_service_installer.sh -t dmcss -i /dm7/data/dmdcr.ini -p rac1
Move the service script file(/dm7/bin/DmCSSServicerac1 to /etc/rc.d/init.d/DmCSSServicerac1)
Finished to create the service (DmCSSServicerac1)
[root@dmrac1 ~]# /dm7/script/root/dm_service_installer.sh -t dmasmsvr -i /dm7/data/dmdcr.ini -p rac1
Move the service script file(/dm7/bin/DmASMSvrServicerac1 to /etc/rc.d/init.d/DmASMSvrServicerac1)
Finished to create the service (DmASMSvrServicerac1)
[root@dmrac1 ~]#

节点二:

[root@dmrac2 ~]# /dm7/script/root/dm_service_installer.sh -t dmcss -i /dm7/data/dmdcr.ini -p rac2
Move the service script file(/dm7/bin/DmCSSServicerac2 to /etc/rc.d/init.d/DmCSSServicerac2)
Finished to create the service (DmCSSServicerac2)
[root@dmrac2 ~]# /dm7/script/root/dm_service_installer.sh -t dmasmsvr -i /dm7/data/dmdcr.ini -p rac2
Move the service script file(/dm7/bin/DmASMSvrServicerac2 to /etc/rc.d/init.d/DmASMSvrServicerac2)
Finished to create the service (DmASMSvrServicerac2)

2、启动DMCSS和DMASM服务
节点一:

[root@dmrac1 init.d]# service DmCSSServicerac1 start
Starting DmCSSServicerac1: [ OK ]
[root@dmrac1 init.d]# service DmASMSvrServicerac1 start
Starting DmASMSvrServicerac1: [ OK ]

节点二:

[root@dmrac2 init.d]# service DmCSSServicerac2 start
Starting DmCSSServicerac2: [ OK ]
[root@dmrac2 init.d]# service DmASMSvrServicerac2 start
Starting DmASMSvrServicerac2: [ OK ]

十一、创建DMASM磁盘组
在任意节点使用 dmasmtool 工具创建 DMASM 磁盘组。

[dmdba@dmrac1 ~]$ dmasmtool DCR_INI=/dm7/data/dmdcr.ini
DMASMTOOL V7.1.6.46-Build(2018.02.08-89107)ENT
ASM>create diskgroup 'DMLOG' asmdisk '/dev/raw/raw3'
Used time: 00:00:06.363.
ASM>create diskgroup 'DMDATA' asmdisk '/dev/raw/raw4'
Used time: 00:00:06.504.

十二、准备dminit.ini 配置文件
在2个节点的/dm/dmdbms/data目录下创建 dminit.ini 配置文件,添加如下内容。 在2个节点都创建。

[dmdba@dmrac1 data]$ vi dminit.ini
db_name = rac
system_path = +DMDATA/data
system = +DMDATA/data/rac/system.dbf
system_size = 128
roll = +DMDATA/data/rac/roll.dbf
roll_size = 128
main = +DMDATA/data/rac/main.dbf
main_size = 128
ctl_path = +DMDATA/data/rac/dm.ctl
ctl_size = 8
log_size = 256
dcr_path = /dev/raw/raw1 #dcr 磁盘路径,目前不支持 asm,只能是裸设备
dcr_seqno = 0
auto_overwrite = 1

[RAC0] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm7/data/rac0_config
port_num = 5236
mal_host = 10.10.10.161
mal_port = 9340
log_path = +DMLOG/log/rac0_log01.log
log_path = +DMLOG/log/rac0_log02.log

[RAC1] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm7/data/rac1_config
port_num = 5236
mal_host = 10.10.10.162
mal_port = 9341
log_path = +DMLOG/log/rac1_log01.log
log_path = +DMLOG/log/rac1_log02.log


[dmdba@dmrac2 data]$ vi dminit.ini
db_name = rac
system_path = +DMDATA/data
system = +DMDATA/data/rac/system.dbf
system_size = 128
roll = +DMDATA/data/rac/roll.dbf
roll_size = 128
main = +DMDATA/data/rac/main.dbf
main_size = 128
ctl_path = +DMDATA/data/rac/dm.ctl
ctl_size = 8
log_size = 256
dcr_path = /dev/raw/raw1 #dcr 磁盘路径,目前不支持 asm,只能是裸设备
dcr_seqno = 0
auto_overwrite = 1

[RAC0] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm7/data/rac0_config
port_num = 5236
mal_host = 10.10.10.161
mal_port = 9340
log_path = +DMLOG/log/rac0_log01.log
log_path = +DMLOG/log/rac0_log02.log

[RAC1] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm7/data/rac1_config
port_num = 5236
mal_host = 10.10.10.162
mal_port = 9341
log_path = +DMLOG/log/rac1_log01.log
log_path = +DMLOG/log/rac1_log02.log

十三、使用dminit初始化数据库
在任意节点启动 dminit 工具初始化数据库。dminit 执行完成后,会在 config_path 目录(/dm7/data/rac0_config 和/dm7/data/rac1_config)下生成配置文件 dm.ini 和 dmmal.ini。

[dmdba@dmrac1 data]$ dminit control=/dm7/data/dminit.ini
initdb V7.1.6.46-Build(2018.02.08-89107)ENT
db version: 0x7000a
file dm.key not found, use default license!
License will expire on 2020-05-08

log file path: +DMLOG/log/rac0_log01.log


log file path: +DMLOG/log/rac0_log02.log


log file path: +DMLOG/log/rac1_log01.log


log file path: +DMLOG/log/rac1_log02.log

write to dir [+DMDATA/data/rac].
create dm database success. 2020-04-24 16:39:03

将节点一的配置文件复制到节点二:

[dmdba@dmrac1 data]$ scp -r rac1_config 10.18.13.162:`pwd`
The authenticity of host '10.18.13.162 (10.18.13.162)' can't be established.
RSA key fingerprint is 89:fc:3e:e3:2d:27:94:07:0e:6b:fc:c5:e8:89:44:1f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.18.13.162' (RSA) to the list of known hosts.
dmdba@10.18.13.162's password:
sqllog.ini 100% 479 0.5KB/s 00:00
dm.ini 100% 40KB 39.8KB/s 00:00
dmmal.ini 100% 204 0.2KB/s 00:00
[dmdba@dmrac1 data]$

十四、启动数据库服务器
1、在2个节点分别注册DM 数据库服务:
节点一:

[root@dmrac1 init.d]# /dm7/script/root/dm_service_installer.sh -t dmserver -i /dm7/data/rac0_config/dm.ini -d /dm7/data/dmdcr.ini -p rac1
Move the service script file(/dm7/bin/DmServicerac1 to /etc/rc.d/init.d/DmServicerac1)
Finished to create the service (DmServicerac1)

节点二:

[root@dmrac2 ~]# /dm7/script/root/dm_service_installer.sh -t dmserver -i /dm7/data/rac1_config/dm.ini -d /dm7/data/dmdcr.ini -p rac2
Move the service script file(/dm7/bin/DmServicerac2 to /etc/rc.d/init.d/DmServicerac2)
Finished to create the service (DmServicerac2)

2、启动数据库

[root@dmrac1 init.d]# service DmServicerac1 start
Starting DmServicerac1: [ OK ]

[root@dmrac2 ~]# service DmServicerac2 start
Starting DmServicerac2: [ OK ]

手工启动命令如下,手工启动后窗口不能关闭,所以

./dmserver /dm7/data/rac0_config/dm.ini dcr_ini=/dm7/data/dmdcr.ini
./dmserver /dm7/data/rac1_config/dm.ini dcr_ini=/dm7/data/dmdcr.ini

15 连接数据库验证
15.1 配置服务名文件

[dmdba@dmrac1 ~]$ vi /etc/dm_svc.conf
TIME_ZONE=(480)
rac=(10.18.13.161:5236,10.18.13.162:5236)
SWITCH_TIME=(10000)
SWITCH_INTERVAL=(10)

TIME_ZONE=(480)
LANGUAGE=(en)

[dmdba@dmrac2 ~]$ vi /etc/dm_svc.conf
TIME_ZONE=(480)
rac=(10.18.13.161:5236,10.18.13.162:5236)
SWITCH_TIME=(10000)
SWITCH_INTERVAL=(10)

TIME_ZONE=(480)
LANGUAGE=(en)

15.2 连接RAC集群
节点一:

[dmdba@dmrac1 ~]$ disql SYSDBA/SYSDBA@rac

Server[10.18.13.161:5236]:mode is normal, state is open
login used time: 10.365(ms)
disql V7.1.6.46-Build(2018.02.08-89107)ENT
Connected to: DM 7.1.6.46
SQL> select instance_name from v$instance;

LINEID INSTANCE_NAME
———- ————-
1 RAC0

used time: 18.248(ms). Execute id is 807.
SQL> select * from v$rac_ep_info;

LINEID EP_NAME EP_SEQNO EP_GUID EP_TIMESTAMP EP_MODE EP_STATUS
———- ——- ———– ——————– ——————– ——- ———
1 RAC0 0 2067076818 2067077298 MASTER OK
2 RAC1 1 2067098084 2067098537 SLAVE OK

used time: 2.741(ms). Execute id is 808.

节点二:

[dmdba@dmrac2 ~]$ disql SYSDBA/SYSDBA@rac

Server[10.18.13.162:5236]:mode is normal, state is open
login used time: 16.835(ms)
disql V7.1.6.46-Build(2018.02.08-89107)ENT
Connected to: DM 7.1.6.46
SQL> select instance_name from v$instance;

LINEID INSTANCE_NAME
---------- -------------
1 RAC1

used time: 106.703(ms). Execute id is 1.
SQL> select * from v$rac_ep_info;

LINEID EP_NAME EP_SEQNO EP_GUID EP_TIMESTAMP EP_MODE EP_STATUS
---------- ------- ----------- -------------------- -------------------- ------- ---------
1 RAC0 0 2067076818 2067077305 MASTER OK
2 RAC1 1 2067098084 2067098544 SLAVE OK

used time: 7.358(ms). Execute id is 2.

发表评论

电子邮件地址不会被公开。