目录
0.环境检查
数据守护系统中各实例使用的 DM 服务器版本应一致,同时还应注意各实例所在主机的操作系统位数、大小端模式、时区及时间设置都应一致。
系统 | 版本 |
---|---|
操作系统 | Debian 9 |
数据库系统 | DM Database 64 V8 03134283890-20220525-161267-10045 |
数据守护 | V4.0 |
1.数据准备
在主机上进行联机物理备份,然后在备机上恢复进行数据同步。
要做备份需要先开启归档,以下配置归档,配置完成不用重启数据库。(两个数据库都做)
SQL> ALTER DATABASE MOUNT;
executed successfully
used time: 0.908(ms). Execute id is 0.
SQL> ALTER DATABASE ADD ARCHIVELOG 'dest=/dm8/data2/dm_arch,type=local,file_size=64,space_limit=20480';
executed successfully
used time: 2.245(ms). Execute id is 0.
SQL> alter database archivelog;
executed successfully
used time: 9.115(ms). Execute id is 0.
SQL> alter database open;
executed successfully
used time: 17.602(ms). Execute id is 0.
SQL> SELECT ARCH_MODE FROM V$DATABASE;
LINEID ARCH_MODE
---------- ---------
1 Y
used time: 1.695(ms). Execute id is 55500.
在主库上建表并做联机备份。
dmdba@lxm2:~$ rlwrap disql SYSDBA/SYSDBA
Server[LOCALHOST:5236]:mode is normal, state is open
login used time : 1.604(ms)
disql V8
SQL> CREATE TABLE T1(COL1 INT,COL2 INT,COL3 VARCHAR);
executed successfully
used time: 13.579(ms). Execute id is 55200.
SQL> INSERT INTO T1 VALUES(1001,1001,'数据守护集群');
affect rows 1
used time: 1.984(ms). Execute id is 55201.
SQL> BACKUP DATABASE BACKUPSET '/dm8/data2/BACKUP_FILE_01';
executed successfully
used time: 00:00:03.786. Execute id is 55600.
将备份远程拷贝到备机。
dmdba@lxm2:/dm/data2$ scp -r BACKUP_FILE_01/ dmdba@39.103.139.80:/dm8/data2
dmdba@39.103.139.80's password:
BACKUP_FILE_01.bak 100% 89MB 13.0MB/s 00:06
BACKUP_FILE_01.meta 100% 89KB 11.7MB/s 00:00
BACKUP_FILE_01_1.bak 100% 340KB 24.9MB/s 00:00
备机查看备份,开始脱机还原和恢复。
root@lxm:/dm8/data2# ls -lrth
total 12K
drwxr-xr-x 6 dmdba dinstall 4.0K Jul 1 14:09 DMDB
drwxr-xr-x 2 dmdba dinstall 4.0K Jul 1 14:42 dm_arch
drwxr-xr-x 2 dmdba dinstall 4.0K Jul 1 15:19 BACKUP_FILE_01
root@lxm:/dm8/data2# systemctl stop DmServiceDMSERVER.service
root@lxm:/dm8/data2# su - dmdba
dmdba@lxm:~$ ls
COL.LOG DB_DMDB_FULL_2022_06_24_11_54_00 DB_DMDB_FULL_2022_06_24_11_56_00 DB_DMDB_FULL_2022_07_01_11_56_02 dm_arch dmdbms
dmdba@lxm:~$ dmrman
dmrman V8
RMAN> EXIT
time used: 2.128(ms)
dmdba@lxm:~$ rlwrap dmrman
dmrman V8
RMAN> RESTORE DATABASE '/dm8/data2/DMDB/dm.ini' FROM BACKUPSET '/dm8/data2/BACKUP_FILE_01';
RESTORE DATABASE '/dm8/data2/DMDB/dm.ini' FROM BACKUPSET '/dm8/data2/BACKUP_FILE_01';
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.756
RMAN> RECOVER DATABASE '/dm8/data2/DMDB/dm.ini' FROM BACKUPSET '/dm8/data2/BACKUP_FILE_01';
RECOVER DATABASE '/dm8/data2/DMDB/dm.ini' FROM BACKUPSET '/dm8/data2/BACKUP_FILE_01';
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[40343], file_lsn[40343]
[Percent:100.00%][Speed:0.00PKG/s][Cost:00:00:00][Remaining:00:00:00]
recover successfully!
time used: 00:00:02.576
RMAN> RECOVER DATABASE '/dm8/data2/DMDB/dm.ini' UPDATE DB_MAGIC;
RECOVER DATABASE '/dm8/data2/DMDB/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[42046], file_lsn[42046]
recover successfully!
time used: 00:00:01.055
RMAN>
2.配置主库
配置文件
dm.ini
#实例名,建议使用―组名_守护环境_序号‖的命名方式,总长度不能超过 16
INSTANCE_NAME = GRP1_RT_01
PORT_NUM = 5236 #数据库实例监听端口
DW_INACTIVE_INTERVAL = 60 #接收守护进程消息超时时间
ALTER_MODE_STATUS = 0 #不允许手工方式修改实例模式/状态/OGUID
ENABLE_OFFLINE_TS = 2 #不允许备库 OFFLINE 表空间
MAL_INI = 1 #打开 MAL 系统
ARCH_INI = 1 #打开归档配置
RLOG_SEND_APPLY_MON = 64 #统计最近 64 次的日志发送信息
dmmal.ini配置一样
MAL_CHECK_INTERVAL = 5 #MAL 链路检测时间间隔
MAL_CONN_FAIL_INTERVAL = 5 #判定 MAL 链路断开的时间
[MAL_INST1]
MAL_INST_NAME = GRP1_RT_01 #实例名,和 dm.ini 中的 INSTANCE_NAME 一致
MAL_HOST = 172.21.215.74 #MAL 系统监听 TCP 连接的 IP 地址
MAL_PORT = 61141 #MAL 系统监听 TCP 连接的端口
MAL_INST_HOST = 8.142.141.128 #实例的对外服务 IP 地址
MAL_INST_PORT = 5236 #实例的对外服务端口,和 dm.ini 中的 PORT_NUM 一致
MAL_DW_PORT = 52141 #实例本地的守护进程监听 TCP 连接的端口
MAL_INST_DW_PORT = 33141 #实例监听守护进程 TCP 连接的端口
[MAL_INST2]
MAL_INST_NAME = GRP1_RT_02
MAL_HOST = 172.17.44.74
MAL_PORT = 61142
MAL_INST_HOST = 39.103.139.80
MAL_INST_PORT = 5236
MAL_DW_PORT = 52142
MAL_INST_DW_PORT = 33142
dmarch.ini
[ARCHIVE_REALTIME]
ARCH_TYPE = REALTIME #实时归档类型
ARCH_DEST = GRP1_RT_02 #实时归档目标实例名
[ARCHIVE_LOCAL1]
ARCH_TYPE = LOCAL #本地归档类型
ARCH_DEST = /dm8/data2/DMDB/dmarch #本地归档文件存放路径
ARCH_FILE_SIZE = 128 #单位 Mb,本地单个归档文件最大值
ARCH_SPACE_LIMIT = 0 #单位 Mb,0 表示无限制,范围 1024~2147483647M
dmwatcher.ini
[GRP1]
DW_TYPE = GLOBAL #全局守护类型
DW_MODE = AUTO #自动切换模式
DW_ERROR_TIME = 10 #远程守护进程故障认定时间
INST_RECOVER_TIME = 60 #主库守护进程启动恢复的间隔时间
INST_ERROR_TIME = 10 #本地实例故障认定时间
INST_OGUID = 453331 #守护系统唯一 OGUID 值
INST_INI = /dm8/data2/DMDB/dm.ini #dm.ini 配置文件路径
INST_AUTO_RESTART = 1 #打开实例的自动启动功能
INST_STARTUP_CMD = /home/dmdba/dmdbms/bin/dmserver #命令行方式启动
RLOG_SEND_THRESHOLD = 0 #指定主库发送日志到备库的时间阈值,默认关闭
RLOG_APPLY_THRESHOLD = 0 #指定备库重演日志的时间阈值,默认关闭
启动主库
dmdba@lxm2:~$ dmserver /dm8/data2/DMDB/dm.ini mount
file dm.key not found, use default license!
version info: develop
DM Database Server 64 V8 03134283890-20220525-161267-10045 startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2023-05-25
file lsn: 44545
ndct db load finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info success.
SYSTEM IS READY.
设置 OGUID
dmdba@lxm2:~$ disql SYSDBA/SYSDBA
Server[LOCALHOST:5236]:mode is normal, state is mount
login used time : 1.930(ms)
disql V8
SQL> SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 1);
DMSQL executed successfully
used time: 9.027(ms). Execute id is 0.
SQL> sp_set_oguid(453331);
DMSQL executed successfully
used time: 6.289(ms). Execute id is 1.
SQL> SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 0);
DMSQL executed successfully
used time: 4.440(ms). Execute id is 2.
修改数据库模式
SQL> alter database primary;
executed successfully
used time: 8.149(ms). Execute id is 0.
SQL> EXIT
3.配置备库
配置文件
dm.ini
#实例名,建议使用―组名_守护环境_序号‖的命名方式,总长度不能超过 16
INSTANCE_NAME = GRP1_RT_02
PORT_NUM = 5236 #数据库实例监听端口
DW_INACTIVE_INTERVAL = 60 #接收守护进程消息超时时间
ALTER_MODE_STATUS = 0 #不允许手工方式修改实例模式/状态/OGUID
ENABLE_OFFLINE_TS = 2 #不允许备库 OFFLINE 表空间
MAL_INI = 1 #打开 MAL 系统
ARCH_INI = 1 #打开归档配置
RLOG_SEND_APPLY_MON = 64 #统计最近 64 次的日志发送信息
MAL_CHECK_INTERVAL = 5 #MAL 链路检测时间间隔
MAL_CONN_FAIL_INTERVAL = 5 #判定 MAL 链路断开的时间
[MAL_INST1]
MAL_INST_NAME = GRP1_RT_01 #实例名,和 dm.ini 中的 INSTANCE_NAME 一致
MAL_HOST = 172.21.215.74 #MAL 系统监听 TCP 连接的 IP 地址
MAL_PORT = 61141 #MAL 系统监听 TCP 连接的端口
MAL_INST_HOST = 8.142.141.128 #实例的对外服务 IP 地址
MAL_INST_PORT = 5236 #实例的对外服务端口,和 dm.ini 中的 PORT_NUM 一致
MAL_DW_PORT = 52141 #实例本地的守护进程监听 TCP 连接的端口
MAL_INST_DW_PORT = 33141 #实例监听守护进程 TCP 连接的端口
[MAL_INST2]
MAL_INST_NAME = GRP1_RT_02
MAL_HOST = 172.17.44.74
MAL_PORT = 61142
MAL_INST_HOST = 39.103.139.80
MAL_INST_PORT = 5236
MAL_DW_PORT = 52142
MAL_INST_DW_PORT = 33142
[ARCHIVE_REALTIME]
ARCH_TYPE = REALTIME #实时归档类型
ARCH_DEST = GRP1_RT_01 #实时归档目标实例名
[ARCHIVE_LOCAL1]
ARCH_TYPE = LOCAL #本地归档类型
ARCH_DEST = /dm8/data2/DMDB/dmarch #本地归档文件存放路径
ARCH_FILE_SIZE = 128 #单位 Mb,本地单个归档文件最大值
ARCH_SPACE_LIMIT = 0 #单位 Mb,0 表示无限制,范围 1024~2147483647M
[GRP1]
DW_TYPE = GLOBAL #全局守护类型
DW_MODE = AUTO #自动切换模式
DW_ERROR_TIME = 10 #远程守护进程故障认定时间
INST_RECOVER_TIME = 60 #主库守护进程启动恢复的间隔时间
INST_ERROR_TIME = 10 #本地实例故障认定时间
INST_OGUID = 453331 #守护系统唯一 OGUID 值
INST_INI = /dm8/data2/DMDB/dm.ini #dm.ini 配置文件路径
INST_AUTO_RESTART = 1 #打开实例的自动启动功能
INST_STARTUP_CMD = /home/dmdba/dmdbms/bin/dmserver #命令行方式启动
RLOG_APPLY_THRESHOLD = 0 #指定备库重演日志的时间阈值,默认关闭
启动备库
dmdba@lxm:~$ dmserver /dm8/data2/DMDB/dm.ini mount
file dm.key not found, use default license!
version info: develop
DM Database Server 64 V8 03134283890-20220525-161267-10045 startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2023-05-25
file lsn: 42046
ndct db load finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info success.
SYSTEM IS READY.
设置OGUID
dmdba@lxm:~$ disql SYSDBA/SYSDBA
Server[LOCALHOST:5236]:mode is normal, state is mount
login used time : 1.864(ms)
disql V8
SQL> SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 1);
sp_set_oguid(453331);
SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 0);DMSQL executed successfully
used time: 8.593(ms). Execute id is 0.
SQL> DMSQL executed successfully
used time: 5.396(ms). Execute id is 1.
修改数据库模式
dmdba@lxm:~$ rlwrap disql SYSDBA/SYSDBA
Server[LOCALHOST:5236]:mode is normal, state is mount
login used time : 1.448(ms)
disql V8
SQL>
SQL>
SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 1);
alter database standby;
DMSQL executed successfully
used time: 6.286(ms). Execute id is 100.
SQL> executed successfully
used time: 6.486(ms). Execute id is 0.
SQL> SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 0);
DMSQL executed successfully
used time: 4.937(ms). Execute id is 101.
SQL> EXIT
4.配置单实例监视器
一般来说应该配置内网IP,但是因为资源不足监视器部署在了外网,所以配置了外网IP。
MON_DW_CONFIRM=1
MON_LOG_PATH=C:\dmdbms
MON_LOG_INTERVAL=60
MON_LOG_FILE_SIZE=32
MON_LOG_SPACE_LIMIT=0
[GRP1]
MON_INST_OGUID=453331
MON_DW_IP=8.142.141.128:52141
MON_DW_IP=39.103.139.80:52142
5.启动主备库守护进程
--主库
dmdba@lxm2:~/dmdbms/log$ dmwatcher /dm8/data2/DMDB/dmwatcher.ini
DMWATCHER[4.0] V8
DMWATCHER[4.0] IS READY
show
2022-07-01 19:08:29
---------------------------------------------------------------------------
GROUP_NAME TYPE MODE OGUID MPP_FLAG AUTO_RESTART DW_STATUS DW_SUB_STATUS DW_CTL_STATUS
GRP1 GLOBAL AUTO 453331 FALSE TRUE OPEN SUB_STATE_START VALID
INST_OK NAME SVR_MODE SYS_STATUS RTYPE FSEQ FLSN CSEQ CLSN DW_STAT_FLAG
OK GRP1_RT_01 PRIMARY OPEN REALTIME 11135 47288 11135 47289 0
---------------------------------------------------------------------------
--备库
dmdba@lxm:~/dmdbms/log$ dmwatcher /dm8/data2/DMDB/dmwatcher.ini
DMWATCHER[4.0] V8
DMWATCHER[4.0] IS READY
show
2022-07-01 19:08:20
---------------------------------------------------------------------------
GROUP_NAME TYPE MODE OGUID MPP_FLAG AUTO_RESTART DW_STATUS DW_SUB_STATUS DW_CTL_STATUS
GRP1 GLOBAL AUTO 453331 FALSE TRUE OPEN SUB_STATE_START VALID
INST_OK NAME SVR_MODE SYS_STATUS RTYPE FSEQ FLSN CSEQ CLSN DW_STAT_FLAG
OK GRP1_RT_02 STANDBY OPEN REALTIME 8458 47284 8458 47284 0
DATABASE(GRP1_RT_02) APPLY INFO:
REDOS_PARALLEL_NUM (1)
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[11131, 11131, 11132], (RLSN, SLSN, KLSN)[47284, 47284, 47285], N_TSK[0], TSK_MEM_USE[512]
REDO_LSN_ARR: (47284)
---------------------------------------------------------------------------
6.启动监视器
C:\dmdbms\bin>dmmonitor.exe C:\dmdbms\data\dmmonitor.ini
[monitor] 2022-07-01 19:35:22: DMMONITOR[4.0] V8
[monitor] 2022-07-01 19:35:22: DMMONITOR[4.0] IS READY.
[monitor] 2022-07-01 19:35:22: 收到守护进程(GRP1_RT_01)消息
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-01 19:35:22 OPEN OK GRP1_RT_01 OPEN PRIMARY VALID 3 47825 47826
[monitor] 2022-07-01 19:35:22: 收到守护进程(GRP1_RT_02)消息
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-01 19:35:22 OPEN OK GRP1_RT_02 OPEN STANDBY VALID 3 47825 47825
7.测试主备同步功能
--主库
SQL> DESCRIBE T1;
LINEID NAME TYPE$ NULLABLE
---------- ---- ------------- --------
1 COL1 INTEGER Y
2 COL2 INTEGER Y
3 COL3 VARCHAR(8188) Y
used time: 19.356(ms). Execute id is 1.
SQL> SELECT * FROM T1;
no rows
used time: 0.199(ms). Execute id is 2.
SQL>
SQL> INSERT INTO T1 VALUES(1,1,'数据守护主备集群');
affect rows 1
used time: 0.675(ms). Execute id is 502.
SQL> COMMIT;
executed successfully
used time: 2.696(ms). Execute id is 503.
SQL> EXIT
--备库
SQL> SELECT * FROM T1;
LINEID COL1 COL2 COL3
---------- ----------- ----------- ------------------------
1 1 1 数据守护主备集群
used time: 0.236(ms). Execute id is 3.
问题总结
主备库配置对比
rman工具和disql联机备份都不支持异机备份,所以需要拷贝到备库服务器
--试验,远程登录数据库,备份文件备份到了服务器端,不是客户端。
dmdba@lxm:~$ rlwrap disql SYSDBA/SYSDBA@8.142.141.128:5236
Server[8.142.141.128:5236]:mode is normal, state is open
login used time : 4.655(ms)
disql V8
SQL> BACKUP DATABASE BACKUPSET '/dm8/data2/BACKUP_FILE_02';
executed successfully
used time: 00:00:03.763. Execute id is 55701.
SQL> EXIT
MAL通信失败
2022-07-01 16:31:26.483 [INFO] database P0000015102 T0000000000000015126 mal_site_port_get site_magic:2300, src_site:0, dst_site:0
2022-07-01 16:31:26.485 [ERROR] database P0000015102 T0000000000000015136 Can't connect to DM server on '39.103.139.80' port(61142) errno(113)
2022-07-01 16:31:27.494 [INFO] database P0000015102 T0000000000000015102 rfil[/dm8/data2/DMDB/DMDB01.log] ver: 7007, sta: 1, arch_lsn = 0, arch_s
eq = 0, clsn = 44545, clsn_fil = 0, clsn_off = 13068288, l_next_seq = 10729, g_next_seq = 10729, free = 13068288
MAL_HOST开始使用了外网IP,这里MAL_HOST应该配置内网IP.
关于配置文件
vim dm.ini +$ 修改后自动覆盖。修改之前原文件要注意备份。
模拟场景故障处理
(a)制造主机故障,测试备机可接管并持续提供服务。
(b)恢复故障主机,将故障主机加入集群。
(c)手动切换主备集群,恢复原主备集群的位置。
虚拟机层面故障处理
制造故障,停掉主库虚拟机
root@lxm2:/dm8/data2/DMDB# shutdown
Shutdown scheduled for Mon 2022-07-04 15:21:11 CST, use 'shutdown -c' to cancel.
确认监视器自动切换
[monitor] 2022-07-04 15:21:23: 接收守护进程(GRP1_RT_01)消息超时
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 15:21:11 ERROR OK GRP1_RT_01 OPEN PRIMARY VALID 4 81974 81975
[monitor] 2022-07-04 15:21:23: 检测到PRIMARY实例故障,开始对组(GRP1)执行自动接管
[monitor] 2022-07-04 15:21:23: 通知组(GRP1)当前活动的守护进程设置MID
[monitor] 2022-07-04 15:21:23: 通知组(GRP1)当前活动的守护进程设置MID成功
[monitor] 2022-07-04 15:21:23: 开始使用实例GRP1_RT_02接管
[monitor] 2022-07-04 15:21:23: 通知守护进程GRP1_RT_02切换TAKEOVER状态
[monitor] 2022-07-04 15:21:23: 守护进程(GRP1_RT_02)状态切换 [OPEN-->TAKEOVER]
[monitor] 2022-07-04 15:21:24: 切换守护进程GRP1_RT_02为TAKEOVER状态成功
[monitor] 2022-07-04 15:21:24: 实例GRP1_RT_02开始执行SP_SET_GLOBAL_DW_STATUS(0, 7)语句
[monitor] 2022-07-04 15:21:25: 实例GRP1_RT_02执行SP_SET_GLOBAL_DW_STATUS(0, 7)语句成功
[monitor] 2022-07-04 15:21:25: 实例GRP1_RT_02开始执行SP_APPLY_KEEP_PKG()语句
[monitor] 2022-07-04 15:21:25: 实例GRP1_RT_02执行SP_APPLY_KEEP_PKG()语句成功
[monitor] 2022-07-04 15:21:25: 实例GRP1_RT_02开始执行ALTER DATABASE MOUNT语句
[monitor] 2022-07-04 15:21:25: 实例GRP1_RT_02执行ALTER DATABASE MOUNT语句成功
[monitor] 2022-07-04 15:21:25: 实例GRP1_RT_02开始执行ALTER DATABASE PRIMARY语句
[monitor] 2022-07-04 15:21:25: 实例GRP1_RT_02执行ALTER DATABASE PRIMARY语句成功
[monitor] 2022-07-04 15:21:25: 通知实例GRP1_RT_02修改所有归档状态无效
[monitor] 2022-07-04 15:21:25: 修改所有实例归档为无效状态成功
[monitor] 2022-07-04 15:21:25: 实例GRP1_RT_02开始执行ALTER DATABASE OPEN FORCE语句
[monitor] 2022-07-04 15:21:26: 实例GRP1_RT_02执行ALTER DATABASE OPEN FORCE语句成功
[monitor] 2022-07-04 15:21:26: 实例GRP1_RT_02开始执行SP_SET_GLOBAL_DW_STATUS(7, 0)语句
[monitor] 2022-07-04 15:21:26: 实例GRP1_RT_02执行SP_SET_GLOBAL_DW_STATUS(7, 0)语句成功
[monitor] 2022-07-04 15:21:26: 通知守护进程GRP1_RT_02切换OPEN状态
[monitor] 2022-07-04 15:21:26: 守护进程(GRP1_RT_02)状态切换 [TAKEOVER-->OPEN]
[monitor] 2022-07-04 15:21:27: 切换守护进程GRP1_RT_02为OPEN状态成功
[monitor] 2022-07-04 15:21:27: 通知组(GRP1)的守护进程执行清理操作
[monitor] 2022-07-04 15:21:27: 清理守护进程(GRP1_RT_02)请求成功
[monitor] 2022-07-04 15:21:27: 使用实例GRP1_RT_02接管成功
[monitor] 2022-07-04 15:21:27: 组(GRP1)使用实例GRP1_RT_02自动接管成功
show
2022-07-04 15:22:10
#================================================================================#
GROUP OGUID MON_CONFIRM MODE MPP_FLAG
GRP1 453331 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
39.103.139.80 52142 2022-07-04 15:22:08 GLOBAL VALID OPEN GRP1_RT_02 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
39.103.139.80 5236 OK GRP1_RT_02 OPEN PRIMARY 0 0 REALTIME VALID 43423 84855 43423 84866 NONE
ERROR DATABASE:
<<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
8.142.141.128 52141 2022-07-04 15:21:11 GLOBAL VALID ERROR GRP1_RT_01 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
8.142.141.128 5236 OK GRP1_RT_01 OPEN PRIMARY 0 0 REALTIME VALID 43378 81974 43379 81975 NONE
将虚拟机重新启动,守护进程和数据库进程自动启动,原主库恢复
[monitor] 2022-07-04 15:23:45: 守护进程(GRP1_RT_01)状态切换 [NONE-->STARTUP]
[monitor] 2022-07-04 15:24:42: 守护进程(GRP1_RT_01)状态切换 [STARTUP-->OPEN]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 15:24:41 OPEN OK GRP1_RT_01 OPEN STANDBY INVALID 4 81975 81975
[monitor] 2022-07-04 15:24:42: 守护进程(GRP1_RT_02)状态切换 [OPEN-->RECOVERY]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 15:24:41 RECOVERY OK GRP1_RT_02 OPEN PRIMARY VALID 5 86421 86432
[monitor] 2022-07-04 15:24:45: 守护进程(GRP1_RT_02)状态切换 [RECOVERY-->OPEN]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 15:24:44 OPEN OK GRP1_RT_02 OPEN PRIMARY VALID 5 86454 86454
show
2022-07-04 15:26:06
#================================================================================#
GROUP OGUID MON_CONFIRM MODE MPP_FLAG
GRP1 453331 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
39.103.139.80 52142 2022-07-04 15:26:04 GLOBAL VALID OPEN GRP1_RT_02 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
39.103.139.80 5236 OK GRP1_RT_02 OPEN PRIMARY 0 0 REALTIME VALID 43659 87258 43660 87268 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
8.142.141.128 52141 2022-07-04 15:26:04 GLOBAL VALID OPEN GRP1_RT_01 OK 1 1 OPEN STANDBY 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
8.142.141.128 5236 OK GRP1_RT_01 OPEN STANDBY 0 0 REALTIME VALID 43379 87258 43379 87258 NONE
DATABASE(GRP1_RT_01) APPLY INFO FROM (GRP1_RT_02), REDOS_PARALLEL_NUM (1):
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[43659, 43659, 43660], (RLSN, SLSN, KLSN)[87258, 87258, 87268], N_TSK[0], TSK_MEM_USE[1024]
REDO_LSN_ARR: (87258)
#================================================================================#
show global info
2022-07-04 15:32:00
#================================================================================#
GROUP OGUID MON_CONFIRM MODE MPP_FLAG
GRP1 453331 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
39.103.139.80 52142 2022-07-04 15:31:59 GLOBAL VALID OPEN GRP1_RT_02 OK 1 1 OPEN PRIMARY DSC_OPEN REALTIME VALID
DW_IP MAL_DW_PORT WTIME WTYPE WCTLSTAT WSTATUS INAME INST_OK N_EP N_OK ISTATUS IMODE DSC_STATUS RTYPE RSTAT
8.142.141.128 52141 2022-07-04 15:31:58 GLOBAL VALID OPEN GRP1_RT_01 OK 1 1 OPEN STANDBY DSC_OPEN REALTIME VALID
手动切换恢复原主备位置
switchover GRP1_RT_01
[monitor] 2022-07-04 15:35:58: 未登录监视器或服务器公钥发生变化,请重新登录!
#================================================================================#
login
用户名:SYSDBA
密码:
[monitor] 2022-07-04 15:51:39: 登录监视器成功!
switchover GRP1_RT_01
[monitor] 2022-07-04 15:51:46: 开始切换实例GRP1_RT_01
[monitor] 2022-07-04 15:51:46: 通知守护进程GRP1_RT_02切换SWITCHOVER状态
[monitor] 2022-07-04 15:51:46: 守护进程(GRP1_RT_02)状态切换 [OPEN-->SWITCHOVER]
[monitor] 2022-07-04 15:51:47: 切换守护进程GRP1_RT_02为SWITCHOVER状态成功
[monitor] 2022-07-04 15:51:47: 通知守护进程GRP1_RT_01切换SWITCHOVER状态
[monitor] 2022-07-04 15:51:48: 守护进程(GRP1_RT_01)状态切换 [OPEN-->SWITCHOVER]
[monitor] 2022-07-04 15:51:48: 切换守护进程GRP1_RT_01为SWITCHOVER状态成功
[monitor] 2022-07-04 15:51:48: 实例GRP1_RT_02开始执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句
[monitor] 2022-07-04 15:51:48: 实例GRP1_RT_02执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句成功
[monitor] 2022-07-04 15:51:48: 实例GRP1_RT_01开始执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句
[monitor] 2022-07-04 15:51:48: 实例GRP1_RT_01执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句成功
[monitor] 2022-07-04 15:51:48: 实例GRP1_RT_02开始执行ALTER DATABASE MOUNT语句
[monitor] 2022-07-04 15:51:48: 实例GRP1_RT_02执行ALTER DATABASE MOUNT语句成功
[monitor] 2022-07-04 15:51:48: 实例GRP1_RT_01开始执行SP_APPLY_KEEP_PKG()语句
[monitor] 2022-07-04 15:51:50: 实例GRP1_RT_01执行SP_APPLY_KEEP_PKG()语句成功
[monitor] 2022-07-04 15:51:50: 实例GRP1_RT_01开始执行ALTER DATABASE MOUNT语句
[monitor] 2022-07-04 15:51:50: 实例GRP1_RT_01执行ALTER DATABASE MOUNT语句成功
[monitor] 2022-07-04 15:51:50: 实例GRP1_RT_02开始执行ALTER DATABASE STANDBY语句
[monitor] 2022-07-04 15:51:51: 实例GRP1_RT_02执行ALTER DATABASE STANDBY语句成功
[monitor] 2022-07-04 15:51:51: 实例GRP1_RT_01开始执行ALTER DATABASE PRIMARY语句
[monitor] 2022-07-04 15:51:52: 实例GRP1_RT_01执行ALTER DATABASE PRIMARY语句成功
[monitor] 2022-07-04 15:51:52: 通知实例GRP1_RT_01修改所有归档状态无效
[monitor] 2022-07-04 15:51:52: 修改所有实例归档为无效状态成功
[monitor] 2022-07-04 15:51:52: 实例GRP1_RT_02开始执行ALTER DATABASE OPEN FORCE语句
[monitor] 2022-07-04 15:51:52: 实例GRP1_RT_02执行ALTER DATABASE OPEN FORCE语句成功
[monitor] 2022-07-04 15:51:52: 实例GRP1_RT_01开始执行ALTER DATABASE OPEN FORCE语句
[monitor] 2022-07-04 15:51:53: 实例GRP1_RT_01执行ALTER DATABASE OPEN FORCE语句成功
[monitor] 2022-07-04 15:51:53: 实例GRP1_RT_02开始执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句
[monitor] 2022-07-04 15:51:53: 实例GRP1_RT_02执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句成功
[monitor] 2022-07-04 15:51:53: 实例GRP1_RT_01开始执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句
[monitor] 2022-07-04 15:51:53: 实例GRP1_RT_01执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句成功
[monitor] 2022-07-04 15:51:53: 通知守护进程GRP1_RT_02切换OPEN状态
[monitor] 2022-07-04 15:51:53: 守护进程(GRP1_RT_02)状态切换 [SWITCHOVER-->OPEN]
[monitor] 2022-07-04 15:51:54: 切换守护进程GRP1_RT_02为OPEN状态成功
[monitor] 2022-07-04 15:51:54: 通知守护进程GRP1_RT_01切换OPEN状态
[monitor] 2022-07-04 15:51:54: 守护进程(GRP1_RT_01)状态切换 [SWITCHOVER-->OPEN]
[monitor] 2022-07-04 15:51:54: 切换守护进程GRP1_RT_01为OPEN状态成功
[monitor] 2022-07-04 15:51:54: 通知组(GRP1)的守护进程执行清理操作
[monitor] 2022-07-04 15:51:54: 清理守护进程(GRP1_RT_01)请求成功
[monitor] 2022-07-04 15:51:54: 清理守护进程(GRP1_RT_02)请求成功
[monitor] 2022-07-04 15:51:54: 实例GRP1_RT_01切换成功
2022-07-04 15:51:54
#================================================================================#
GROUP OGUID MON_CONFIRM MODE MPP_FLAG
GRP1 453331 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
8.142.141.128 52141 2022-07-04 15:51:53 GLOBAL VALID OPEN GRP1_RT_01 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
8.142.141.128 5236 OK GRP1_RT_01 OPEN PRIMARY 0 0 REALTIME VALID 45492 105532 45492 105532 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
39.103.139.80 52142 2022-07-04 15:51:53 GLOBAL VALID OPEN GRP1_RT_02 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
39.103.139.80 5236 OK GRP1_RT_02 OPEN STANDBY 0 0 REALTIME INVALID 45490 103086 45490 103086 NONE
DATABASE(GRP1_RT_02) APPLY INFO FROM (GRP1_RT_01), REDOS_PARALLEL_NUM (1):
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[45490, 45490, 45490], (RLSN, SLSN, KLSN)[103086, 103086, 103086], N_TSK[0], TSK_MEM_USE[0]
REDO_LSN_ARR: (103086)
#================================================================================#
[monitor] 2022-07-04 15:51:57: 守护进程(GRP1_RT_01)状态切换 [OPEN-->RECOVERY]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 15:51:56 RECOVERY OK GRP1_RT_01 OPEN PRIMARY VALID 6 105533 105533
[monitor] 2022-07-04 15:52:00: 守护进程(GRP1_RT_01)状态切换 [RECOVERY-->OPEN]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 15:51:59 OPEN OK GRP1_RT_01 OPEN PRIMARY VALID 6 105534 105534
show
2022-07-04 15:52:53
#================================================================================#
GROUP OGUID MON_CONFIRM MODE MPP_FLAG
GRP1 453331 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
8.142.141.128 52141 2022-07-04 15:52:52 GLOBAL VALID OPEN GRP1_RT_01 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
8.142.141.128 5236 OK GRP1_RT_01 OPEN PRIMARY 0 0 REALTIME VALID 45511 105551 45512 105552 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
39.103.139.80 52142 2022-07-04 15:52:52 GLOBAL VALID OPEN GRP1_RT_02 OK 1 1 OPEN STANDBY 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
39.103.139.80 5236 OK GRP1_RT_02 OPEN STANDBY 0 0 REALTIME VALID 45490 105550 45490 105550 NONE
DATABASE(GRP1_RT_02) APPLY INFO FROM (GRP1_RT_01), REDOS_PARALLEL_NUM (1):
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[45510, 45510, 45511], (RLSN, SLSN, KLSN)[105550, 105550, 105551], N_TSK[0], TSK_MEM_USE[1024]
REDO_LSN_ARR: (105550)
数据库服务器故障模拟
杀死主库进程
root@lxm2:/home/dmdba/.ssh# ps -ef|grep dms
dmdba 641 1 0 15:23 ? 00:00:04 /home/dmdba/dmdbms/bin/dmserver path=/dm8/data2/DMDB/dm.ini -noconsole
root 1240 1169 0 16:16 pts/0 00:00:00 grep dms
root@lxm2:/home/dmdba/.ssh# kill -9 641
确认监视器自动切换,后守护进程又将主库拉起来
[monitor] 2022-07-04 16:16:50: 实例GRP1_RT_01[PRIMARY, OPEN, ISTAT_SAME:TRUE]故障
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 16:16:50 STARTUP ERROR GRP1_RT_01 OPEN PRIMARY VALID 6 106029 106030
[monitor] 2022-07-04 16:16:50: 守护进程(GRP1_RT_01)状态切换 [OPEN-->STARTUP]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 16:16:50 STARTUP ERROR GRP1_RT_01 OPEN PRIMARY VALID 6 106029 106030
[monitor] 2022-07-04 16:16:50: 检测到PRIMARY实例故障,开始对组(GRP1)执行自动接管
[monitor] 2022-07-04 16:16:50: 通知组(GRP1)当前活动的守护进程设置MID
[monitor] 2022-07-04 16:16:51: 通知组(GRP1)当前活动的守护进程设置MID成功
[monitor] 2022-07-04 16:16:51: 开始使用实例GRP1_RT_02接管
[monitor] 2022-07-04 16:16:51: 通知守护进程GRP1_RT_02切换TAKEOVER状态
[monitor] 2022-07-04 16:16:51: 守护进程(GRP1_RT_02)状态切换 [OPEN-->TAKEOVER]
[monitor] 2022-07-04 16:16:52: 切换守护进程GRP1_RT_02为TAKEOVER状态成功
[monitor] 2022-07-04 16:16:52: 实例GRP1_RT_02开始执行SP_SET_GLOBAL_DW_STATUS(0, 7)语句
[monitor] 2022-07-04 16:16:52: 实例GRP1_RT_02执行SP_SET_GLOBAL_DW_STATUS(0, 7)语句成功
[monitor] 2022-07-04 16:16:52: 实例GRP1_RT_02开始执行SP_APPLY_KEEP_PKG()语句
[monitor] 2022-07-04 16:16:52: 实例GRP1_RT_02执行SP_APPLY_KEEP_PKG()语句成功
[monitor] 2022-07-04 16:16:52: 实例GRP1_RT_02开始执行ALTER DATABASE MOUNT语句
[monitor] 2022-07-04 16:16:53: 实例GRP1_RT_02执行ALTER DATABASE MOUNT语句成功
[monitor] 2022-07-04 16:16:53: 实例GRP1_RT_02开始执行ALTER DATABASE PRIMARY语句
[monitor] 2022-07-04 16:16:53: 实例GRP1_RT_02执行ALTER DATABASE PRIMARY语句成功
[monitor] 2022-07-04 16:16:53: 通知实例GRP1_RT_02修改所有归档状态无效
[monitor] 2022-07-04 16:16:53: 修改所有实例归档为无效状态成功
[monitor] 2022-07-04 16:16:53: 实例GRP1_RT_02开始执行ALTER DATABASE OPEN FORCE语句
[monitor] 2022-07-04 16:16:53: 实例GRP1_RT_02执行ALTER DATABASE OPEN FORCE语句成功
[monitor] 2022-07-04 16:16:53: 实例GRP1_RT_02开始执行SP_SET_GLOBAL_DW_STATUS(7, 0)语句
[monitor] 2022-07-04 16:16:53: 实例GRP1_RT_02执行SP_SET_GLOBAL_DW_STATUS(7, 0)语句成功
[monitor] 2022-07-04 16:16:53: 通知守护进程GRP1_RT_02切换OPEN状态
[monitor] 2022-07-04 16:16:53: 守护进程(GRP1_RT_02)状态切换 [TAKEOVER-->OPEN]
[monitor] 2022-07-04 16:16:54: 切换守护进程GRP1_RT_02为OPEN状态成功
[monitor] 2022-07-04 16:16:54: 通知组(GRP1)的守护进程执行清理操作
[monitor] 2022-07-04 16:16:54: 清理守护进程(GRP1_RT_01)请求成功
[monitor] 2022-07-04 16:16:54: 清理守护进程(GRP1_RT_02)请求成功
[monitor] 2022-07-04 16:16:54: 使用实例GRP1_RT_02接管成功
[monitor] 2022-07-04 16:16:54: 组(GRP1)使用实例GRP1_RT_02自动接管成功
[monitor] 2022-07-04 16:17:03: 实例GRP1_RT_01[PRIMARY, MOUNT, ISTAT_SAME:TRUE]恢复正常
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 16:17:02 STARTUP OK GRP1_RT_01 MOUNT PRIMARY VALID 6 106030 106030
[monitor] 2022-07-04 16:17:03: 守护进程(GRP1_RT_01)状态切换 [STARTUP-->OPEN]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 16:17:03 OPEN OK GRP1_RT_01 OPEN STANDBY INVALID 6 106030 106030
[monitor] 2022-07-04 16:17:04: 守护进程(GRP1_RT_02)状态切换 [OPEN-->RECOVERY]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 16:17:03 RECOVERY OK GRP1_RT_02 OPEN PRIMARY VALID 7 108574 108585
[monitor] 2022-07-04 16:17:07: 守护进程(GRP1_RT_02)状态切换 [RECOVERY-->OPEN]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 16:17:06 OPEN OK GRP1_RT_02 OPEN PRIMARY VALID 7 108595 108598
手动切换恢复原主备位置
switchover GRP1_RT_01
[monitor] 2022-07-04 16:18:47: 未登录监视器或服务器公钥发生变化,请重新登录!
login
用户名:SYSDBA
密码:
[monitor] 2022-07-04 16:18:59: 登录监视器成功!
switchover GRP1_RT_01
[monitor] 2022-07-04 16:19:05: 开始切换实例GRP1_RT_01
[monitor] 2022-07-04 16:19:05: 通知守护进程GRP1_RT_02切换SWITCHOVER状态
[monitor] 2022-07-04 16:19:05: 守护进程(GRP1_RT_02)状态切换 [OPEN-->SWITCHOVER]
[monitor] 2022-07-04 16:19:06: 切换守护进程GRP1_RT_02为SWITCHOVER状态成功
[monitor] 2022-07-04 16:19:06: 通知守护进程GRP1_RT_01切换SWITCHOVER状态
[monitor] 2022-07-04 16:19:06: 守护进程(GRP1_RT_01)状态切换 [OPEN-->SWITCHOVER]
[monitor] 2022-07-04 16:19:06: 切换守护进程GRP1_RT_01为SWITCHOVER状态成功
[monitor] 2022-07-04 16:19:06: 实例GRP1_RT_02开始执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句
[monitor] 2022-07-04 16:19:06: 实例GRP1_RT_02执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句成功
[monitor] 2022-07-04 16:19:06: 实例GRP1_RT_01开始执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句
[monitor] 2022-07-04 16:19:06: 实例GRP1_RT_01执行SP_SET_GLOBAL_DW_STATUS(0, 6)语句成功
[monitor] 2022-07-04 16:19:06: 实例GRP1_RT_02开始执行ALTER DATABASE MOUNT语句
[monitor] 2022-07-04 16:19:07: 实例GRP1_RT_02执行ALTER DATABASE MOUNT语句成功
[monitor] 2022-07-04 16:19:07: 实例GRP1_RT_01开始执行SP_APPLY_KEEP_PKG()语句
[monitor] 2022-07-04 16:19:07: 实例GRP1_RT_01执行SP_APPLY_KEEP_PKG()语句成功
[monitor] 2022-07-04 16:19:07: 实例GRP1_RT_01开始执行ALTER DATABASE MOUNT语句
[monitor] 2022-07-04 16:19:07: 实例GRP1_RT_01执行ALTER DATABASE MOUNT语句成功
[monitor] 2022-07-04 16:19:07: 实例GRP1_RT_02开始执行ALTER DATABASE STANDBY语句
[monitor] 2022-07-04 16:19:07: 实例GRP1_RT_02执行ALTER DATABASE STANDBY语句成功
[monitor] 2022-07-04 16:19:07: 实例GRP1_RT_01开始执行ALTER DATABASE PRIMARY语句
[monitor] 2022-07-04 16:19:08: 实例GRP1_RT_01执行ALTER DATABASE PRIMARY语句成功
[monitor] 2022-07-04 16:19:08: 通知实例GRP1_RT_01修改所有归档状态无效
[monitor] 2022-07-04 16:19:08: 修改所有实例归档为无效状态成功
[monitor] 2022-07-04 16:19:08: 实例GRP1_RT_02开始执行ALTER DATABASE OPEN FORCE语句
[monitor] 2022-07-04 16:19:08: 实例GRP1_RT_02执行ALTER DATABASE OPEN FORCE语句成功
[monitor] 2022-07-04 16:19:08: 实例GRP1_RT_01开始执行ALTER DATABASE OPEN FORCE语句
[monitor] 2022-07-04 16:19:09: 实例GRP1_RT_01执行ALTER DATABASE OPEN FORCE语句成功
[monitor] 2022-07-04 16:19:09: 实例GRP1_RT_02开始执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句
[monitor] 2022-07-04 16:19:09: 实例GRP1_RT_02执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句成功
[monitor] 2022-07-04 16:19:09: 实例GRP1_RT_01开始执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句
[monitor] 2022-07-04 16:19:09: 实例GRP1_RT_01执行SP_SET_GLOBAL_DW_STATUS(6, 0)语句成功
[monitor] 2022-07-04 16:19:09: 通知守护进程GRP1_RT_02切换OPEN状态
[monitor] 2022-07-04 16:19:09: 守护进程(GRP1_RT_02)状态切换 [SWITCHOVER-->OPEN]
[monitor] 2022-07-04 16:19:09: 切换守护进程GRP1_RT_02为OPEN状态成功
[monitor] 2022-07-04 16:19:09: 通知守护进程GRP1_RT_01切换OPEN状态
[monitor] 2022-07-04 16:19:10: 守护进程(GRP1_RT_01)状态切换 [SWITCHOVER-->OPEN]
[monitor] 2022-07-04 16:19:10: 切换守护进程GRP1_RT_01为OPEN状态成功
[monitor] 2022-07-04 16:19:10: 通知组(GRP1)的守护进程执行清理操作
[monitor] 2022-07-04 16:19:10: 清理守护进程(GRP1_RT_01)请求成功
[monitor] 2022-07-04 16:19:10: 清理守护进程(GRP1_RT_02)请求成功
[monitor] 2022-07-04 16:19:10: 实例GRP1_RT_01切换成功
2022-07-04 16:19:10
#================================================================================#
GROUP OGUID MON_CONFIRM MODE MPP_FLAG
GRP1 453331 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
8.142.141.128 52141 2022-07-04 16:19:09 GLOBAL VALID OPEN GRP1_RT_01 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
8.142.141.128 5236 OK GRP1_RT_01 OPEN PRIMARY 0 0 REALTIME VALID 46127 112286 46127 112286 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
39.103.139.80 52142 2022-07-04 16:19:09 GLOBAL VALID OPEN GRP1_RT_02 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
39.103.139.80 5236 OK GRP1_RT_02 OPEN STANDBY 0 0 REALTIME INVALID 46125 109840 46125 109840 NONE
DATABASE(GRP1_RT_02) APPLY INFO FROM (GRP1_RT_01), REDOS_PARALLEL_NUM (1):
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[46125, 46125, 46125], (RLSN, SLSN, KLSN)[109840, 109840, 109840], N_TSK[0], TSK_MEM_USE[0]
REDO_LSN_ARR: (109840)
#================================================================================#
[monitor] 2022-07-04 16:19:14: 守护进程(GRP1_RT_01)状态切换 [OPEN-->RECOVERY]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 16:19:13 RECOVERY OK GRP1_RT_01 OPEN PRIMARY VALID 8 112287 112287
[monitor] 2022-07-04 16:19:15: 守护进程(GRP1_RT_01)状态切换 [RECOVERY-->OPEN]
WTIME WSTATUS INST_OK INAME ISTATUS IMODE RSTAT N_OPEN FLSN CLSN
2022-07-04 16:19:15 OPEN OK GRP1_RT_01 OPEN PRIMARY VALID 8 112288 112288
show
2022-07-04 16:19:55
#================================================================================#
GROUP OGUID MON_CONFIRM MODE MPP_FLAG
GRP1 453331 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
8.142.141.128 52141 2022-07-04 16:19:54 GLOBAL VALID OPEN GRP1_RT_01 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
8.142.141.128 5236 OK GRP1_RT_01 OPEN PRIMARY 0 0 REALTIME VALID 46142 112301 46142 112301 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
39.103.139.80 52142 2022-07-04 16:19:54 GLOBAL VALID OPEN GRP1_RT_02 OK 1 1 OPEN STANDBY 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
39.103.139.80 5236 OK GRP1_RT_02 OPEN STANDBY 0 0 REALTIME VALID 46125 112300 46125 112300 NONE
DATABASE(GRP1_RT_02) APPLY INFO FROM (GRP1_RT_01), REDOS_PARALLEL_NUM (1):
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[46141, 46141, 46142], (RLSN, SLSN, KLSN)[112300, 112300, 112301], N_TSK[0], TSK_MEM_USE[1024]
REDO_LSN_ARR: (112300)
更多内容请见达梦技术社区:https://eco.dameng.com