达梦数据库DM8启动与关闭

第一种:前台服务的方式启动和关闭数据库(dmdba用户)
1.启动服务
[dmdba@dmdb02 ~]$ /dm8/dmdbms/bin/dmserver /dm8/dmdbms/data/dm02/dm.ini 
file dm.key not found, use default license!
version info: develop
DM Database Server x64 V8 1-2-84-21.10.21-149328-10032-ENT  startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2022-10-21
file lsn: 65329
ndct db load finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
iid page's trxid[20677]
NEXT TRX ID = 20678
pseg_collect_mgr_items, total collect 0 active_trxs, 0 cmt_trxs, 0 pre_cmt_trxs, 0 active_pages, 0 cmt_pages, 0 pre_cmt_pages, 0 mgr pages, 0 mgr recs!
iid page's trxid[21679]
NEXT TRX ID = 22681.
total 0 active crash trx, pseg_crash_trx_rollback sys_only(0) begin ...
pseg_crash_trx_rollback end, total 0 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
pseg_crash_trx_rollback end
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 sys_only(0) begin ...
pseg_crash_trx_rollback end, total 0 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
pseg_crash_trx_rollback end
SYSTEM IS READY.

2.关闭服务  --输入exit 或者 ctrl+c 即可断开
exit
Server is stopping...
listener closed  and all sessions disconnected
adjust undo_retention & wakeup purge thread...full check point starting...
generate force checkpoint, rlog free space[536603648], used space[259072]
checkpoint begin, used_space[259072], free_space[536603648]...
checkpoint end, 857 pages flushed, used_space[268800], free_space[536593920].
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.
checkpoint begin, used_space[268800], free_space[536593920]...
checkpoint end, 0 pages flushed, used_space[20992], free_space[536841728].
checkpoint begin, used_space[20992], free_space[536841728]...
checkpoint end, 0 pages flushed, used_space[0], free_space[536862720].
checkpoint begin, used_space[0], free_space[536862720]...
checkpoint end, 0 pages flushed, used_space[0], free_space[536862720].
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.
[dmdba@dmdb02 ~]$ 


第二种:操作系统层面注册服务的方式(root用户)
1.启动数据库
[root@dmdb01 ~]# systemctl start DmServicedm1
[root@dmdb01 ~]# systemctl status DmServicedm1
● DmServicedm1.service - DM Instance Service(DmServicedm1).
   Loaded: loaded (/usr/lib/systemd/system/DmServicedm1.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-04-14 20:16:46 CST; 24s ago
  Process: 2789 ExecStart=/dm8/dmdbms/bin/DmServicedm1 start (code=exited, status=0/SUCCESS)
 Main PID: 2813 (dmserver)
   CGroup: /system.slice/DmServicedm1.service
           └─2813 /dm8/dmdbms/bin/dmserver path=/dm8/dmdbms/data/dm/dm.ini -noconsole

Apr 14 20:16:31 dmdb01 systemd[1]: Starting DM Instance Service(DmServicedm1)....
Apr 14 20:16:46 dmdb01 DmServicedm1[2789]: [34B blob data]
Apr 14 20:16:46 dmdb01 systemd[1]: Started DM Instance Service(DmServicedm1)..
[root@dmdb01 ~]# 

2. 关闭数据库
[root@dmdb01 ~]# systemctl stop DmServicedm1

第三种:dmdba用户使用服务的方式启动和关闭数据库
1. 启动数据库
[dmdba@dmdb02 ~]$ /dm8/dmdbms/bin/DmServicedm02 start
Starting DmServicedm02:                                    [ OK ]
[dmdba@dmdb02 ~]$ 
或者
[dmdba@dmdb02 ~]$ cd $DM_HOME/bin
[dmdba@dmdb02 bin]$ ./DmServicedm02 start
Starting DmServicedm02:                                    [ OK ]
[dmdba@dmdb02 bin]$ 

2. 关闭数据库
[dmdba@dmdb02 ~]$ /dm8/dmdbms/bin/DmServicedm02 stop
Stopping DmServicedm02:                                    [ OK ]
[dmdba@dmdb02 ~]$ 
或者
[dmdba@dmdb02 ~]$ cd $DM_HOME/bin
[dmdba@dmdb02 bin]$ ./DmServicedm02 stop
Stopping DmServicedm02:                                    [ OK ]
[dmdba@dmdb02 ~]$ 

第四种:dmdba用户调取DM服务查看器

[dmdba@dmdb02 tool]$ ./dmservice.sh 

1.启动数据库

2. 关闭数据库

达梦技术社区:https://eco.dameng.com

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值