下面為您介紹的幾類DB2命令行用於連接數據庫等操作,供您參考學習,如果您對DB2命令行方面感興趣的話,不妨一看。
連接數據庫:
- connect to [數據庫名] user [操作用戶名] using [密碼]
創建緩沖池(8K):
- create bufferpool ibmdefault8k IMMEDIATE SIZE 5000 PAGESIZE 8 K ;
創建緩沖池(16K)(OA_DIVERTASKRECORD):
- create bufferpool ibmdefault16k IMMEDIATE SIZE 5000 PAGESIZE 16 K ;
創建緩沖池(32K)(OA_TASK):
- create bufferpool ibmdefault32k IMMEDIATE SIZE 5000 PAGESIZE 32 K ;
創建表空間:
- 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;
- 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;
- 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;
- GRANT USE OF TABLESPACE exoatbs TO PUBLIC;
- GRANT USE OF TABLESPACE exoatbs16k TO PUBLIC;
- GRANT USE OF TABLESPACE exoatbs32k TO PUBLIC;
創建系統表空間:
- 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;
- 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;
- 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;
以上DB2命令行的介紹。
DB2數據導入的四點注意事項
DB2數據庫啟動失敗的解決方案
創建DB2管理服務器的兩種情況
DB2客戶端的三種類型
DB2隔離級別--為落實的讀