赞
踩
[dmdba@study ~]$ cd /dm/dmdbms/tool/
[dmdba@study tool]$ ls
analyzer dbca.sh dts manager.bmp plugins
analyzer.bmp disql dts.bmp monitor templates
configuration dmagent dts_cmd_run.sh monitor.bmp version.sh
console dmservice.sh log4j.xml nca.sh workspace
console.bmp dropins manager p2
[dmdba@study tool]$ ./dbca.sh
口令最好默认 更改口令的话务必记得。
勾上这两个示例库
[dmdba@localhost dm]$ dminit PATH=/dm/dmdbms/data DB_NAME=cndba INSTANCE_NAME=dave PORT_NUM=6236
注:dbca创建的实例 是已经注册好的
命令行创建的实例没有注册 所以用dbca注册一下 配置文件指定到对应的dm.ini文件
[root@localhost ~]# cd /dm/dmdbms/script/root/
[root@localhost root]# ls
dm_service_installer.sh dm_service_uninstaller.sh root_installer.sh
[root@localhost root]# ./dm_service_installer.sh -t dmserver -i /dm/dmdbms/data/cndba/dm.ini -p DAVE
Usage: dm_service_installer.sh -t service_type [-p service_name_postfix] [-dm_ini dm_ini_file]
[-watcher_ini watcher_ini_file ] [-monitor_ini monitor_ini_file] [-cssm_ini cssm_ini_file]
[-server server_info] [-dcr_ini dcr_ini_file]
[-dmap_ini dmap_ini_file] [-dpc_mode SP|MP|BP] [-m open|mount] [-y dependent_service] [-auto true|false]
or dm_service_installer.sh [-s service_file_path]
or dm_service_installer.sh -h
[root@localhost root]# ./dm_service_installer.sh -t dmserver -dm_ini /dm/dmdbms/data/cndba/dm.ini -p DAVE
Created symlink /etc/systemd/system/multi-user.target.wants/DmServiceDAVE.service → /usr/lib/systemd/system/DmServiceDAVE.service.
创建服务(DmServiceDAVE)完成
[root@localhost root]# systemctl restart DmServiceDAVE
[dmdba@localhost dmdbms]$ ps -ef | grep dm.ini
dmdba 12743 1 0 01:19 ? 00:00:05 /dm/dmdbms/bin/dmserver path=/dm/dmdbms/data/DAMENG/dm.ini -noconsole
dmdba 66482 1 71 01:50 ? 00:00:31 /dm/dmdbms/bin/dmserver path=/dm/dmdbms/data/cndba/dm.ini -noconsole
dmdba 66648 13849 0 01:51 pts/1 00:00:00 grep --color=auto dm.ini
Linux 6:
[dmdba@study ~]$ service DmServiceDAVE stop
[dmdba@study ~]$ service DmServiceDAVE start
[dmdba@study ~]$ service DmServiceDAVE status
[dmdba@study ~]$ ps -ef|grep dm.ini //查看dm进程
Linux 7:
[dmdba@study ~]$systemctl stop DmServiceDAVE.service
[dmdba@study ~]$systemctl start DmServiceDAVE.service
3.2.1图形化界面启停
[dmdba@study ~]$pwd
/dm/dmdbms/tool
[dmdba@study ~]$./dmservice.sh //图形化界面启动或者停止
3.2.2 命令行方式启停
[dmdba@study ~]$dmserver /dm/dmdbms/data/cndba/dm.ini
[dmdba@study ~]$dmserver /dm/dmdbms/data/cndda/dm.ini mount
[dmdba@localhost ~]$ disql SYSDBA/SYSDBA:6236 服务器[LOCALHOST:6236]:处于普通打开状态 登录使用时间 : 3.370(ms) disql V8 SQL> select status$ from v$database; //查看状态 行号 STATUS$ ---------- ----------- 1 4 已用时间: 0.885(毫秒). 执行号:62601. SQL> alter database mount;//关闭状态 操作已执行 已用时间: 1.342(毫秒). 执行号:0. SQL> select status$ from v$database;//查看状态 行号 STATUS$ ---------- ----------- 1 3 已用时间: 0.641(毫秒). 执行号:62602. SQL> alter database open;//打开 操作已执行 已用时间: 8.330(毫秒). 执行号:0. SQL> select status$ from v$database;//查看 行号 STATUS$ ---------- ----------- 1 4 已用时间: 0.359(毫秒). 执行号:62603.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。