命令行模式卸载数据库实例:
1.删除服务
su - root
[root@host134 root]#cd /dmdbms/product/script/root
[root@host134 root]# ./dm_service_uninstaller.sh -h
Usage: dm_service_uninstaller.sh [-n service_name]
   -n     Service Name, delete the service
   -h     Help[root@host134 root]# ./dm_service_uninstaller.sh -n DmServiceslnngk 
Whether to delete the service(DmServiceslnngk) (Y/y:yes N/n:no): y
Removed symlink /etc/systemd/system/multi-user.target.wants/DmServiceslnngk.service.
Finished to delete the service file(/usr/lib/systemd/system/DmServiceslnngk.service)
Finished to delete the service(DmServiceslnngk)这个时候数据库服务的进程已经没有了
 
2.删除数据库目录
[root@host134 root]# su - dmdba
[dmdba@host134 data]$ cd /dmdbms/data
[dmdba@host134 data]$ rm -rf slnngk/图形界面卸载数据库实例
su - dmdba
[dmdba@host134 tool]$ cd /dmdbms/product/tool
[dmdba@host134 tool]$ ./dbca.sh根据图形界面提示进行删除
 
可以删除其他注册的服务
查看达梦注册的相关服务
[root@host134 system]# ls -al /usr/lib/systemd/system/Dm*
-rw------- 1 root root 407 Aug  2 09:55 /usr/lib/systemd/system/DmAPService.service
-rw-rw-r-- 1 root root 456 Aug  9 15:31 /usr/lib/systemd/system/DmMonitorServiceMonitor.service
-rw------- 1 root root 414 Aug  9 10:45 /usr/lib/systemd/system/DmServiceslnngk.service
-rw------- 1 root root 436 Aug  9 15:25 /usr/lib/systemd/system/DmWatcherServiceGRP1.service[root@host134 root]#cd /dmdbms/product/script/root
[root@host134 root]#./dm_service_uninstaller.sh -n DmWatcherServiceGRP1  ##数据库守护进程
[root@host134 root]#./dm_service_uninstaller.sh -n DmMonitorServiceMonitor  ##监视器服务
[root@host134 root]#./dm_service_uninstaller.sh -n DmServiceslnngk              ###数据库服务 
然后将数据目录删除掉
su - dmdba
[dmdba@host134 data]$ cd /dmdbms/data
[dmdba@host134 data]$ rm -rf slnngk/