当前位置:数据库 > DB2 >>

DB2 · CREATE TABLESPACE

create tablespace语句可以定义表空间,给表空间分配容器,在catalog中记录表空间定义和属性。
权限:SYSCTRL 或SYSADM
 
语法:
 
>>-CREATE--+-----------------------+---------------------------->
           +-LARGE-----------------+
           +-REGULAR---------------+
           | .-SYSTEM-.            |
           '-+--------+--TEMPORARY-'
             '-USER---'               
 
>--TABLESPACE--tablespace-name---------------------------------->
 
>--+-----------------------------------------------------------+-->
   |     .-DATABASE PARTITION GROUP-.                          |
   '-IN--+--------------------------+--db-partition-group-name-'  
 
>--+--------------------------+--------------------------------->
   '-PAGESIZE--integer--+---+-'
                        '-K-'    
 
   .-MANAGED BY--AUTOMATIC STORAGE--| size-attributes |---------------------.
>--+------------------------------------------------------------------------+-->
   '-MANAGED BY--+-SYSTEM--| system-containers |--------------------------+-'
                 '-DATABASE--| database-containers |--| size-attributes |-'    
 
>--+---------------------------------+-------------------------->
   '-EXTENTSIZE--+-number-of-pages-+-'
                 '-integer--+-K-+--'
                            '-M-'       
 
>--+-----------------------------------+------------------------>
   '-PREFETCHSIZE--+-AUTOMATIC-------+-'
                   +-number-of-pages-+
                   '-integer--+-K-+--'
                              +-M-+
                              '-G-'       
 
>--+-----------------------------+------------------------------>
   '-BUFFERPOOL--bufferpool-name-'  
 
>--+----------------------------------+------------------------->
   '-OVERHEAD--number-of-milliseconds-'  
 
>--+------------------------+----------------------------------->
   +-NO FILE SYSTEM CACHING-+
   '-FILE SYSTEM CACHING----'  
 
>--+--------------------------------------+--------------------->
   '-TRANSFERRATE--number-of-milliseconds-'  
 
>--+---------------------------------+-------------------------><
   '-DROPPED TABLE RECOVERY--+-ON--+-'
                             '-OFF-'    
 
size-attributes
 
|--+---------------------+--+-----------------------------+----->
   '-AUTORESIZE--+-NO--+-'  '-INITIALSIZE--integer--+-K-+-'
                 '-YES-'                            +-M-+
                                                    '-G-'    
 
>--+------------------------------------+----------------------->
   '-INCREASESIZE--integer--+-PERCENT-+-'
                            '-+-K-+---'
                              +-M-+
                              '-G-'        
 
>--+-----------------------------+------------------------------|
   '-MAXSIZE--+-integer--+-K-+-+-'
              |          +-M-+ |
              |          '-G-' |
              '-NONE-----------'    
 
system-containers
 
   .----------------------------------------------------------------------.
   |           .-,------------------.                                     |
   V           V                    |                                     |
|----USING--(----'container-string'-+--)--+-----------------------------+-+--|
                         &nb
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,