程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> DB2數據庫 >> DB2教程 >> 教您如何實現DB2表空間擴容

教您如何實現DB2表空間擴容

編輯:DB2教程

DB2表空間擴容是我們在使用DB2數據庫中的常見操作,下面就為您詳細介紹幾種DB2表空間擴容的方法,希望對您能有所啟迪。

多所有容器擴容

db2 " ALTER TABLESPACE tablespace-name EXTEND (ALL 1000000)"

DB21034E The command was processed as an SQL statement because it was not avalid Command Line Processor command. During SQL processing it returned:

SQL1139N The total size of the table space is too big. SQLSTATE=54047
 
對其中一個容器擴容

db2 " ALTER TABLESPACE tablespace-name  EXTEND (FILE '/dir/filename' 3000000)"

DB21034E The command was processed as an SQL statement because it was not avalid Command Line Processor command. During SQL processing it returned:

SQL1139N The total size of the table space is too big. SQLSTATE=54047
 
加容器

db2 " ALTER TABLESPACE tablespace-name  ADD (FILE '/dir/filename' 500000)"

DB21034E The command was processed as an SQL statement because it was not avalid Command Line Processor command. During SQL processing it returned:

SQL1139N The total size of the table space is too big. SQLSTATE=54047
 
通過檢查可以看到

LIST TABLESPACES SHOW DETAIL

...

Tablespace ID                       = 8

Name                                       = tablespace-name

Type                                       = Database managed space

Contents                                = Any data

State                                        = 0x0000

Detailed explanation:

Normal

Total pages                            = 16388000

Useable pages                       = 16387840

Used pages                            = 16387840

Free pages                               = 0

High water mark (pages)       = 16387840

Page size (bytes)                   = 4096

Extent size (pages)                 = 32

Prefetch size (pages)              = 128

Number of containers             = 4

Minimum recovery time          =2009-06-26-04.47.15.000000

...
 

以上就是DB2表空間擴容的方法介紹。

深入解讀DB2存儲過程

帶您了解DB2異常處理器類型

DB2連接服務器的配置

帶您了解DB2鎖的類型

db2表空間被鎖的解決方法

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved