這篇文章主要介紹DM7如何使用裸設(shè)備搭建DMRAC,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
創(chuàng)新互聯(lián)公司服務(wù)項(xiàng)目包括撫順縣網(wǎng)站建設(shè)、撫順縣網(wǎng)站制作、撫順縣網(wǎng)頁(yè)制作以及撫順縣網(wǎng)絡(luò)營(yíng)銷(xiāo)策劃等。多年來(lái),我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,撫順縣網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到撫順縣省份的部分城市,未來(lái)相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!
一、操作環(huán)境
主機(jī) IP地址(對(duì)外服務(wù)) IP地址(內(nèi)部通信) 實(shí)例名 操作系統(tǒng)
dmrac1 10.18.13.165 10.10.10.165 rac0 Redhat 6.7 dmrac2 10.18.13.166 10.10.10.166 rac1 Redhat 6.7
共享存儲(chǔ)
/dev/sdb1 /dev/raw/raw1 dcr disk 2G /dev/sdb2 /dev/raw/raw2 voting disk 2G /dev/sdb3 /dev/raw/raw3 data disk1 2G /dev/sdb4 /dev/raw/raw4 data disk2 2G /dev/sdb1 /dev/raw/raw5 data disk3 2G /dev/sdb2 /dev/raw/raw6 data disk4 2G /dev/sdb3 /dev/raw/raw7 log disk1 2G /dev/sdb4 /dev/raw/raw8 log disk2 2G /dev/sdb1 /dev/raw/raw9 log disk3 2G /dev/sdb2 /dev/raw/raw10 log disk4 2G /dev/sdb3 /dev/raw/raw11 log disk5 2G /dev/sdb4 /dev/raw/raw12 log disk6 2G
二、操作系統(tǒng)配置
1、關(guān)閉防火墻和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、修改主機(jī)名
[root@cs ~]# hostname dm1 [root@cs ~]# sed -i s:^HOSTNAME=.*$:HOSTNAME=dm1:g /etc/sysconfig/network [root@cs ~]# hostname dm2 [root@cs ~]# sed -i s:^HOSTNAME=.*$:HOSTNAME=dm2:g /etc/sysconfig/network 3、修改hosts文件 [root@cs ~]# echo " > 10.18.13.165 dm1 > 10.18.13.166 dm2" >> /etc/hosts [root@cs ~]# [root@cs ~]# echo " > 10.18.13.165 dm1 > 10.18.13.166 dm2" >> /etc/hosts [root@cs ~]#
三、 安裝達(dá)夢(mèng)軟件
安裝操作詳見(jiàn)
Oracle Linux 7.1中安裝達(dá)夢(mèng)數(shù)據(jù)庫(kù)DM7
四、綁定UDEV
[root@dm1 rules.d]# vi 99-dm-devices.rules ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N" ACTION=="add", KERNEL=="sdb2", RUN+="/bin/raw /dev/raw/raw2 %N" ACTION=="add", KERNEL=="sdb3", RUN+="/bin/raw /dev/raw/raw3 %N" ACTION=="add", KERNEL=="sdb4", RUN+="/bin/raw /dev/raw/raw4 %N" ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw5 %N" ACTION=="add", KERNEL=="sdc2", RUN+="/bin/raw /dev/raw/raw6 %N" ACTION=="add", KERNEL=="sdc3", RUN+="/bin/raw /dev/raw/raw7 %N" ACTION=="add", KERNEL=="sdc4", RUN+="/bin/raw /dev/raw/raw8 %N" ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw9 %N" ACTION=="add", KERNEL=="sdd2", RUN+="/bin/raw /dev/raw/raw10 %N" ACTION=="add", KERNEL=="sdd3", RUN+="/bin/raw /dev/raw/raw11 %N" ACTION=="add", KERNEL=="sdd4", RUN+="/bin/raw /dev/raw/raw12 %N" ACTION=="add", KERNEL=="raw[1-12]", OWNER="dmdba", GROUP="dinstall", MODE="660" [root@dm1 rules.d]# start_udev Starting udev: [ OK ] [root@dm1 rules.d]# ls -lrt /dev/raw/ total 0 crw-rw---- 1 root disk 162, 0 May 7 16:28 rawctl crw-rw---- 1 dmdba dinstall 162, 9 May 7 16:28 raw9 crw-rw---- 1 dmdba dinstall 162, 12 May 7 16:28 raw12 crw-rw---- 1 dmdba dinstall 162, 11 May 7 16:28 raw11 crw-rw---- 1 dmdba dinstall 162, 10 May 7 16:28 raw10 crw-rw---- 1 dmdba dinstall 162, 6 May 7 16:28 raw6 crw-rw---- 1 dmdba dinstall 162, 1 May 7 16:28 raw1 crw-rw---- 1 dmdba dinstall 162, 7 May 7 16:28 raw7 crw-rw---- 1 dmdba dinstall 162, 8 May 7 16:28 raw8 crw-rw---- 1 dmdba dinstall 162, 5 May 7 16:28 raw5 crw-rw---- 1 dmdba dinstall 162, 2 May 7 16:28 raw2 crw-rw---- 1 dmdba dinstall 162, 3 May 7 16:28 raw3 crw-rw---- 1 dmdba dinstall 162, 4 May 7 16:28 raw4 [root@dm2 /]# cd /etc/udev/rules.d/ [root@dm2 rules.d]# vi 99-dm-devices.rules ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N" ACTION=="add", KERNEL=="sdb2", RUN+="/bin/raw /dev/raw/raw2 %N" ACTION=="add", KERNEL=="sdb3", RUN+="/bin/raw /dev/raw/raw3 %N" ACTION=="add", KERNEL=="sdb4", RUN+="/bin/raw /dev/raw/raw4 %N" ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw5 %N" ACTION=="add", KERNEL=="sdc2", RUN+="/bin/raw /dev/raw/raw6 %N" ACTION=="add", KERNEL=="sdc3", RUN+="/bin/raw /dev/raw/raw7 %N" ACTION=="add", KERNEL=="sdc4", RUN+="/bin/raw /dev/raw/raw8 %N" ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw9 %N" ACTION=="add", KERNEL=="sdd2", RUN+="/bin/raw /dev/raw/raw10 %N" ACTION=="add", KERNEL=="sdd3", RUN+="/bin/raw /dev/raw/raw11 %N" ACTION=="add", KERNEL=="sdd4", RUN+="/bin/raw /dev/raw/raw12 %N" ACTION=="add", KERNEL=="raw[1-12]", OWNER="dmdba", GROUP="dinstall", MODE="660" [root@dm2 rules.d]# start_udev Starting udev: [ OK ] [root@dm2 rules.d]# ls -lrt /dev/raw/ total 0 crw-rw---- 1 root disk 162, 0 May 7 16:28 rawctl crw-rw---- 1 dmdba dinstall 162, 9 May 7 16:28 raw9 crw-rw---- 1 dmdba dinstall 162, 12 May 7 16:28 raw12 crw-rw---- 1 dmdba dinstall 162, 11 May 7 16:28 raw11 crw-rw---- 1 dmdba dinstall 162, 10 May 7 16:28 raw10 crw-rw---- 1 dmdba dinstall 162, 6 May 7 16:28 raw6 crw-rw---- 1 dmdba dinstall 162, 1 May 7 16:28 raw1 crw-rw---- 1 dmdba dinstall 162, 7 May 7 16:28 raw7 crw-rw---- 1 dmdba dinstall 162, 8 May 7 16:28 raw8 crw-rw---- 1 dmdba dinstall 162, 5 May 7 16:28 raw5 crw-rw---- 1 dmdba dinstall 162, 2 May 7 16:28 raw2 crw-rw---- 1 dmdba dinstall 162, 3 May 7 16:28 raw3 crw-rw---- 1 dmdba dinstall 162, 4 May 7 16:28 raw4
可以通過(guò)blockdev --getsize64 /dev/raw/raw1命令查看裸設(shè)備大小
[root@dm1 rules.d]# blockdev --getsize64 /dev/raw/raw1 2154991104 [root@dm2 ~]# blockdev --getsize64 /dev/raw/raw1 2154991104
六、配置dmdcr_cfg.ini文件
在2個(gè)節(jié)點(diǎn)的/dm7/data目錄下創(chuàng)建配置文件dmdcr_cfg.ini,僅使用裸設(shè)備,不使用ASM文件系統(tǒng),不需要配置ASM信息,僅配置CSS/DB信息。在文件中添加如下內(nèi)容:
[dmdba@dm1 dm7]$ mkdir data [dmdba@dm1 dm7]$ cd data [dmdba@dm1 data]$ vi dmdcr_cfg.ini DCR_N_GRP = 2 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.165 DCR_EP_PORT = 9541 [GRP_CSS] DCR_EP_NAME = CSS1 DCR_EP_HOST = 10.10.10.166 DCR_EP_PORT = 9542 [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 [dmdba@dm2 dm7]$ mkdir data [dmdba@dm2 dm7]$ cd data [dmdba@dm2 data]$ vi dmdcr_cfg.ini DCR_N_GRP = 2 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.165 DCR_EP_PORT = 9541 [GRP_CSS] DCR_EP_NAME = CSS1 DCR_EP_HOST = 10.10.10.166 DCR_EP_PORT = 9542 [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 工具初始化(任意一節(jié)點(diǎn)執(zhí)行)
[dmdba@dm1 ~]$ 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: 1.459(ms). ASM>create votedisk '/dev/raw/raw2' 'vote' the ASM initialize votedisk /dev/raw/raw2 to name DMASMvote Used time: 1.380(ms). ASM>init dcrdisk '/dev/raw/raw1' from '/dm7/data/dmdcr_cfg.ini' syntax error asmcmd parse failed! 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: 271.543(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. Used time: 68.745(ms). ASM>init votedisk '/dev/raw/raw2' from '/dm7/data/dmdcr_cfg.ini' [Trace]DG 125 allocate 4 extents for file 0xfd000002. Used time: 33.488(ms).
八、操作系統(tǒng)配置準(zhǔn)備配置dminit.ini文件,存放在/dm7/data目錄中
system_path = /dm7/data db_name=rac main = /dev/raw/raw3 main_size = 128 roll = /dev/raw/raw4 roll_size = 128 system = /dev/raw/raw5 system_size = 128 ctl_path = /dev/raw/raw6 ctl_size = 8 dcr_path=/dev/raw/raw1 dcr_seqno=0 [rac0] config_path=/dm7/data/rac0_config port_num = 5236 mal_host = 10.10.10.165 mal_port = 9340 log_size = 256 log_path = /dev/raw/raw7 log_path = /dev/raw/raw8 [rac1] config_path=/dm7/data/rac1_config port_num = 5236 mal_host = 10.10.10.166 mal_port = 9341 log_size = 256 log_path = /dev/raw/raw9 log_path = /dev/raw/raw10
九、準(zhǔn)備dmdcr.ini 配置文件
dmdcr.ini 是 dmcss、dmasmsvr、dmasmtool 工具的輸入?yún)?shù)。記錄了當(dāng)前節(jié)點(diǎn)序列號(hào)以及 DCR 磁盤(pán)路徑。在2個(gè)節(jié)點(diǎn)的/dm/dmdbms/data目錄下創(chuàng)建dmdcr.ini 配置文件,dmdcr_path 相同,dmasvrmal.ini 文件內(nèi)容也相同,dmdcr_seqo 分別為 0 和 1。
節(jié)點(diǎn) 1:
[dmdba@dmrac1 data]$ vi dmdcr.ini DMDCR_PATH = /dev/raw/raw1 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
節(jié)點(diǎn)2:
[dmdba@dmrac2 data]$ vi dmdcr.ini DMDCR_PATH = /dev/raw/raw1 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
十、啟動(dòng)DMCSS 服務(wù)程序
1、注冊(cè) DMCSS服務(wù)
節(jié)點(diǎn)一:
[root@dm1 ~]# /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)
節(jié)點(diǎn)二:
[root@dm2 ~]# /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)
2、啟動(dòng)DMCSS 服務(wù)
節(jié)點(diǎn)一:
[root@dm1 ~]# service DmCSSServicerac1 start Starting DmCSSServicerac1: [ OK ]
節(jié)點(diǎn)二:
[root@dm2 ~]# service DmCSSServicerac2 start Starting DmCSSServicerac2: [ OK ]
十一、操作系統(tǒng)配置使用dminit初始化DB環(huán)境
在任意節(jié)點(diǎn)啟動(dòng) dminit 工具初始化數(shù)據(jù)庫(kù)。dminit 執(zhí)行完成后,會(huì)在 config_path 目錄(/dm7/data/rac0_config 和/dm7/data/rac1_config)下生成配置文件 dm.ini 和 dmmal.ini。
[dmdba@dm1 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 in 14 day(s) on 2020-05-21 log file path: /dev/raw/raw7 log file path: /dev/raw/raw8 log file path: /dev/raw/raw9 log file path: /dev/raw/raw10 FILE "/dev/raw/raw5" has already existed FILE "/dev/raw/raw4" has already existed FILE "/dev/raw/raw3" has already existed FILE "/dev/raw/raw6" has already existed FILE "/dev/raw/raw7" has already existed FILE "/dev/raw/raw8" has already existed FILE "/dev/raw/raw9" has already existed FILE "/dev/raw/raw10" has already existed File "/dev/raw/raw5" has already existed, whether overwrite(y/n, 1/0): y File "/dev/raw/raw4" has already existed, whether overwrite(y/n, 1/0): y File "/dev/raw/raw3" has already existed, whether overwrite(y/n, 1/0): y File "/dev/raw/raw6" has already existed, whether overwrite(y/n, 1/0): y File "/dev/raw/raw7" has already existed, whether overwrite(y/n, 1/0): y File "/dev/raw/raw8" has already existed, whether overwrite(y/n, 1/0): y File "/dev/raw/raw9" has already existed, whether overwrite(y/n, 1/0): y File "/dev/raw/raw10" has already existed, whether overwrite(y/n, 1/0): y write to dir [/dm7/data/rac]. create dm database success. 2020-05-07 16:41:52
將節(jié)點(diǎn)一的配置文件復(fù)制到節(jié)點(diǎn)二:
[dmdba@dm1 data]$ scp -r rac1_config 10.18.13.166:`pwd` The authenticity of host '10.18.13.166 (10.18.13.166)' 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.166' (RSA) to the list of known hosts. dmdba@10.18.13.166'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@dm1 data]$
一定要將節(jié)點(diǎn)一/dm7/data/目錄中生成的rac目錄復(fù)制到節(jié)點(diǎn)二的/dm7/data目錄中,否則在節(jié)點(diǎn)二中啟動(dòng)數(shù)據(jù)庫(kù)時(shí)會(huì)出現(xiàn)以下錯(cuò)誤,原因就是因?yàn)槭褂寐阍O(shè)備時(shí)生成的rac目錄及其文件不是存儲(chǔ)在共享存儲(chǔ)中可以讓集群節(jié)點(diǎn)都能訪問(wèn)。
Starting DmServicerac2: [ FAILED ] file dm.key not found, use default license! Read ini warning, default dm.ctl backup path [/dm7/data/rac/ctl_bak] does not exist. Read ini error, name:SYSTEM_PATH, value:/dm7/data/rac dmserver startup failed, code = -803 [Invalid ini config value]
將節(jié)點(diǎn)一/dm7/data/目錄中生成的rac目錄復(fù)制到節(jié)點(diǎn)二的/dm7/data目錄
[dmdba@dm1 data]$ scp -r rac 10.18.13.166:`pwd` dmdba@10.18.13.166's password: dm_20200507164149_942994.ctl 100% 6144 6.0KB/s 00:00 TEMP0.DBF 100% 10MB 10.0MB/s 00:00 dm_service.prikey 100% 633 0.6KB/s 00:00
十二、啟動(dòng)數(shù)據(jù)庫(kù)服務(wù)器
1、在2個(gè)節(jié)點(diǎn)分別注冊(cè)DM 數(shù)據(jù)庫(kù)服務(wù):
節(jié)點(diǎn)一:
[root@dm1 ~]# /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)
節(jié)點(diǎn)二:
[root@dm2 ~]# /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、啟動(dòng)數(shù)據(jù)庫(kù)
[root@dm1 ~]# service DmServicerac1 start Starting DmServicerac1: [ OK ] [root@dm2 ~]# service DmServicerac2 start Starting DmServicerac2: [ OK ]
手工啟動(dòng)命令如下,手工啟動(dòng)后窗口不能關(guān)閉,所以
./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
十三、操作系統(tǒng)配置連接數(shù)據(jù)庫(kù)驗(yàn)證
13.1配置服務(wù)名文件
[dmdba@dm1 data]$ vi /etc/dm_svc.conf rac=(10.18.13.165:5236,10.18.13.166:5236) SWITCH_TIME=(10000) SWITCH_INTERVAL=(10) TIME_ZONE=(480) LANGUAGE=(en) [dmdba@dm2 rac]$ vi /etc/dm_svc.conf TIME_ZONE=(480) rac=(10.18.13.165:5236,10.18.13.166:5236) SWITCH_TIME=(10000) SWITCH_INTERVAL=(10) TIME_ZONE=(480) LANGUAGE=(en)
13.2 連接RAC集群
節(jié)點(diǎn)一:
[dmdba@dm1 data]$ disql SYSDBA/SYSDBA@rac Server[10.18.13.166:5236]:mode is normal, state is open login used time: 9.596(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: 5.020(ms). Execute id is 2. SQL> select * from v$rac_ep_info; LINEID EP_NAME EP_SEQNO EP_GUID EP_TIMESTAMP EP_MODE EP_STATUS ---------- ------- ----------- -------------------- -------------------- ------- --------- 1 RAC0 0 2982624975 2982625916 MASTER OK 2 RAC1 1 2983098335 2983098713 SLAVE OK used time: 7.731(ms). Execute id is 3.
節(jié)點(diǎn)二:
SQL> select instance_name from v$instance; LINEID INSTANCE_NAME ---------- ------------- 1 RAC1 used time: 117.515(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 2982624975 2982632228 MASTER OK 2 RAC1 1 2983098335 2983105025 SLAVE OK used time: 4.439(ms). Execute id is 4.
13.3測(cè)試故障重連
[dmdba@dm2 rac]$ disql SYSDBA/SYSDBA@rac Server[10.18.13.166:5236]:mode is normal, state is open login used time: 6.728(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: 117.515(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 2982624975 2982632228 MASTER OK 2 RAC1 1 2983098335 2983105025 SLAVE OK used time: 4.439(ms). Execute id is 4.
#此時(shí)連接的rac1,我們kill 進(jìn)程:
[root@dm2 ~]# ps -ef | grep dm.ini dmdba 6231 1 0 17:25 pts/2 00:00:44 /dm7/bin/dmserver /dm7/data/rac1_config/dm.ini DCR_INI=/dm7/data/dmdcr.ini -noconsole root 10844 5237 0 19:20 pts/2 00:00:00 grep dm.ini [root@dm2 ~]# kill -9 6231
#在查詢,故障重連成功:
SQL> select instance_name from v$instance; [-70065]:Connection exception, switch the current connection sucessful. [-70065]:Connection exception, switch the current connection sucessful. Server[10.18.13.165:5236]:mode is normal, state is open SQL> select instance_name from v$instance; LINEID INSTANCE_NAME ---------- ------------- 1 RAC0 used time: 9.443(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 2982624975 2982632568 MASTER OK 2 RAC1 1 2983098335 2983105240 SLAVE ERROR used time: 3.184(ms). Execute id is 808.
可以看到連接的實(shí)例從rac1變?yōu)榱藃ac0
以上是“DM7如何使用裸設(shè)備搭建DMRAC”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!