Heim  >  Artikel  >  Datenbank  >  达梦(2)安装后启动服务及生成数据库

达梦(2)安装后启动服务及生成数据库

WBOY
WBOYOriginal
2016-06-07 15:23:151525Durchsuche

达梦在Windows全是图形界面到没什么难的。 但在Linux下就有点为难了。 都不知在哪下手。 翻了半天文档才有点眉目。 如何启动相关服务及生成相关数据库。先记录下来,也不知这样理解对不对。 1. 生成数据库,默认为dm a. 创建好目录 -- 存放数据库文件存放目录

达梦在Windows全是图形界面到没什么难的。 但在Linux下就有点为难了。 都不知在哪下手。 翻了半天文档才有点眉目。

如何启动相关服务及生成相关数据库。先记录下来,也不知这样理解对不对。

1. 生成数据库,默认为dm
a. 创建好目录

-- 存放数据库文件存放目录

mkdir /opt/dmdbms/data

-- 保存 dminit 的日志

mkdir /opt/dmdbms/data/log
b. 依提示创建
./dminit

2. 启动数据库
在一个会话中启动一个数据库
./dmserver /opt/dmdbms/data/DMSERVER/dm.ini

dmserver命令说明:
[root@xcl12c bin]# ./dmserver help
format: ./dmserver [ini_file_path] [-noconsole] [mount]

example:
./dmserver path=/opt/dmdbms/bin/dm.ini
./dmserver /opt/dmdbms/bin/dm.ini

KEY WORD EXPLANATION
--------------------------------------------------------------------------------
PATH the absolute path of dm.ini or the current directory
-noconsole start in service mode
mount start in mount status
HELP print help information

3. 在另一个会话中就可以连接上新建的数据库了
[root@xcl12c bin]# ./disql SYSDBA/SYSDBA@localhost

Server[localhost:5236]:mode is normal, state is open
normal user login

login used time: 8.931(ms)
disql V7.1.2.215-Build(2013.11.08-36626trunc)
Connected to: DM 7.1.2.215
SQL>

MAIL: xcl_168@aliyun.com

BLOG: http://blog.csdn.net/xcl168

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn