Manual database creation for DB2 in SUSE Linux

Source: Internet
Author: User

1. Create a space for the db Data File

Mkdir-p/db2root/testdb/lv_db2db
Mkdir-p/db2root/testdb/lv_db2index
Mkdir-p/db2root/testdb/lv_db2log
Mkdir-p/db2root/testdb/lv_1_bs
Mkdir-p/db2root/testdb/lv_temptbs
Touch/db2root/testdb/lv_usertbs
Chown-R db2inst1: db2grp1/db2root/testdb

2. Create a database under an instance user (in db2 Mode)

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. Set db Parameters

Connect to testdb
Update db cfg for mmscdb using newlogpath/db2root/testdb/lv_db2log logprimary 20 logfilsiz 7680
Update db cfg using implements theap 16384
Update db cfg using implements theap 16384
Update db cfg using APPLHEAPSZ 512

4. authorize user user1

Connect to testdb user db2inst1 using passwd
Grant use of tablespace USERSPACE1 to user user1
Grant dbadm on database to user user1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.