赞
踩
主库 dwp 10.200.193.20
备库 dws 10.200.193.74
监控 dwm 10.200.193.78
端口信息
数据库名 实例名 PORT_NUM MAL_INST_DW_PORT MAL_HOST MAL_PORT MAL_DW_PORT
damegndb DMSVR01 5237 45101 10.200.193.20 55101 65101
damegndb DMSVR02 5236 45121 10.200.193.74 55121 65121
1.创建实例(主备)
./dminit path=/dm8/data db_name=damengdb instance_name=DMSVR01 port_num=5237
./dminit path=/dm8/data db_name=damengdb instance_name=DMSVR02 port_num=5236
2.注册服务(主备)
./dm_service_installer.sh -t dmserver -p DMSVR01 -dm_ini /dm8/data/damengdb/dm.ini
./dm_service_installer.sh -t dmserver -p DMSVR02 -dm_ini /dm8/data/damengdb/dm.ini
3.主库导出数据
./dmrman CTLSTMT="BACKUP DATABASE '/dm8/data/damengdb/dm.ini' FULL TO BACKUP_FILE1 BACKUPSET '/dm8/backup/BACKUP_FILE_01'"
4.备库恢复数据
./dmrman CTLSTMT="RESTORE DATABASE '/dm8/data/damengdb/dm.ini' FROM BACKUPSET '/dm8/backup/BACKUP_FILE_01'"
./dmrman CTLSTMT="RECOVER DATABASE '/dm8/data/damengdb/dm.ini' FROM BACKUPSET '/dm8/backup/BACKUP_FILE_01'"
./dmrman CTLSTMT="RECOVER DATABASE '/dm8/data/damengdb/dm.ini' UPDATE DB_MAGIC"
5.主库相关配置
dm.ini
----------
INSTANCE_NAME = DMSVR01
PORT_NUM = 5237
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 = DMSVR01
MAL_HOST = 10.200.193.20
MAL_PORT = 55101
MAL_INST_HOST = 10.200.193.20
MAL_INST_PORT = 5237
MAL_DW_PORT = 65101
MAL_INST_DW_PORT = 45101
[MAL_INST2]
MAL_INST_NAME = DMSVR02
MAL_HOST = 10.200.193.74
MAL_PORT = 55121
MAL_INST_HOST = 10.200.193.74
MAL_INST_PORT = 5236
MAL_DW_PORT = 65121
MAL_INST_DW
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。