Six common DB2 command lines

Source: Internet
Author: User

The following describes the types of DB2 command lines used for database connection and other operations for your reference. If you are interested in DB2 command lines, take a look.

Connect to the database:

 
 
  1. Connect to [database name] user [operation user name] using [Password]

Create a buffer pool (8 K ):

 
 
  1. create bufferpool ibmdefault8k IMMEDIATE    SIZE 5000 PAGESIZE 8 K ; 

Create a buffer pool (16 K) (OA_DIVERTASKRECORD ):

 
 
  1. create bufferpool ibmdefault16k IMMEDIATE    SIZE 5000 PAGESIZE 16 K ; 

Create a buffer pool (32 K) (OA_TASK ):

 
 
  1. create bufferpool ibmdefault32k IMMEDIATE    SIZE 5000 PAGESIZE 32 K ; 

Create a tablespace:

 
 
  1. CREATE TABLESPACE exoatbs IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 8K MANAGED BY SYSTEM USING ('/home/exoa2/exoacontainer') EXTENTSIZE 32 PREFETCHSIZE 16    BUFFERPOOL IBMDEFAULT8K    OVERHEAD 24.10 TRANSFERRATE 0.90    DROPPED TABLE RECOVERY OFF;  
  2.  
  3. CREATE TABLESPACE exoatbs16k    IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 16K MANAGED BY SYSTEM USING ('/home/exoa2/exoacontainer16k'     ) EXTENTSIZE 32    PREFETCHSIZE 16    BUFFERPOOL IBMDEFAULT16K    OVERHEAD 24.1 TRANSFERRATE 0.90    DROPPED TABLE RECOVERY OFF;  
  4.  
  5. CREATE TABLESPACE exoatbs32k    IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 32K MANAGED BY SYSTEM USING ('/home/exoa2/exoacontainer32k'     ) EXTENTSIZE 32    PREFETCHSIZE 16    BUFFERPOOL IBMDEFAULT32K    OVERHEAD 24.1 TRANSFERRATE 0.90    DROPPED TABLE RECOVERY OFF;  
  6.  
  7. GRANT USE OF TABLESPACE exoatbs TO PUBLIC;  
  8. GRANT USE OF TABLESPACE exoatbs16k TO PUBLIC;  
  9. GRANT USE OF TABLESPACE exoatbs32k TO PUBLIC;  

Create System tablespace:

 
 
  1. CREATE TEMPORARY TABLESPACE exoasystmp IN DATABASE PARTITION GROUP IBMTEMPGROUP PAGESIZE 8K    MANAGED BY SYSTEM USING ('/home/exoa2/exoasystmp'     ) EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT8K    OVERHEAD 24.10 TRANSFERRATE 0.90    DROPPED TABLE RECOVERY OFF;  
  2.  
  3. CREATE TEMPORARY TABLESPACE exoasystmp16k IN DATABASE PARTITION GROUP IBMTEMPGROUP PAGESIZE 16K MANAGED BY SYSTEM USING ('/home/exoa2/exoasystmp16k'    ) EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT16K OVERHEAD 24.10 TRANSFERRATE 0.90    DROPPED TABLE RECOVERY OFF;  
  4.  
  5. CREATE TEMPORARY TABLESPACE exoasystmp32k IN DATABASE PARTITION GROUP IBMTEMPGROUP PAGESIZE 32K MANAGED BY SYSTEM USING ('/home/exoa2/exoasystmp32k') EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT32K OVERHEAD 24.10 TRANSFERRATE 0.90    DROPPED TABLE RECOVERY OFF;  

The above DB2 command line introduction.

Four precautions for DB2 Data Import

DB2 database startup failure Solution

Create a DB2 Management Server

Three types of DB2 clients

DB2 isolation level-read for implementation

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.