linux下创建DB2 DAS实例
更新时间:2023-09-20 08:45:01 阅读量: 医药卫生 文档下载
- Linux创建用户推荐度:
- 相关推荐
创建DAS Instance
首先创建对应实例的用户和组(dasusr1,dasadm1)
[root@alandb2 ~]# groupadd dasadm1 [root@alandb2 ~]# mkdir -p /home/dasusr1
[root@alandb2 ~]# useradd -d /home/dasusr1 -g dasadm1 dasusr1 [root@alandb2 ~]# passwd dasusr1 Changing password for user dasusr1. New UNIX password:
BAD PASSWORD: it is based on a dictionary word Retype new UNIX password:
创建DAS Instance,需要利用到DB2DIR/Instance下面的dascrt命令(Windows平台,我们需要用db2admin create命令来创建):
[root@alandb2 instance]# pwd /opt/ibm/db2/V9.5/instance
[root@alandb2 instance]# ./dascrt DBI1025I Usage:
dascrt [-d] -u ASUser
Explanation:
An invalid argument was entered for the dascrt command. Valid arguments
for this command are:
-d enters debug mode, for use with DB2 Service
-u ASUser
is the user the DAS will run under
User response:
For more information about this command, please refer to theQuick Beginnings manual. Enter the command again as follows:
dascrt -u ASUser
Confirm that user IDs and group names used to create the DB2 instance
are valid. For information about naming rules, see the topic called
\Center.
我们来运行dascrt命令来创建名为dasusr1的DAS Instance
[root@alandb2 instance]# ./dascrt -u dasusr1
SQL4406W The DB2 Administration Server was started successfully. DBI1070I Programdascrt completed successfully.
创建完成后,我们可以看到dasusr1主目录下的Instance文件已经建好。
[dasusr1@alandb2 ~]$ pwd /home/dasusr1
[dasusr1@alandb2 ~]$ ls das
[dasusr1@alandb2 ~]$ cd das [dasusr1@alandb2 das]$ ls
adm conv dasprofile java metadata usercshrc bin ctrl dump lib msg userprofile
cfg dascshrc function log tmp
我们可以通过db2admin start或db2admin stop命令来起停DAS Instance
[dasusr1@alandb2 das]$ which db2admin ~/das/bin/db2admin
[dasusr1@alandb2 das]$ db2admin dasusr1
[dasusr1@alandb2 das]$ db2admin stop
SQL4407W The DB2 Administration Server was stopped successfully.
[dasusr1@alandb2 das]$ db2admin start
SQL4406W The DB2 Administration Server was started successfully.
如果我们的DB2数据库服务器版本升级,我们可以通过运行DB2DIR/instance/dasupdt的命令,对DAS Instance进行升级。
我们还可以通过dasdrop命令来删除DAS Instance:
[root@alandb2 instance]# pwd /opt/ibm/db2/V9.5/instance
[root@alandb2 instance]# ./dasdrop
SQL4407W The DB2 Administration Server was stopped successfully. DBI1070I Programdasdrop completed successfully.
删除完成后,对应的实例目录也就不存在了:
[root@alandb2 instance]# su - dasusr1 [dasusr1@alandb2 ~]$ ls [dasusr1@alandb2 ~]$
最后需要说明的是,我们还可以通过db2 get/update/reset admin cfg 命令来查询并管理配置DAS Instance,前提是DAS Instance需要创建并存在.
附:DAS维护命令
DB2DIR/instance/dasauto - 自动启动DB2管理服务器 DB2DIR/instance/dascrt - 创建DB2服务管理器
DB2DIR/instance/dasdrop - 除去DB2管理服务器 DB2DIR/instance/dasmicr - 迁移DB2管理服务器 DB2DIR/instance/dasupdt - 更新DB2管理服务器
db2admin - DB2管理服务器
正在阅读:
linux下创建DB2 DAS实例09-20
钢管扣件式外脚手架施工方案11-26
江苏省响水中学高中语文 记叙文常见的几种结构模式作文专题学案05-07
论文04-23
《邱学华与尝试教育人生》读后感10-20
四川省2017年中考物理专题复习:第10讲 - 压强练习 - 含答案11-26
动物育种学期末复习题03-27
单片机声控定位系统doc - 图文04-23
测试技术试卷库(含答案)10-14