暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

关于dmserver使用的一些窍门

原创 始于脚下 2021-11-26
1583

达梦数据库提供dmserver应用程序来启动数据库(不止可以使用dmserver方式启动),首先,我们通过help来看看dmserver的帮助信息。

E:\dmdbms\bin>dmserver -h

Invalid input -h

格式: dmserver.exe [ini_file_path] [-noconsole] [mount] [path=ini_file_path] [dcr_ini=dcr_path]

 

例程:

dmserver.exe path=d:\dmdbms\bin\dm.ini

dmserver.exe d:\dmdbms\bin\dm.ini

 

关键字             说明

--------------------------------------------------------------------------------

path               dm.ini绝对路径或者dmserver当前目录的dm.ini

dcr_ini            如果使用css集群环境,指定dmdcr.ini文件路径

-noconsole         以服务方式启动

mount              配置方式启动

help               打印帮助信息

 

E:\dmdbms\bin>
复制


从输出的信息来看,帮助信息提供了非常详细的数据库启动方式及参数说明,当达梦数据库在使用dmserver在前台启动数据库且启动时未使用-noconsole参数时,可以在前台启动窗口输入dmserver的操作命令,来查看数据库当前的一些资源信息,如当前数据库锁信息、事物等待信息、连接数等,还可以通过ckpt设置监测点,debug命令打开debug模式,详细操作过程如下所示(注:由于本环境为测试环境,没有业务量,仅用来展示用法)。

E:\dmdbms\bin>dmserver E:\dmdbms\data\DAMENG\dm.ini

file dm.key not found, use default license!

version info: develop

DM Database Server x64 V8 1-1-56-19.12.23-117493-ENT  startup...

Database mode = 0, oguid = 0

License will expire on 2021-12-10

begin redo pwr log collect, last ckpt lsn: 1081032 ...

redo pwr log collect finished

main rfil[E:\dmdbms\data\DAMENG\DAMENG01.log]'s grp collect 0 valid pwr record, discard 79 invalid pwr record

EP[0]'s cur_lsn[1096095]

begin redo log recover, last ckpt lsn: 1081032 ...

redo log recover finished

ndct db load finished

ndct fill fast pool finished

iid page's trxid[223334]

NEXT TRX ID = 223335

pseg_collect_items, collect 0 active_trxs, 0 cmt_trxs, 0 pre_cmt_trxs, 0 active_pages, 0 cmt_pages, 0 pre_cmt_pages

pseg_process_collect_items end, 0 active trx, 0 active pages, 0 committed trx, 0 committed pages

total 0 active crash trx, pseg_crash_trx_rollback begin ...

pseg_crash_trx_rollback end

purg2_crash_cmt_trx end, total 0 page purged

pseg recv finished

nsvr_startup end.

aud sys init success.

aud rt sys init success.

systables desc init success.

ndct_db_load_info success.

nsvr_process_before_open begin.

nsvr_process_before_open success.

total 0 active crash trx, pseg_crash_trx_rollback begin ...

pseg_crash_trx_rollback end

SYSTEM IS READY.

lock

----------------- object lock info ---------------

    addr       objid       mode      trx      wait

>> 0 object locks.

 

------------------- tid lock info ----------------

    addr       objid       mode      trx      wait

>> 0 object locks.

 

-----------------outer object lock info (dbms_lock)---------------

    addr       objid       mode      sess      wait_sess

trx

------------ trx info ------------

   addr    id    active_ids      state        iso_level  read_only   session

>> 0 transactions, 0 active.

 

mem

os reserved: 169929448

mem pool:484441984 reserved: 441907584  reserved from os: 277086208

hio rlog_flush use time:0(us), io use time:0(us)

session

sessions number: 0

msessions number: 0

n_freeing: 0

max_concurrent_trx: 0

concurrent_trx_mode: 0

curr_concurrent_trx: 0

n wait trx: 0

buf

 

total pages = 209141

 

rlog4_log_get call: 0

rlog4_log_write call: 0

rfil_grp_space_info call: 0

fast rw lock mode: 1

ckpt

checkpoint requested, rlog free space, used space is (803028480, 2265600)

ckpt_lsn, ckpt_fil, ckpt_off are set as (1082827, 0, 119978496)

checkpoint: 160 pages flushed.

checkpoint finished, rlog free space, used space is (802990592, 2303488)

debug

svr_log single mode enabled

exit

Server is stopping...

listener closed  and all sessions disconnected

purge undo records in usegs...OK

full check point starting...

generate force checkpoint, rlog free space[802990592], used space[2303488]

ckpt_lsn, ckpt_fil, ckpt_off are set as (1085755, 0, 119978496)

checkpoint: 1777 pages flushed.

checkpoint finished, rlog free space, used space is (802982912, 2311168)

full check point end.

shutdown audit subsystem...OK

shutdown schedule subsystem...OK

shutdown timer successfully.

pre-shutdown MAL subsystem...OK

shutdown worker threads subsystem...OK

shutdown local parallel threads pool successfully.

shutdown replication subsystem...OK

shutdown sequence cache subsystem...OK

wait for mtsk link worker to exit..OK

shutdown mpp session subsystem...OK

wait for rapply is all over... OK

rapply worker threads exit successfully.

pre ending task & worker threads...OK

shutdown dblink subsystem...OK

shutdown session subsystem...OK

shutdown rollback segments purging subsystem...OK

shutdown rps subsystem...OK

shutdown transaction subsystem...OK

shutdown locking subsystem...OK

shutdown dbms_lock subsystem...OK

ending tsk and worker threads...OK

ckpt2_exec_immediately begin.

ckpt_lsn, ckpt_fil, ckpt_off are set as (1101263, 0, 122289664)

checkpoint: 0 pages flushed.

checkpoint finished, rlog free space, used space is (805238272, 55808)

ckpt_lsn, ckpt_fil, ckpt_off are set as (1101601, 0, 122345472)

checkpoint: 0 pages flushed.

checkpoint finished, rlog free space, used space is (805294080, 0)

ckpt_lsn, ckpt_fil, ckpt_off are set as (1101601, 0, 122345472)

checkpoint: 0 pages flushed.

checkpoint finished, rlog free space, used space is (805294080, 0)

shutdown archive subsystem...OK

shutdown redo log subsystem...OK

shutdown MAL subsystem...OK

shutdown message compress subsystem successfully.

shutdown task subsystem...OK

shutdown trace subsystem...OK

shutdown svr_log subsystem...OK

shutdown plan cache subsystem...OK

shutdown file subsystem...OK

shutdown database dictionary subsystem...OK

shutdown mac cache subsystem...OK

shutdown dynamic login cache subsystem...OK

shutdown ifun/bifun/sfun/afun cache subsystem...OK

shutdown crypt subsystem...OK

shutdown pipe subsystem...OK

shutdown compress component...OK

shutdown slave redo subsystem...OK

shutdown kernel buffer subsystem...OK

shutdown SQL capture subsystem...OK

shutdown control file system...OK

shutdown dtype subsystem...OK

shutdown huge buffer and memory pools...OK

close lsnr socket

DM Database Server shutdown successfully.

 

E:\dmdbms\bin>
复制


 

附:Dmserver 控制台支持的命令

命令

操作

EXIT

退出服务器

LOCK

打印锁系统信息

TRX

打印等待事务信息

CKPT

设置检查点

BUF

打印内存池中缓冲区的信息

MEM

打印服务器占用内存大小

SESSION

打印连接个数

DEBUG

打开 DEBUG 模式

 

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论