阅读内容

SUSE Linux环境为DB2手动建库

[日期:2008-10-11] 来源:Linux社区  作者:Linux编辑


1,为db数据文件创建空间

mkdir -p /db2root/testdb/lv_db2db
mkdir -p /db2root/testdb/lv_db2index
mkdir -p /db2root/testdb/lv_db2log
mkdir -p /db2root/testdb/lv_systbs
mkdir -p /db2root/testdb/lv_temptbs


touch /db2root/testdb/lv_usertbs
chown -R db2inst1:db2grp1 /db2root/testdb

2,在实例用户下建库(db2模式下)

create database testdb on /db2root/testdb/lv_db2db using codeset GBK territory zh_CN collate using identity catalog tablespace managed by system using ('/db2root/testdb/lv_systbs/catalog') TEMPORARY tablespace managed by system using ('/db2root/testdb/lv_temptbs/temporary') user tablespace managed by database using(file '/db2root/testdb/lv_usertbs' 2621440)

3,设置db参数

connect to testdb
update db cfg for mmscdb using newlogpath /db2root/testdb/lv_db2log logprimary 20 logfilsiz 7680
update db cfg using STMTHEAP 16384
update db cfg using STMTHEAP 16384
update db cfg using APPLHEAPSZ 512

4,授权用户user1

connect to testdb user db2inst1 using passwd
grant use of tablespace USERSPACE1 to user user1
grant dbadm on database to user user1




相关资讯       suse 
本文评论       全部评论
发表评论
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款


点评: 字数
姓名:

L
I
N
U
X


GOOGLE搜索
Google