Creating table spaces

You can use Db2 Admin Tool to create partition-by-growth (PBG) and partition-by-range (PBR) table spaces.

Procedure

To create a table space:

  1. On the DB2 Administration Menu (ADB2) panel, specify option 2, and press Enter.
  2. On the Execute SQL Statements (ADB22) panel, specify option 4, and press Enter.
  3. On the Create/Drop/Label/Comment On Objects (ADB26) panel, specify option CS, and press Enter.
  4. On the Create Table Space (ADB26CS) panel, specify the table space name and any other parameters as needed, and press Enter:
    ADB26CS n ------------------- Create Table Space ------------------- 06:28
    Command ===> __________________________________________________________________
                                                                                   
     CREATE                                                                        
                                                                                   
     TABLESPACE . . FGRTS    (required table space name.  ? to look up)           
                                                                                   
     IN . . . . . . FGRDB    (optional database. default=DSNDB04. ? to look up)   
                                                                                   
     Like:                                                                         
     Database . . . ________ (optional existing database. ? to look up)           
     Name . . . . . ________ (optional existing table space. ? to look up)        
    Required parameters:
    TABLESPACE
    A name for the new table space.
    Optional parameters:
    IN
    The name of the database in which you want to create the new table space. The default is DSNDB04.
    Like:
    Database
    Name
    The table space (and containing database) on which you want to model the new table space.

    Enter a question mark (?) to look up the names of existing objects for any of these fields.

  5. On the Create Table Space (ADB21SAR) panel, set up a partitioning method for the table space by issuing one of the following commands:
    Start of change
    MAKEPBG
    Initializes the input fields as follows for a partition-by-growth table space (PBG) :
    Numparts=0
    Max Partitions >0
    MAKEPBR
    Initializes the input fields as follows for a partition-by-range table space (PBR) :
    Numparts>0
    Max Partitions=0
    SEGSIZE >0
    MAKEPBR2
    Initializes the input fields as follows for a partition-by-range table space with relative page numbering (PBR RPN or PBR2):
    Numparts>0
    Max Partitions=0
    SEGSIZE >0
    PAGENUM=R
    End of change
  6. Specify any other parameters for the new table space and issue the NEXT command.
    Start of change
    ADB21SAR  ------------------ Create Table Space --------- Row 1 to 1 of 1 
    Command ===> ________________________________________________ Scroll ===> PAGE 
                                                                                   
    Commands: NEXT  ORIGINAL                   MAKEPBG  MAKEPBR  MAKEPBR2      
    Line commands: I - Insert part  D - Delete part  U - Update part               
                   C - Clear data   R - Repeat part  ? - Show all line commands                              
    CREATE TABLESPACE: FGRTS    IN  FGRDB                                   
                                                                                   
    Numparts  . . . . . 0                                 LOB . . . . .        
    Define  . . . . . .             DSSIZE  . . . .       LOG . . . . .           
    Member Cluster  . .             SEGSIZE . . . .       CCSID . . . .            
    Buffer Pool . . . .             Close Rule  . .       Max Rows  . .         
    Lock Size . . . . .             Lock Part . . .       Lock Max  . .  
    Max Partitions  . . 0           PAGENUM . . . .       Insert Algo . 1 
                                                                                
                                            C E T S                                 
     S   Part       Pqty    Sqty  FP PF PFU O R M T VCAT     Stogroup GBPCach DSSIZE
     - ------ ---------- ------- --- -- --- - - - - -------- -------> ------- ------
      
            0                                                                       
     ******************************* END OF DB2 DATA *******************************
    End of change
    Note: Start of changeInsert Algo is displayed only if you are running Db2 12 for z/OS®.End of change
    If the statement execution prompt is not enabled, a CREATE TABLESPACE statement is executed with the parameters that you specified, and the table space is created.
  7. If the Statement Execution Prompt (ADB2PSTM) panel is displayed, follow the instructions on that panel to complete and run the SQL statement to create the table space.