MAL_CHECK_INTERVAL = 5
MAL_CONN_FAIL_INTERVAL = 5
[MAL_INST1]
MAL_INST_NAME = GRP1_RT_01
MAL_HOST = 192.168.1.30
MAL_PORT = 55101
MAL_INST_HOST = 192.168.1.30
MAL_INST_PORT = 5246
MAL_DW_PORT = 65101
MAL_INST_DW_PORT = 45101
[MAL_INST2]
MAL_INST_NAME = GRP1_RT_03
MAL_HOST = 192.168.1.20
MAL_PORT = 55121
MAL_INST_HOST = 192.168.1.20
MAL_INST_PORT = 5246
MAL_DW_PORT = 65121
MAL_INST_DW_PORT = 45121
[ARCHIVE_REALTIME]
ARCH_TYPE = REALTIME
ARCH_DEST = GRP1_RT_03
[ARCHIVE_LOCAL1]
ARCH_TYPE = LOCAL
ARCH_DEST = /dm8/arch
ARCH_FILE_SIZE = 128
ARCH_SPACE_LIMIT = 0
[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/GRP1_RT_01/dm.ini
INST_AUTO_RESTART = 1
INST_STARTUP_CMD = /dm8/bin/dmserver
RLOG_SEND_THRESHOLD = 0
RLOG_APPLY_THRESHOLD = 0
3.1.5 启动主库,修改模式
./dmserver /dm8/data/GRP1_RT_01/dm.ini mount
或者
cd /dm8/bin
./DmServiceGRP1_RT_01 mount
./DmServiceDMSERVER start mount
aguid可以随意自定义数字,唯一即可
修改主库的模式和设置oguid。
SQL>SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 1);
SQL>sp_set_oguid(453331);
SQL>alter database primary;
SQL>SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 0);
4、备库参照主库上述参数后,以 Mount 方式启动备库
./dmserver /dm8/data/GRP1_RT_03/dm.ini mount
或者
cd /dm8/bin
./DmServiceGRP1_RT_03 start mount
4.1 设置备库模式和oguid值
SQL>SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 1);
SQL>sp_set_oguid(453331);
SQL>alter database standby;
SQL>SP_SET_PARA_VALUE(1, 'ALTER_MODE_STATUS', 0);
5、监视器配置
--配置dmmonitor.ini
MON_DW_CONFIRM = 1
MON_LOG_PATH = /dm8/data/log
MON_llLOG_INTERVAL = 60
MON_LOG_FILE_SIZE = 32
MON_LOG_SPACE_LIMIT = 0
[GRP1]
MON_INST_OGUID = 453331
MON_DW_IP = 192.168.1.30:65101
MON_DW_IP = 192.168.1.20:65121
6、启主备库的守护进程
6.1启主库守护进程
[dmdba@/dm8/bin]#./dmwatcher /dm8/data/GRP1_RT_01/dmwatcher.ini
6.2启备库守护进程
[dmdba@/dm8/bin]#./dmwatcher /dm8/data/GRP1_RT_03/dmwatcher.ini
7、登录监视器进行主备切换测试
./dmmonitor /dm8/dmmonitor.ini进去dmmonitor管理界面
执行Switchover切换指令
8、注册服务(选择项)
8.1 注册监视器服务(也可以不注册)
/dm8/script/root/dm_service_installer.sh -t dmmonitor -p ITSM_DB -monitor_ini /dm8/dmmonitor.ini
8.2 守护进程注册服务
8.2.1注册主库的守护进程
[root@~]# /dm8/script/root/dm_service_installer.sh -t dmwatcher -p Watcher -watcher_ini /dm8/data/GRP1_RT_01/dmwatcher.ini
8.2.2注册备库的守护进程
[root@~]# /dm8/script/root/dm_service_installer.sh -t dmwatcher -p Watcher -watcher_ini /dm8/data/GRP1_RT_03/dmwatcher.ini
文章
阅读量
获赞