注册
达梦dcp搭建数据守护总结
专栏/培训园地/ 文章详情 /

达梦dcp搭建数据守护总结

路漫漫 2024/04/10 849 0 0
摘要

1、主库备份数据库
[dmdba@dameng dm8]$ cd bin
[dmdba@dameng dm8]$ mkdir -p /dm8/backup/fullbak
[dmdba@dameng bin]$ ./dmrman
dmrman V8
RMAN> backup database '/dm8/data/DAMENG/dm.ini' backupset '/dm8/backup/fullbak';
backup database '/dm8/data/DAMENG/dm.ini' backupset '/dm8/backup/fullbak';
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[263761], file_lsn[263761]
Processing backupset /dm8/backup/fullbak
[Percent:100.00%][Speed:0.00M/s][Cost:00:00:09][Remaining:00:00:00]
backup successfully!
time used: 00:00:12.931
RMAN>
2、修改主库参数
/dm8/data/DAMENG/dm.ini 五个地方
INSTANCE_NAME = DM01
ALTER_MODE_STATUS = 0
ENABLE_OFFLINE_TS = 2
MAL_INI = 1
ARCH_INI = 1
新建/dm8/data/DAMENG/dmmal.ini
MAL_CHECK_INTERVAL = 5 #MAL 链路检测时间间隔
MAL_CONN_FAIL_INTERVAL = 5 #判定 MAL 链路断开的时间
[MAL_INST1]
MAL_INST_NAME = DM01 #实例名,和 dm.ini 中的 INSTANCE_NAME 一致
MAL_HOST = 192.168.88.2 #MAL 系统监听 TCP 连接的 IP 地址
MAL_PORT = 15236 #MAL 系统监听 TCP 连接的端口
MAL_INST_HOST = 192.168.88.2 #实例的对外服务 IP 地址
MAL_INST_PORT = 5236 # 实 例 的 对 外 服 务 端 口 , 和 dm.ini 中 的PORT_NUM 一致
MAL_DW_PORT = 15238 #实例本地的守护进程监听 TCP 连接的端口
MAL_INST_DW_PORT = 5238 #实例监听守护进程 TCP 连接的端口
[MAL_INST2]
MAL_INST_NAME = DM02
MAL_HOST = 192.168.88.3
MAL_PORT = 15236
MAL_INST_HOST = 192.168.88.3
MAL_INST_PORT = 5236
MAL_DW_PORT = 15238
MAL_INST_DW_PORT = 5238
新建/dm8/data/DAMENG/dmarch.ini
[ARCHIVE_REALTIME]
ARCH_TYPE = REALTIME#实时归档类型
ARCH_DEST = DM02 #实时归档目标实例名(主机和备份配置不同,配置向备机同步)
[ARCHIVE_LOCAL1]
ARCH_TYPE = LOCAL #本地归档类型
ARCH_DEST = /dm8/data/DAMENG/arch #本地归档文件存放路径
ARCH_FILE_SIZE = 128#单位 Mb,本地单个归档文件最大值
ARCH_SPACE_LIMIT = 0 #单位 Mb, 0 表示无限制
新建/dm8/data/DAMENG/dmwatch.ini
[GRP1]
DW_TYPE = GLOBAL #全局守护类型
DW_MODE = AUTO #自动切换模式
DW_ERROR_TIME = 10 #远程守护进程故障认定时间
INST_RECOVER_TIME = 60 #主库守护进程启动恢复的间隔时间
INST_ERROR_TIME = 10 #本地实例故障认定时间
INST_OGUID = 8888 #守护系统唯一 OGUID 值(这里要和数据库的OGUID 一致, OGUID 是写入控制文件的)
INST_INI = /dm8/data/DAMENG/dm.ini #dm.ini 配置文件路径
INST_AUTO_RESTART = 1 #打开实例的自动启动功能
INST_STARTUP_CMD = /dm8/bin/dmserver #命令行方式启动
RLOG_SEND_THRESHOLD = 0 #指定主库发送日志到备库的时间阀值,默认关闭
RLOG_APPLY_THRESHOLD = 0 #指定备库重演日志的时间阈值,默认关闭
3、把主库备份拷贝到备机,备机提前建好相关目录
[dmdba@dameng bak]$ cd /dm8/backup/
[dmdba@dameng backup]$ ls
fullbak
[dmdba@dameng backup]$ cd fullbak/
[dmdba@dameng fullbak]$ ls
fullbak.bak fullbak.meta
[dmdba@dameng fullbak]$ scp -r fullbak.bak fullbak.meta 192.168.1.99:/dm8/backup/fullbak
The authenticity of host '192.168.1.99 (192.168.1.99)' can't be established.
ECDSA key fingerprint is SHA256:mESUh0fLzTB60L86nQRj4zSBF29/pHjmCgRoLLxfwEk.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.99' (ECDSA) to the list of known hosts.

Authorized users only. All activities may be monitored and reported.
dmdba@192.168.1.99's password:
fullbak.bak 100% 24MB 10.4MB/s 00:02
fullbak.meta 100% 110KB 8.9MB/s 00:00
[dmdba@dameng fullbak]$
4、登录备库,进行还原,如果备库有实例要关闭,确保还原的目录下没有任何文件
[dmdba@kylin10 bin]$ ./dmrman
dmrman V8
RMAN> restore database to '/dm8/data/DAMENG' from backupset '/dm8/backup/fullbak';
restore database to '/dm8/data/DAMENG' from backupset '/dm8/backup/fullbak';
chattr: No such file or directory while trying to stat /dm8/data/DAMENG/dm.ctl
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.615
RMAN> recover database '/dm8/data/DAMENG/dm.ini' update db_magic;
recover database '/dm8/data/DAMENG/dm.ini' update db_magic;
Read ini warning, default backup path [/dm8/data/DAMENG/bak] does not exist.
Database mode = 2, oguid = 0
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
EP[0]'s cur_lsn[263761], file_lsn[263761]
recover successfully!
time used: 00:00:01.050
RMAN>
登录主库,将三个dmarch.ini,dmmal.ini,dmwatcher.ini拷贝到备库的同目录下
[dmdba@dameng DAMENG]$ scp dmarch.ini dmmal.ini dmwatcher.ini 192.168.1.99:/dm8/data/DAMENG/

Authorized users only. All activities may be monitored and reported.
dmdba@192.168.1.99's password:
dmarch.ini 100% 403 110.0KB/s 00:00
dmmal.ini 100% 796 373.0KB/s 00:00
dmwatcher.ini 100% 732 354.7KB/s 00:00
[dmdba@dameng DAMENG]$
登录备库,修改dm.ini文件
/dm8/data/DAMENG/dm.ini 五个地方
INSTANCE_NAME = DM02
ALTER_MODE_STATUS = 0
ENABLE_OFFLINE_TS = 2
MAL_INI = 1
ARCH_INI = 1
登录备库,修改dmarch.ini文件
ARCH_DEST = DM01
确认下dmwatcher.ini文件中路径是否正确
5、启动数据库
登录主库启动数据库到mount
[dmdba@dameng DAMENG]$ cd /dm8/bin
[dmdba@dameng bin]$ ./DmServiceDMSERVER start mount
Starting DmServiceDMSERVER: [ OK ]
[dmdba@dameng bin]$ ./disql sysdba/Dameng123

服务器[LOCALHOST:5236]:处于普通配置状态
登录使用时间 : 214.017(ms)
disql V8
SQL> alter database primary;
操作已执行
已用时间: 241.650(毫秒). 执行号:0.
修改oguid
SQL> alter system set 'ALTER_MODE_STATUS'=1;
DMSQL 过程已成功完成
已用时间: 168.869(毫秒). 执行号:2.
SQL> sp_set_oguid(8888);
DMSQL 过程已成功完成
已用时间: 2.712(毫秒). 执行号:3.
SQL> alter system set 'ALTER_MODE_STATUS'=0;
DMSQL 过程已成功完成
已用时间: 4.225(毫秒). 执行号:4.
SQL>

登录备库启动到mount,因为备库没有建实例,没有注册服务
$/dm8/bin/dmserver /dm8/data/DAMENG/dm.ini mount
如果你之前初始化过实例,服务注册过,则
[dmdba@dameng bin]$ ./DmServiceDMSERVER start mount
登录备库sql
[dmdba@kylin10 bin]$ ./disql sysdba/Dameng123
服务器[LOCALHOST:5236]:处于普通配置状态
登录使用时间 : 2.776(ms)
SQL> alter database standby;
操作已执行
已用时间: 4.287(毫秒). 执行号:0.
修改oguid
SQL> alter system set 'ALTER_MODE_STATUS'=1;
DMSQL 过程已成功完成
已用时间: 168.869(毫秒). 执行号:2.
SQL> sp_set_oguid(8888);
DMSQL 过程已成功完成
已用时间: 2.712(毫秒). 执行号:3.
SQL> alter system set 'ALTER_MODE_STATUS'=0;
DMSQL 过程已成功完成
已用时间: 4.225(毫秒). 执行号:4.
SQL>

6、启动watcher
主库操作
检查一下启动了哪些端口
[root@dameng ~]# netstat -nltp|grep dmser
tcp6 0 0 :::15236 ::😗 LISTEN 1402/dmserver
tcp6 0 0 :::5236 ::😗 LISTEN 1402/dmserver
tcp6 0 0 :::5238 ::😗 LISTEN 1402/dmserver
[root@dameng ~]#
[dmdba@dameng bin]$ ./dmwatcher /dm8/data/DAMENG/dmwatcher.ini
DMWATCHER[4.0] V8
DMWATCHER[4.0] IS READY
show 执行这个show命令查看状态
2024-04-03 19:13:45

GROUP_NAME TYPE MODE OGUID MPP_FLAG AUTO_RESTART DW_STATUS DW_SUB_STATUS DW_CTL_STATUS
GRP1 GLOBAL AUTO 8888 FALSE TRUE STARTUP SUB_STATE_START VALID

INST_OK NAME SVR_MODE SYS_STATUS RTYPE FSEQ FLSN CSEQ CLSN DW_STAT_FLAG
OK DM01 PRIMARY MOUNT REALTIME 6724 263761 6724 263761 0

show
2024-04-03 19:26:28

GROUP_NAME TYPE MODE OGUID MPP_FLAG AUTO_RESTART DW_STATUS DW_SUB_STATUS DW_CTL_STATUS
GRP1 GLOBAL AUTO 8888 FALSE TRUE OPEN SUB_STATE_START VALID

INST_OK NAME SVR_MODE SYS_STATUS RTYPE FSEQ FLSN CSEQ CLSN DW_STAT_FLAG
OK DM01 PRIMARY OPEN REALTIME 6729 263929 6729 263929 0

备库操作
检查一下启动了哪些端口
[root@dameng ~]# netstat -nltp|grep dmser
tcp6 0 0 :::15236 ::😗 LISTEN 1402/dmserver
tcp6 0 0 :::5236 ::😗 LISTEN 1402/dmserver
tcp6 0 0 :::5238 ::😗 LISTEN 1402/dmserver
[root@dameng ~]#
[dmdba@dameng bin]$ ./dmwatcher /dm8/data/DAMENG/dmwatcher.ini
DMWATCHER[4.0] V8
DMWATCHER[4.0] IS READY
show 执行这个show命令查看状态
2024-04-03 19:15:55

GROUP_NAME TYPE MODE OGUID MPP_FLAG AUTO_RESTART DW_STATUS DW_SUB_STATUS DW_CTL_STATUS
GRP1 GLOBAL AUTO 8888 FALSE TRUE OPEN SUB_STATE_START VALID

INST_OK NAME SVR_MODE SYS_STATUS RTYPE FSEQ FLSN CSEQ CLSN DW_STAT_FLAG
OK DM02 STANDBY OPEN REALTIME 6724 263761 6724 263761 0

DATABASE(DM02) APPLY INFO:
REDOS_PARALLEL_NUM (1)
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[6724, 6724, 6724], (RLSN, SLSN, KLSN)[263761, 263761, 263761], N_TSK[0], TSK_MEM_USE[0]
REDO_LSN_ARR: (263761)


show
2024-04-03 19:26:37

GROUP_NAME TYPE MODE OGUID MPP_FLAG AUTO_RESTART DW_STATUS DW_SUB_STATUS DW_CTL_STATUS
GRP1 GLOBAL AUTO 8888 FALSE TRUE OPEN SUB_STATE_START VALID

INST_OK NAME SVR_MODE SYS_STATUS RTYPE FSEQ FLSN CSEQ CLSN DW_STAT_FLAG
OK DM02 STANDBY OPEN REALTIME 6724 263761 6724 263761 0

DATABASE(DM02) APPLY INFO:
REDOS_PARALLEL_NUM (1)
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[6724, 6724, 6724], (RLSN, SLSN, KLSN)[263761, 263761, 263761], N_TSK[0], TSK_MEM_USE[0]
REDO_LSN_ARR: (263761)

当数据库watcher启动后,数据库会自动打开变成open状态

7、配置monitor
dmdba用户登录到monitor主机,在/dm8目录下创建文件:dmmonitor.ini
MON_DW_CONFIRM = 1
MON_LOG_PATH = /dm8/log #注意该目录在monitor主机上一定要有,并且权限也有
MON_LOG_INTERVAL = 60
MON_LOG_FILE_SIZE = 32
MON_LOG_SPACE_LIMIT = 0
[GRP1]
MON_INST_OGUID = 8888
MON_DW_IP = 192.168.88.2:15238
MON_DW_IP = 192.168.88.3:15238
[dmdba@localhost bin]$ ./dmmonitor /dm8/dmmonitor.ini
[monitor] 2024-04-03 19:50:58: DMMONITOR[4.0] V8
[monitor] 2024-04-03 19:50:58: DMMONITOR[4.0] IS READY.

[monitor] 2024-04-03 19:51:00:
#--------------------------------------------------------------------------------#
GET MONITOR CONNECT INFO FROM DMWATCHER(DM02), THE FIRST LINE IS SELF INFO.

DW_CONN_TIME MON_CONFIRM MID MON_IP MON_VERSION
2024-04-03 19:51:04 TRUE 1487063170 ::ffff:192.168.1.98 DMMONITOR[4.0] V8

#--------------------------------------------------------------------------------#

[monitor] 2024-04-03 19:51:00: 收到守护进程(DM02)消息
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2024-04-03 19:51:05 OPEN OK DM02 OPEN STANDBY NULL 4 263761 263761

[monitor] 2024-04-03 19:52:02: 收到守护进程(DM01)消息
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2024-04-03 19:52:05 OPEN OK DM01 OPEN PRIMARY VALID 5 263929 263929

[monitor] 2024-04-03 19:52:08: 守护进程(DM01)状态切换 [OPEN-->RECOVERY]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2024-04-03 19:52:11 RECOVERY OK DM01 OPEN PRIMARY VALID 5 263929 263929

[monitor] 2024-04-03 19:52:19: 守护进程(DM01)状态切换 [RECOVERY-->OPEN]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2024-04-03 19:52:22 OPEN OK DM01 OPEN PRIMARY VALID 5 263929 263929
该步骤时主库无意中打开了防火墙,导致主库状态失败,后来防火墙关闭后正常。
查看归档状态
[dmdba@kylin10 bin]$ ./disql sysdba/Dameng123
服务器[LOCALHOST:5236]:处于备库打开状态
登录使用时间 : 2.772(ms)
disql V8
SQL> select * from v$arch_status;

行号 ARCH_TYPE ARCH_DEST ARCH_STATUS ARCH_SRC


1 REALTIME DM01 NULL DM02
2 LOCAL /dm8/data/DAMENG/arch VALID DM02

已用时间: 4.586(毫秒). 执行号:101.
SQL>

如果使用手动方式关闭数据守护系统,请严格按照以下顺序执行:

  1. 如果启动了确认监视器,先关闭确认监视器(防止自动接管)exit

  2. 关闭备库守护进程(防止重启实例)exit

  3. 关闭主库守护进程(防止重启实例)exit

  4. Shutdown 主库
    [dmdba@dameng bin]$ ./disql sysdba/Dameng123
    服务器[LOCALHOST:5236]:处于主库打开状态
    登录使用时间 : 22.349(ms)
    disql V8
    SQL> shutdown immediate;
    操作已执行
    已用时间: 0.586(毫秒). 执行号:0.
    SQL> exit

  5. Shutdown 备库

查看数据库的实例名
SQL> select instance_name,status

行号 INSTANCE_NAME STATUS$


1 DM01 OPEN

已用时间: 157.902(毫秒). 执行号:601.
SQL>
查看实例服务有没有注册:
[root@kylin10 system]# pwd
/usr/lib/systemd/system
[root@kylin10 system]# ls -l Dm* 如果存在类似的说明已经注册了。
-rw-r--r-- 1 root root 374 Mar 21 18:56 DmAPService.service
-rw-r--r-- 1 dmdba dinstall 369 Mar 21 19:11 DmServiceDMSERVER.service
[root@kylin10 system]# pwd
/usr/lib/systemd/system

9、注册服务,主备库都要执行
先注册watcher服务,用root用户执行
#cd /dm8/script/root/
[root@dameng root]# ./dm_service_installer.sh -t dmwatcher -watcher_ini /dm8/data/DAMENG/dmwatcher.ini -p DM01
Created symlink /etc/systemd/system/multi-user.target.wants/DmWatcherServiceDM01.service → /usr/lib/systemd/system/DmWatcherServiceDM01.service.
创建服务(DmWatcherServiceDM01)完成
[root@dameng root]# ./dm_service_installer.sh -t dmserver -dm_ini /dm8/data/DAMENG/dm.ini -p DM01
Created symlink /etc/systemd/system/multi-user.target.wants/DmServiceDM01.service → /usr/lib/systemd/system/DmServiceDM01.service.
创建服务(DmServiceDM01)完成
[root@dameng root]#

备库执行
[root@kylin10 system]# cd /dm8/script/root/
[root@kylin10 root]# ./dm_service_installer.sh -t dmwatcher -watcher_ini /dm8/data/DAMENG/dmwatcher.ini -p DM02
Created symlink /etc/systemd/system/multi-user.target.wants/DmWatcherServiceDM02.service → /usr/lib/systemd/system/DmWatcherServiceDM02.service.
创建服务(DmWatcherServiceDM02)完成
[root@kylin10 root]# ./dm_service_installer.sh -t dmserver -dm_ini /dm8/data/DAMENG/dm.ini -p DM02
Created symlink /etc/systemd/system/multi-user.target.wants/DmServiceDM02.service → /usr/lib/systemd/system/DmServiceDM02.service.
创建服务(DmServiceDM02)完成
[root@kylin10 root]#

监视器执行
[root@localhost dm8]# cd script/root/
[root@localhost root]# ./dm_service_installer.sh -t dmmonitor -monitor_ini /dm8/dmmonitor.ini -p DMMON
Created symlink /etc/systemd/system/multi-user.target.wants/DmMonitorServiceDMMON.service → /usr/lib/systemd/system/DmMonitorServiceDMMON.service.
创建服务(DmMonitorServiceDMMON)完成
[root@localhost root]#

删除服务
[root@kylin10 root]# ./dm_service_uninstaller.sh -n DmServiceDM01
是否删除服务(DmServiceDM01)?(Y/y:是 N/n:否): y
Removed /etc/systemd/system/multi-user.target.wants/DmServiceDM01.service.
删除服务文件(/usr/lib/systemd/system/DmServiceDM01.service)完成
删除服务(DmServiceDM01)完成
[root@kylin10 root]#

启动服务,
[dmdba@dameng bin]$ ./DmServiceDM01 start
Starting DmServiceDM01: [ OK ]
[dmdba@kylin10 bin]$ ./DmServiceDM02 start
Starting DmServiceDM02: [ OK ]
[dmdba@dameng bin]$ ./DmWatcherServiceDM01 start
Starting DmWatcherServiceDM01: [ OK ]
[dmdba@kylin10 bin]$ ./DmWatcherServiceDM02 start
Starting DmWatcherServiceDM02: [ OK ]
[dmdba@kylin10 bin]$
查询主备状态
SQL> select mode$ from v$instance;

行号 MODE$


1 STANDBY

已用时间: 0.749(毫秒). 执行号:1.
10、切换主备库
SQL>
switchover
[monitor] 2024-04-03 20:59:40: 未登录监视器或服务器公钥发生变化,请重新登录!

login
用户名:sysdba
密码:
[monitor] 2024-04-03 21:00:00: 登录监视器成功!

switchover #输入命令
[monitor] 2024-04-03 21:00:07: 开始切换实例DM02
[monitor] 2024-04-03 21:00:07: 通知守护进程DM01切换SWITCHOVER状态
[monitor] 2024-04-03 21:00:07: 守护进程(DM01)状态切换 [OPEN-->SWITCHOVER]
[monitor] 2024-04-03 21:00:08: 切换守护进程DM01为SWITCHOVER状态成功
[monitor] 2024-04-03 21:00:08: 通知守护进程DM02切换SWITCHOVER状态
[monitor] 2024-04-03 21:00:09: 守护进程(DM02)状态切换 [OPEN-->SWITCHOVER]
[monitor] 2024-04-03 21:00:10: 切换守护进程DM02为SWITCHOVER状态成功
[monitor] 2024-04-03 21:00:10: 实例DM01开始执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句
[monitor] 2024-04-03 21:00:11: 实例DM01执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句成功
[monitor] 2024-04-03 21:00:11: 实例DM02开始执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句
[monitor] 2024-04-03 21:00:11: 实例DM02执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句成功
[monitor] 2024-04-03 21:00:11: 实例DM01开始执行ALTER DATABASE MOUNT语句
[monitor] 2024-04-03 21:00:11: 实例DM01执行ALTER DATABASE MOUNT语句成功
[monitor] 2024-04-03 21:00:11: 实例DM02开始执行SP_APPLY_KEEP_PKG()语句
[monitor] 2024-04-03 21:00:12: 实例DM02执行SP_APPLY_KEEP_PKG()语句成功
[monitor] 2024-04-03 21:00:12: 实例DM02开始执行ALTER DATABASE MOUNT语句
[monitor] 2024-04-03 21:00:12: 实例DM02执行ALTER DATABASE MOUNT语句成功
[monitor] 2024-04-03 21:00:12: 实例DM01开始执行ALTER DATABASE STANDBY语句
[monitor] 2024-04-03 21:00:12: 实例DM01执行ALTER DATABASE STANDBY语句成功
[monitor] 2024-04-03 21:00:12: 实例DM02开始执行ALTER DATABASE PRIMARY语句
[monitor] 2024-04-03 21:00:14: 实例DM02执行ALTER DATABASE PRIMARY语句成功
[monitor] 2024-04-03 21:00:14: 通知实例DM02修改所有归档状态无效
[monitor] 2024-04-03 21:00:14: 修改所有实例归档为无效状态成功
[monitor] 2024-04-03 21:00:14: 实例DM01开始执行ALTER DATABASE OPEN FORCE语句
[monitor] 2024-04-03 21:00:14: 实例DM01执行ALTER DATABASE OPEN FORCE语句成功
[monitor] 2024-04-03 21:00:14: 实例DM02开始执行ALTER DATABASE OPEN FORCE语句
[monitor] 2024-04-03 21:00:15: 实例DM02执行ALTER DATABASE OPEN FORCE语句成功
[monitor] 2024-04-03 21:00:15: 实例DM01开始执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句
[monitor] 2024-04-03 21:00:15: 实例DM01执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句成功
[monitor] 2024-04-03 21:00:15: 实例DM02开始执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句
[monitor] 2024-04-03 21:00:15: 实例DM02执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句成功
[monitor] 2024-04-03 21:00:15: 通知守护进程DM01切换OPEN状态
[monitor] 2024-04-03 21:00:15: 守护进程(DM01)状态切换 [SWITCHOVER-->OPEN]
[monitor] 2024-04-03 21:00:16: 切换守护进程DM01为OPEN状态成功
[monitor] 2024-04-03 21:00:16: 通知守护进程DM02切换OPEN状态
[monitor] 2024-04-03 21:00:17: 守护进程(DM02)状态切换 [SWITCHOVER-->OPEN]
[monitor] 2024-04-03 21:00:17: 切换守护进程DM02为OPEN状态成功
[monitor] 2024-04-03 21:00:17: 通知组(GRP1)的守护进程执行清理操作
[monitor] 2024-04-03 21:00:17: 清理守护进程(DM01)请求成功
[monitor] 2024-04-03 21:00:17: 清理守护进程(DM02)请求成功
[monitor] 2024-04-03 21:00:17: 实例DM02切换成功

2024-04-03 21:00:17
#================================================================================#
GROUP OGUID MON_CONFIRM MODE MPP_FLAG
GRP1 8888 TRUE AUTO FALSE

<<DATABASE GLOBAL INFO:>>
DW_IP MAL_DW_PORT WTIME WTYPE WCTLSTAT WSTATUS INAME INST_OK N_EP N_OK ISTATUS IMODE DSC_STATUS RTYPE RSTAT
192.168.1.99 15238 2024-04-03 21:00:22 GLOBAL VALID OPEN DM02 OK 1 1 OPEN PRIMARY DSC_OPEN REALTIME VALID

EP INFO:
INST_IP INST_PORT INST_OK INAME ISTATUS IMODE DSC_SEQNO DSC_CTL_NODE RTYPE RSTAT FSEQ FLSN CSEQ CLSN DW_STAT_FLAG
192.168.1.99 5236 OK DM02 OPEN PRIMARY 0 0 REALTIME VALID 6759 264455 6759 264455 NONE

<<DATABASE GLOBAL INFO:>>
DW_IP MAL_DW_PORT WTIME WTYPE WCTLSTAT WSTATUS INAME INST_OK N_EP N_OK ISTATUS IMODE DSC_STATUS RTYPE RSTAT
192.168.1.198 15238 2024-04-03 21:00:20 GLOBAL VALID OPEN DM01 OK 1 1 OPEN STANDBY DSC_OPEN REALTIME INVALID

EP INFO:
INST_IP INST_PORT INST_OK INAME ISTATUS IMODE DSC_SEQNO DSC_CTL_NODE RTYPE RSTAT FSEQ FLSN CSEQ CLSN DW_STAT_FLAG
192.168.1.198 5236 OK DM01 OPEN STANDBY 0 0 REALTIME INVALID 6757 264270 6757 264270 NONE

DATABASE(DM01) APPLY INFO FROM (DM02), REDOS_PARALLEL_NUM (1), WAIT_APPLY[FALSE]:
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[6757, 6757, 6757], (RLSN, SLSN, KLSN)[264270, 264270, 264270], N_TSK[0], TSK_MEM_USE[0]
REDO_LSN_ARR: (264270)

#================================================================================#

[monitor] 2024-04-03 21:00:19: 守护进程(DM02)状态切换 [OPEN-->RECOVERY]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2024-04-03 21:00:25 RECOVERY OK DM02 OPEN PRIMARY VALID 7 264455 264455

[monitor] 2024-04-03 21:00:26: 守护进程(DM02)状态切换 [RECOVERY-->OPEN]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2024-04-03 21:00:32 OPEN OK DM02 OPEN PRIMARY VALID 7 264455 264455

评论
后发表回复

作者

文章

阅读量

获赞

扫一扫
联系客服