How to Create a tablespace in DB2 under aix

Source: Internet
Author: User

There are different ways to create a tablespace in DB2 in different environments. The following describes how to create a tablespace in DB2 in an aix environment, we hope that you will have more knowledge about creating tablespaces in DB2.

 
 
  1. db2set db2codepage=819 
  2. db2 create database easytest on /home/db2inst1   
  3. db2 connect to test04 user db2inst1 using db2  
  4. db2 CREATE Bufferpool USER8 SIZE 100000 PAGESIZE 8K   
  5. db2 CREATE Bufferpool USER16 SIZE 1000 PAGESIZE 16 K   
  6. db2 CREATE Bufferpool USER32 SIZE 1000 PAGESIZE 32 K   
  7. db2stop force   
  8. db2start  
  9. db2 connect to test04 user db2inst1 using db2  
  10. db2 "CREATE REGULAR TABLESPACE TS_USER8 PAGESIZE 8K MANAGED BY SYSTEM USING ('FSMS_8K_1') BUFFERPOOL USER8"  
  11. db2 "CREATE REGULAR TABLESPACE TS_USER16 PAGESIZE 16K MANAGED BY SYSTEM USING ('FSMS_16K_1') BUFFERPOOL USER16"  
  12. db2 "CREATE REGULAR TABLESPACE TS_USER32 PAGESIZE 32K MANAGED BY SYSTEM USING ('FSMS_32K_1') BUFFERPOOL USER32"  
  13. db2 CREATE Bufferpool TMPBUF8 SIZE 10000 PAGESIZE 8K   
  14. db2 "CREATE   TEMPORARY   TABLESPACE TempTS_USER8 PAGESIZE 8K   MANAGED BY SYSTEM   USING ('/home/db2inst1/db2inst1/TEMPNODE0004'   )   EXTENTSIZE 16 OVERHEAD 10.5 PREFETCHSIZE 16 TRANSFERRATE 0.14 BUFFERPOOL "TMPBUF8" DROPPED TABLE RECOVERY OFF"  
  15. db2 GRANT   DBADM,CREATETAB,BINDADD,CONNECT,LOAD ON DATABASE   TO USER EASYMIS  
  16. db2 GRANT USE OF TABLESPACE TS_USER8 TO easymis  
  17. db2 GRANT USE OF TABLESPACE TS_USER16 TO easymis  
  18. db2 GRANT USE OF TABLESPACE TS_USER32 TO easymis  
  19. db2 connect to test04 user easymis using easymis  
  20. db2 -f dbstruct.sql >kk.log 

The preceding steps describe how to create a tablespace in DB2 under aix.

 

How to Create a tablespace in DB2 in windows

How to delete tables with large data volumes in DB2

DB2 index design guidelines

Visualize DB2 Spatial Data

20 misunderstandings about DB2 database performance

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.