dm8 datawatch配置

news/2024/10/30 23:28:07/

环境说明

操作系统

Kylin Linux Advanced Server V10(Sword)

达梦版本

DM8

配置说明

–2台服务器(主备机)
–1台服务器(监视器)

过程中错误说明

没有关闭防火墙,导致第一次配置失败。

端口规划

数据库名

实例名

PORT_NUM

MAL_INST_DW_PORT

MAL_HOST

MAL_PORT

MAL_DW_PORT

DM

DM_N1

5236

5240

192.168.10.41

5238

5239

DM

DM_N2

5236

5240

192.168.10.42

5238

5239

数据准备

主机初始化数据库:使用图形界面创建,root用户./dmservice.sh停止实例服务

[dmdba@localhost bin]$ ./dminit path=/dm8/data instance_name=DM_N1

注册服务需要自行总结

备机初始化数据库:使用图形界面创建,root用户./dmservice.sh停止实例服务

[dmdba@localhost bin]$ ./dminit path=/dm8/data instance_name=DM_N2 db_name=DM

实验时少了灰色部分造成数据库名不一致

主机做完全备份 

需要启动一次该实例,关闭

dmserver /dm8/data/DM/dm.ini

[dmdba@kslx2-01 DM]$ cd /dm8/bin

[dmdba@kslx2-01 bin]$ ./dmrman

dmrman V8

RMAN> backup database '/dm8/data/DM/dm.ini' backupset '/dm8/backupset'

backup database '/dm8/data/DM/dm.ini' backupset '/dm8/backupset'

file dm.key not found, use default license!

Database mode = 0, oguid = 0

Normal of FAST

Normal of DEFAULT

Normal of RECYCLE

Normal of KEEP

Normal of ROLL

EP[0]'s cur_lsn[52121], file_lsn[52121]

Processing backupset /dm8/backupset

[Percent:100.00%][Speed:0.00M/s][Cost:00:00:02][Remaining:00:00:00]                                 

backup successfully!

time used: 00:00:03.262

主机备份传输到备机:

[dmdba@kslx2-01 backupset]$ scp -r /dm8/backupset/ dmdba@192.168.100.42:/dm8

The authenticity of host '192.168.100.42 (192.168.100.42)' can't be established.

ECDSA key fingerprint is SHA256:EUZ0qItmgr+ze2wuovdoFZesMVbCbisFmyDqGg8437U.

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

Warning: Permanently added '192.168.100.42' (ECDSA) to the list of known hosts.

Authorized users only. All activities may be monitored and reported.

dmdba@192.168.100.42's password:

备机还原数据库:

[dmdba@kslx2-01 DM]$ cd /dm8/bin

[dmdba@kslx2-01 bin]$ ./dmrman

dmrman V8

RMAN> restore database '/dm8/data/DM/dm.ini' from backupset '/dm8/backupset'

restore database '/dm8/data/DM/dm.ini' from backupset '/dm8/backupset'

Normal of FAST

Normal of DEFAULT

Normal of RECYCLE

Normal of KEEP

Normal of ROLL

[Percent:100.00%][Speed:0.00M/s][Cost:00:00:02][Remaining:00:00:00]                                 

restore successfully.

time used: 00:00:02.456

备机恢复数据库:

RMAN> recover database '/dm8/data/DM/dm.ini' from backupset '/dm8/backupset'

recover database '/dm8/data/DM/dm.ini' update db_magic

Database mode = 0, oguid = 0

Normal of FAST

Normal of DEFAULT

Normal of RECYCLE

Normal of KEEP

Normal of ROLL

EP[0]'s cur_lsn[52121], file_lsn[52121]

recover successfully!

time used: 995.922(ms)

更新数据库的魔数:

RMAN> recover database '/dm8/data/DM/dm.ini' update db_magic

recover database '/dm8/data/DM/dm.ini' update db_magic

Database mode = 0, oguid = 0

Normal of FAST

Normal of DEFAULT

Normal of RECYCLE

Normal of KEEP

Normal of ROLL

EP[0]'s cur_lsn[52121], file_lsn[52121]

recover successfully!

time used: 994.933(ms)

主机配置

配置文件位置:

/dm8/data/DM

配置dm.ini:(需要查找修改)

INSTANCE_NAME = DM_N1 

PORT_NUM = 5236

DW_INACTIVE_INTERVAL = 60

ALTER_MODE_STATUS = 0

ENABLE_OFFLINE_TS = 2

MAL_INI = 1

ARCH_INI = 1

RLOG_SEND_APPLY_MON = 64

dmmal.ini配置

MAL_CHECK_INTERVAL = 5

MAL_CONN_FAIL_INTERVAL = 5

[MAL_INST1]

MAL_INST_NAME = DM_N1

MAL_HOST = 192.168.100.41

MAL_PORT = 5238

MAL_INST_HOST = 192.168.100.41

MAL_INST_PORT = 5236

MAL_DW_PORT = 5239

MAL_INST_DW_PORT = 5240

[MAL_INST2]

MAL_INST_NAME = DM_N2

MAL_HOST = 192.168.100.42

MAL_PORT = 5238

MAL_INST_HOST = 192.168.100.42

MAL_INST_PORT = 5236

MAL_DW_PORT = 5239

MAL_INST_DW_PORT = 5240

dmarch.ini配置:

[ARCHIVE_REALTIME]

ARCH_TYPE = REALTIME

ARCH_DEST = DM_N2

[ARCHIVE_LOCAL1]

ARCH_TYPE = LOCAL

ARCH_DEST = /dm8/arch

ARCH_FILE_SIZE = 128

ARCH_SPACE_LIMIT = 0

dmwatcher.ini配置:

[GRP1]

DW_TYPE = GLOBAL

DW_MODE = AUTO

DW_ERROR_TIME = 10

INST_RECOVER_TIME = 60

INST_ERROR_TIME = 10

INST_OGUID = 453331

INST_INI = /dm8/data/DM/dm.ini

INST_AUTO_RESTART = 1

INST_STARTUP_CMD = /dm8/bin/dmserver

RLOG_SEND_THRESHOLD = 0

RLOG_APPLY_THRESHOLD = 0

启动到配置模式:

[dmdba@kslx2-01 tool]$ cd /dm8/bin

[dmdba@kslx2-01 bin]$ ./dmserver /dm8/data/DM/dm.ini mount

SQL>SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 1);

设置OGUID:SQL>sp_set_oguid(453331);

主机模式打开:SQL>alter database primary;

SQL>SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 0);

备机配置

配置文件位置:

/dm8/data/DM

dm.ini配置:(需要查找修改)

INSTANCE_NAME = DM_N2 

PORT_NUM = 5236

DW_INACTIVE_INTERVAL = 60

ALTER_MODE_STATUS = 0

ENABLE_OFFLINE_TS = 2

MAL_INI = 1

ARCH_INI = 1

RLOG_SEND_APPLY_MON = 64

dmmal.ini配置

MAL_CHECK_INTERVAL = 5

MAL_CONN_FAIL_INTERVAL = 5

[MAL_INST1]

MAL_INST_NAME = DM_N1

MAL_HOST = 192.168.100.41

MAL_PORT = 5238

MAL_INST_HOST = 192.168.100.41

MAL_INST_PORT = 5236

MAL_DW_PORT = 5239

MAL_INST_DW_PORT = 5240

[MAL_INST2]

MAL_INST_NAME = DM_N2

MAL_HOST = 192.168.100.42

MAL_PORT = 5238

MAL_INST_HOST = 192.168.100.42

MAL_INST_PORT = 5236

MAL_DW_PORT = 5239

MAL_INST_DW_PORT = 5240

dmarch.ini配置:

[ARCHIVE_REALTIME]

ARCH_TYPE = REALTIME

ARCH_DEST = DM_N1

[ARCHIVE_LOCAL1]

ARCH_TYPE = LOCAL

ARCH_DEST = /dm8/arch

ARCH_FILE_SIZE = 128

ARCH_SPACE_LIMIT = 0

dmwatcher.ini配置:

[GRP1]

DW_TYPE = GLOBAL

DW_MODE = AUTO

DW_ERROR_TIME = 10

INST_RECOVER_TIME = 60

INST_ERROR_TIME = 10

INST_OGUID = 453331

INST_INI = /dm8/data/DM/dm.ini

INST_AUTO_RESTART = 1

INST_STARTUP_CMD = /dm8/bin/dmserver

RLOG_APPLY_THRESHOLD = 0

启动到配置模式:

[dmdba@kslx2-01 tool]$ cd /dm8/bin

[dmdba@kslx2-01 bin]$ ./dmserver /dm8/data/DM/dm.ini mount

SQL>SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 1);

设置OGUID:SQL>sp_set_oguid(453331);

备机模式打开:SQL>alter database standby;

SQL>SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 0);

启动数据守护进程

主机启动守护:

./dmwatcher  /dm8/data/DM/dmwatcher.ini/dm8/bin

备机启动守护:

/dm8/bin

./dmwatcher  /dm8/data/DM/dmwatcher.ini

监视器配置

dmmonitor.ini配置:

地址:

/dm8

内容:

MON_DW_CONFIRM = 1

MON_LOG_PATH = /dm8/log

MON_LOG_INTERVAL = 60

MON_LOG_FILE_SIZE = 32

MON_LOG_SPACE_LIMIT = 0

[GRP1]

MON_INST_OGUID = 453331

MON_DW_IP = 192.168.100.41:5239

MON_DW_IP = 192.168.100.42:5239

启动监视器

地址:

/dm8/bin

内容:

./dmmonitor /dm8/dmmonitor.ini

主备切换

监视器中执行

Login

登录用户sysdba密码Dameng123

switchover GRP1.DM_N2

实时主备集群重启有顺序要求:

1、 关闭监视器
2、 关闭主库守护进程
3、 关闭备库守护进程
4、 关闭主库实例
5、 关闭备库实例
6、 启动主库实例 (mount)
7、 启动备库实例 (mount)
8、 启动主库守护进程 (open)
9、 启动备库守护进程 (open)
10、 启动监视器


http://www.ppmy.cn/news/354529.html

相关文章

mt7682芯片处理器详细资料介绍

MTK MT7682S是基于一个高度集成的芯片组,包括一个微控制器单元(MCU)、一个低功耗的1x11n单波段Wi-Fi子系统和一个电源管理单元(PMU)。单片机是一个带有浮点单元的ARM Cortex-M4处理器,与1MB的闪存集成在一起。 Wi-Fi子系统包含802.11b/g/n无线电、基带和…

centos7使用mdadm搭建磁盘阵列

一、搭建 1、安装yum -y install mdadm 2、创建阵列 mdadm -Cv /dev/md5 -l 5 -n 2 /dev/sdb /dev/sdc /dev/sdd 或是 mdadm -Cv /dev/md5 --level5 --raid-devices3 /dev/sdb /dev/sdc /dev/sdd 参数详解: -C 创建阵列 -l 指定raid级别 5 -v 显示细节 -x, --s…

找回QQ密码

什么都没有的去qq 怎么找回密码 只有一个邮箱 在线等

教你看别人的QQ密码

教你看别人的 QQ密码: 随便点个好友,在QQ对话框中,输入"我是"两字,不要发送(记好不要发送) 再按住ALT键, 然后顺序按小键盘294.82,松开ALT键, 你将会发现。。。。。 转载于…

腾讯QQ修改密保手机

这两天修改QQ的密保手机,真是坑血。 我要修改的密保手机号码已经不用了,所以每次验证实名,以前的密码,绑定的邮箱,加过的好友(我都没有好友了,我都删了)。 每次这样验证都不行&…

简单的密码修改

废话不多说,直接看图:由上而下 第一步:点击编辑按钮,编辑按钮隐藏,文本框、取消按钮、提交按钮都显示如图二 图一 第二步:点击对号√在文本框内直接修改密码,修改完成,提交后如图三&…

腾讯qq对计算机进行更改,腾讯QQ电脑修改密码图文教程

如何在计算机上修改QQ密码?我相信有许多用户有腾讯QQ,虽然定期修改QQ密码可以帮助用户更好地保护他们的帐户安全,许多小伙界经常使用手机来修改QQ密码,然后今天Xiaobian拍了一场比赛,看看如何使用你的电脑修改&#xf…