页大小:16K
簇大小:16 页
字符集:UTF-8
字符串比较大小写敏感:是
长度以字符为单位:否
数据库名: test01
实例名: test01, test02
端口:15236,25236,35236
日志文件大小:共2 个(每个256MB)
是否启用归档:启用
上传安装程序
root:
mount /dev/cdrom /mnt
umount /mnt
mount -o loop /dm/dmdbms/dm8_20220720_x86_rh7_64_ent_8.1.2.114_pack11 /mnt
DM数据库安装
192.168.121.232/233
cd /mnt
./DMInstall.bin -i
root:
/dm/dmdbms/dm8/script/root/root_installer.sh
[dmdba@test01 ~]$ cd /dm/dmdbms/dm8/bin
./dminit path=/dm/dmdata db_name=dmtest instance_name=dmtest01 port_num=15236 LOG_SIZE=256 SYSDBA_PWD=dameng123 EXTENT_SIZE=16 PAGE_SIZE=16 charset=1
./dmserver /dm/dmdata/dmtest/dm.ini &
ALTER DATABASE MOUNT;
ALTER DATABASE ADD ARCHIVELOG 'DEST=/dm/dmarch/dmtest,TYPE = local,FILE_SIZE=256,SPACE_LIMIT = 0';
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
select arch_mode from v$database;
select * from v$dm_arch_ini;
备份主库,然后复制备份到备库
关库
DmServicedmtest01 stop
备份
cd /dm/dmdbms/dm8/bin
./dmrman
backup database '/dm/dmdata/dmtest/dm.ini' full to dmtest01_full01 backupset '/dm/dmback/dmtest01_full01'
scp -r /dm/dmback/dmtest01_full01 192.168.121.233:/dm/dmback/dmtest01_full01
su - dmdba
cd /dm/dmdbms/dm8/bin
./dminit path=/dm/dmdata db_name=dmtest instance_name=dmtest02 port_num=25236 LOG_SIZE=256 SYSDBA_PWD=dameng123 EXTENT_SIZE=16 PAGE_SIZE=16 charset=1
./dmrman
restore database '/dm/dmdata/dmtest/dm.ini' from backupset '/dm/dmback/dmtest01_full01'
recover database '/dm/dmdata/dmtest/dm.ini' from backupset '/dm/dmback/dmtest01_full01'
recover database '/dm/dmdata/dmtest/dm.ini' update db_magic
su - dmdba
cd /dm/dmdata/dmtest
vi dm.ini
INSTANCE_NAME =dmtest01 #主库实例
PORT_NUM = 15236 #数据库实例监听端口
DW_PORT = 15237 #守护环境下,监听守护进程连接端口,为上面规划表中的MAL_INST_DW_PORT 值
DW_ERROR_TIME = 60 #接收守护进程消息超时时间
ALTER_MODE_STATUS = 0 #不允许手工方式修改实例模式/状态
ENABLE_OFFLINE_TS = 2 #不允许备库OFFLINE 表空间
MAL_INI = 1 #打开MAL 系统
ARCH_INI = 1 #打开归档配置
RLOG_SEND_APPLY_MON = 64 #统计最近64 次的日志发送信息
DW_ERROR_TIME = 60 #接收守护进程消息超时时间
HA_INST_CHECK_FLAG = 1 #检测是否多个实例进程同时启动
vi dmmal.ini
MAL_CHECK_INTERVAL = 5 #MAL 链路检测时间间隔
MAL_CONN_FAIL_INTERVAL = 5 #判定MAL 链路断开的时间
[MAL_INST1]
MAL_INST_NAME =dmtest01 # 实例名, 和dm.ini 中的INSTANCE_NAME 一致
MAL_HOST = 192.168.121.232 #MAL 系统监听TCP 连接的IP 地址
MAL_PORT = 15239