达梦数据库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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Windows操作系统上,有多种方式可以启动关闭达梦数据库(DM数据库)。首先,可以使用菜单方式启动关闭DM数据库。在开始菜单中选择DM服务查看器,可以启动关闭数据库实例。另外,也可以使用Windows服务方式来启动关闭DM数据库。在Windows服务中,会有一个与DM实例名对应的服务,可以通过服务控制台来启动关闭数据库。此外,还可以使用命令行方式来启动关闭DM数据库。在DM安装目录的bin目录下,可以直接打开dmserver应用程序来启动数据库,或者在命令提示符工具中执行dmserver命令来启动数据库。需要注意的是,命令行方式是前台启动数据库。\[1\] 对于Linux系统,启动关闭DM数据库的方式与Windows类似。可以使用菜单方式,在开始菜单中选择启动服务器菜单项来启动数据库。另外,也可以使用Linux服务方式,在/etc/rc.d/init.d目录下找到以DmService开头的文件,文件名为DmService+实例名,通过执行相应的命令来启动关闭数据库。此外,还可以使用命令行方式,在DM安装目录的bin目录下执行./dmserver命令来启动数据库。\[2\] 如果你的QT程序是64位的,那么需要下载win64的达梦数据库,如果是32位的QT程序,则需要下载win32的达梦数据库。否则,在连接数据库时可能会出现“驱动程序和应用程序之间的体系结构不匹配”的错误。\[3\] #### 引用[.reference_title] - *1* *2* [达梦数据库启动关闭](https://blog.csdn.net/weixin_54008028/article/details/114577329)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Windows Qt连接达梦数据库](https://blog.csdn.net/Sakuya__/article/details/128323969)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值