DB2 Creating a Database

Source: Internet
Author: User
Tags db2 db2 connect db2 connect to

1. Execute under the instance user user
DB2 CREATE DATABASE CPM ON/HOME/DB2INST1/CPM using codeset UTF-8 territory CN pagesize 32768
2. Empowering Smart Users
DB2 Connect to CPM
DB2 Grant connect on the database to user smart
DB2 Grant DBADM on the database to user smart
3. Create schema
DB2 CREATE Schema CPM authorization smart

4. Create a cache pool
DB2 CREATE Bufferpool "Cpmpool" IMMEDIATE SIZE 100000 numblockpages 0 PAGESIZE K;

5. Create a temporary table space
DB2 CREATE USER Temporary tablespace "TMPCPM" PAGESIZE 32K MANAGED by Automatic storage extentsize + prefetchsize Automat IC bufferpool "Cpmpool" OVERHEAD 7.50 transferrate 0.06 DROPPED TABLE RECOVERY OFF;

6.
DB2 CREATE LARGE tablespace "tsp_cpm" PAGESIZE 32K MANAGED by Automatic storage extentsize + prefetchsize automatic Buffe RPOOL "Cpmpool" OVERHEAD 7.50 transferrate 0.06 DROPPED TABLE RECOVERY on;

7.
DB2 CREATE LARGE tablespace "Tsp_log" PAGESIZE 32K MANAGED by Automatic storage extentsize + prefetchsize automatic Buffe RPOOL "Cpmpool" OVERHEAD 7.50 transferrate 0.06 DROPPED TABLE RECOVERY on;

8.
DB2 CREATE LARGE tablespace "Tsp_index" PAGESIZE 32K MANAGED by Automatic storage extentsize + prefetchsize automatic BUF Ferpool "Cpmpool" OVERHEAD 7.50 transferrate 0.06 DROPPED TABLE RECOVERY on;

Guide data
DB2 set current schema CPM;

DB2 Creating a Database

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.