[dmdba@ops-prod-dsc1-1 bin]$ ps -ef|grep css
dmdba 1440 1 0 Oct17 ? 03:03:55 /data/businessServer/dmdbms/bin/dmcss dcr_ini=/data/businessServer/dsc0/config/dmdcr.ini -noconsole
dmdba 664398 660255 0 09:26 pts/0 00:00:00 grep --color=auto css
[dmdba@ops-prod-dsc1-1 bin]$ ps -ef|grep asm
dmdba 1861 1 0 Oct17 ? 00:46:53 /data/businessServer/dmdbms/bin/dmasmsvr dcr_ini=/data/businessServer/dsc0/config/dmdcr.ini -noconsole
dmdba 664415 660255 0 09:26 pts/0 00:00:00 grep --color=auto asm
[dmdba@ops-prod-dsc1-1 bin]$ ./dmasmcmd
DMASMCMD V8
ASM>listdisks '/dev'
[/dev/cdrom]: Open failed
[/dev/dm-2]: Open failed
[/dev/raw1]: Used ASM disk, name:[DMASMdcr], size:[100M], group_id:[126], disk_id:[0]
[/dev/raw4]: Used ASM disk, name:[DMASMDATA0], size:[2097151M], group_id:[1], disk_id:[0]
[/dev/raw3]: Used ASM disk, name:[DMASMLOG0], size:[20479M], group_id:[0], disk_id:[0]
[/dev/raw2]: Used ASM disk, name:[DMASMvote], size:[200M], group_id:[125], disk_id:[0]
[/dev/dm-1]: Open failed
[/dev/dm-0]: Open failed
[/dev/sr0]: Open failed
[/dev/sda5]: Open failed
[/dev/sda4]: Open failed
[/dev/sda3]: Open failed
[/dev/sda2]: Open failed
[/dev/sda1]: Open failed
[/dev/sdd]: Used ASM disk, name:[DMASMvote], size:[200M], group_id:[125], disk_id:[0]
[/dev/sdf]: Used ASM disk, name:[DMASMDATA0], size:[2097151M], group_id:[1], disk_id:[0]
[/dev/sde]: Used ASM disk, name:[DMASMLOG0], size:[20479M], group_id:[0], disk_id:[0]
[/dev/sdc]: Open failed
[/dev/sdb]: Used ASM disk, name:[DMASMdcr], size:[100M], group_id:[126], disk_id:[0]
[/dev/sda]: Open failed
Used time: 16.835(ms).
ASM>exit
[dmdba@ops-prod-dsc1-1 ~]$ cd /data/businessServer/
[dmdba@ops-prod-dsc1-1 businessServer]$ ls
dmbak dmdbms dsc0 dsc1 monitor
[dmdba@ops-prod-dsc1-1 businessServer]$ cd dsc0/
[dmdba@ops-prod-dsc1-1 dsc0]$ ls
arch_0 arch_0_remote config config0
[dmdba@ops-prod-dsc1-1 dsc0]$
[dmdba@ops-prod-dsc1-1 dsc0]$
[dmdba@ops-prod-dsc1-1 dsc0]$ cd config
[dmdba@ops-prod-dsc1-1 config]$ ls
dmasvrmal.ini dmdcr_cfg.ini dmdcr.ini dminit.ini dminit.ini.bak dmmal.ini
[dmdba@ops-prod-dsc1-1 config]$
[dmdba@ops-prod-dsc1-1 config]$ cat dminit.ini
db_name = dsc
system_path = +DMDATA/data
main = +DMDATA/data/dsc/main.dbf
main_size = 128
roll = +DMDATA/data/dsc/roll.dbf
roll_size = 128
system = +DMDATA/data/dsc/system.dbf
system_size = 128
ctl_path = +DMDATA/data/dsc/dm.ctl
ctl_size = 8
log_size = 2048
dcr_path = /dev/raw1
dcr_seqno = 0
auto_overwrite = 1
PAGE_SIZE = 32
EXTENT_SIZE = 32
CASE_SENSITIVE = 0
CHARSET = 0
[DSC0]
config_path = /data/businessServer/dsc0/config0
port_num = 5236
mal_host = 192.168.1.1
mal_port = 5736
log_path = +DMLOG/log/dsc0_log01.log
log_path = +DMLOG/log/dsc0_log02.log
[DSC1]
config_path = /data/businessServer/dsc1/config1
port_num = 5236
mal_host = 192.168.1.2
mal_port = 5737
log_path = +DMLOG/log/dsc1_log01.log
log_path = +DMLOG/log/dsc1_log02.log
[dmdba@ops-prod-dsc1-1 config]$
##修改 CHARSET参数为0,原先为1
注:CHARSET = 0#字符集(0),可选值:0[GB18030],1[UTF-8],2[EUC-KR]
[dmdba@ops-prod-dsc1-1 bin]$ ./dminit control=/data/businessServer/dsc0/config/dminit.ini
initdb V8
db version: 0x7000c
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
log file path: +DMLOG/log/dsc0_log01.log
log file path: +DMLOG/log/dsc0_log02.log
log file path: +DMLOG/log/dsc1_log01.log
log file path: +DMLOG/log/dsc1_log02.log
FILE "/data/businessServer/dsc0/config0/dm.ini" has already existed
FILE "/data/businessServer/dsc0/config0/sqllog.ini" has already existed
FILE "/data/businessServer/dsc1/config1/dm.ini" has already existed
FILE "/data/businessServer/dsc1/config1/sqllog.ini" has already existed
FILE "+DMDATA/data/dsc/system.dbf" has already existed
FILE "+DMDATA/data/dsc/roll.dbf" has already existed
FILE "+DMDATA/data/dsc/main.dbf" has already existed
FILE "+DMDATA/data/dsc/dm.ctl" has already existed
FILE "+DMLOG/log/dsc0_log01.log" has already existed
FILE "+DMLOG/log/dsc0_log02.log" has already existed
FILE "+DMLOG/log/dsc1_log01.log" has already existed
FILE "+DMLOG/log/dsc1_log02.log" has already existed
write to dir [+DMDATA/data/dsc].
file: +DMLOG/log/dsc1_log01.log overwrite failed
create rlog file +DMLOG/log/dsc1_log01.log failed, code: -1.
You may get more details in file ../log/dm_DSC0_202212.log
fail to init db.
##报错:覆写失败,文件已存在
file: +DMLOG/log/dsc1_log01.log overwrite failed
create rlog file +DMLOG/log/dsc1_log01.log failed, code: -1.
FILE "/data/businessServer/dsc0/config0/dm.ini" has already existed
FILE "/data/businessServer/dsc0/config0/sqllog.ini" has already existed
FILE "/data/businessServer/dsc1/config1/dm.ini" has already existed
FILE "/data/businessServer/dsc1/config1/sqllog.ini" has already existed
FILE "+DMDATA/data/dsc/system.dbf" has already existed
FILE "+DMDATA/data/dsc/roll.dbf" has already existed
FILE "+DMDATA/data/dsc/main.dbf" has already existed
FILE "+DMDATA/data/dsc/dm.ctl" has already existed
FILE "+DMLOG/log/dsc0_log01.log" has already existed
FILE "+DMLOG/log/dsc0_log02.log" has already existed
FILE "+DMLOG/log/dsc1_log01.log" has already existed
FILE "+DMLOG/log/dsc1_log02.log" has already existed
##解决方法:将之前的对应文件删除
##生产环境谨慎操作 !!!!!
##生产环境谨慎操作 !!!!!
##生产环境谨慎操作 !!!!!
##会丢数据,可先备份再还原。
[dmdba@ops-prod-dsc1-1 bin]$ ./dmasmtool DCR_INI=/data/businessServer/dsc0/config/dmdcr.ini
DMASMTOOL V8
ASM>
ASM>
ASM>
ASM>
ASM>
ASM>ls
+
disk groups total [4]......
NO.1 name: DMLOG
NO.2 name: DMDATA
NO.3 name: VOTE
NO.4 name: DCR
Used time: 2.046(ms).
ASM>
ASM>cd DMDATA
+DMDATA
Used time: 1.183(ms).
ASM>rm -rf data
Used time: 88.325(ms).
ASM>
ASM>
ASM>cd ..
Used time: 1.207(ms).
ASM>ls
+
disk groups total [4]......
NO.1 name: DMLOG
NO.2 name: DMDATA
NO.3 name: VOTE
NO.4 name: DCR
Used time: 1.191(ms).
ASM>cd DMLOG
+DMLOG
Used time: 1.215(ms).
ASM>ls
dir : log
total count 1.
Used time: 0.995(ms).
ASM>rm -rf log
Used time: 28.178(ms).
[dmdba@ops-prod-dsc1-1 bin]$ ./dminit control=/data/businessServer/dsc0/config/dminit.ini
initdb V8
db version: 0x7000c
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
log file path: +DMLOG/log/dsc0_log01.log
log file path: +DMLOG/log/dsc0_log02.log
log file path: +DMLOG/log/dsc1_log01.log
log file path: +DMLOG/log/dsc1_log02.log
FILE "/data/businessServer/dsc0/config0/dm.ini" has already existed
FILE "/data/businessServer/dsc0/config0/sqllog.ini" has already existed
FILE "/data/businessServer/dsc1/config1/dm.ini" has already existed
FILE "/data/businessServer/dsc1/config1/sqllog.ini" has already existed
write to dir [+DMDATA/data/dsc].
create dm database success. 2022-12-22 10:26:48
文章
阅读量
获赞