欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

SUSE Linux环境为DB2手动建库

程序员文章站 2022-05-10 14:19:18
...

1,为db数据文件创建空间mkdir -p /db2root/testdb/lv_db2dbmkdir -p /db2root/testdb/lv_db2indexmkdir -p /db2root/testdb/lv_

SUSE Linux环境为DB2手动建库

首页 → 数据库技术

背景:

阅读新闻

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 Linux环境为DB2手动建库

  • 0
  • Linux平台下从源码编译安装MySQL的步骤

    Ubuntu下的c++连接数据库

    相关资讯 suse

    图片资讯

    本文评论   查看全部评论 (0)

    评论声明

    最新资讯

    本周热门

    Linux公社简介 - 广告服务 - 网站地图 - 帮助信息 - 联系我们
    本站(LinuxIDC)所刊载文章不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。


    Copyright © 2006-2011 Linux公社 All rights reserved 浙ICP备06018118号