Q: 執行 db2idrop 出現錯誤

    DBI1081E  The file or directory /istps/sqllib/bin is missing.

    Solution:

    ./db2iset -d istps
    rm -rf /istps/sqllib/
    ./db2icrt -s ese -u istps istps
    

    Q: Linux 的 Tablespce container 單一檔案無法超過 22GB

    確定 Filesystem 有足夠儲存空間,但仍出現錯誤:

    db2diag.log

    ADM6044E  The DMS table space "RPTTBS9" (ID "12") is full.  If this
              is an autoresize or automatic storage DMS tablespace, the maximum
              table space size may have been reached or the existing containers or
              storage paths cannot grow any more. Additional space can be added to
              the table space by either adding new containers or extending existing
              ones using the ALTER TABLESPACE SQL statement. If this is an
              autoresize or automatic storage DMS table space, additional space can
              be added by adding containers to an autoresize table space or by
              adding new storage paths to an automatic storage database.

    執行 import 時的錯誤:

    SQL0289N  Unable to allocate new pages in table space "RPTTBS9".

    如果是在 Linux 系統上,建立 Tablespace 時,使用 SMS,或 DMS 且有啟用 AUTORESIZE 時,一旦這 Tablespace 資料量持續增長,不管是 SMS 或 DMS,即使所屬的檔案系統有足夠儲存空間,container 路徑內的單一檔案都會限制在 22GB。

    這對於有較大資料量的 Table 會造成困擾,目前原因不明,這可能只發生在 DB2 運行在 Linux 環境。

    解決方法是:

    建立 Tablespace 必須使用 DMS,而且不可啟用 AUTORESIZE。

    Q: 刪除 bufferpool 時發生錯誤

    SQL0103N  The numeric literal "8KBP1" is not valid.  SQLSTATE=42604

    Ans:預設的名稱,不可以是小寫或數字開頭,解決方法用雙引號將字元包起來

    1. 編輯檔案 drop_bufferpool.ddl

    drop bufferpool "8KBP1";
    

    2. 執行 DDL

    > db2 -tvf drop_bufferpool.ddl
    

    Q: 連線 DB 時,發生錯誤

    SQL5043N  Support for one or more communications protocols failed to start successfully. However, core database manager functionality started successfully.

    Ans:將 DB2COMM=tcpip 移除

    > db2set
    > db2set DB2COMM= 
    

    Q: 在 Linux 64-bit Instance 執行 ansclp 出現錯誤

    Exception in thread "main" java.lang.UnsatisfiedLinkError: db2jcmn (/opt/IBM/db2/V8.1/lib/libdb2jcmn.so: cannot open shared object file: No such file or direct

     Ans: DB2 v8 Linux 版的 asnclp 僅支援 32-bit 環境,解決方式是新建一個 32-bit 的 Instance 用來執行 asnclp,然後將輸出的 SQL 複製到正式的 instance 目錄內使用。參閱連結:http://www-01.ibm.com/support/docvie...id=swg21245231

    Q: 新增 bufferpool 後連接資料庫後出現記憶體問題

    連接資料庫發生錯誤:

    SQL1478W  The defined buffer pools could not be started. Instead, one small
    buffer pool for each page size supported by DB2 has been started.
    SQLSTATE=01626

    db2diag.log:

    RETCODE : ZRC=0x850F0005=-2062614523=SQLO_NOSEG
              "No Storage Available for allocation"
              DIA8305C Memory allocation failure occurred.


    Failed to allocate the desired database shared memory set.
    Check to make sure the configured DATABASE_MEMORY + overflow
    does not exceed the maximum shared memory on the system. Will
    attempt to allocate the minimum possible db shared memory size.
    Desired database shared memory set size is (bytes)

    在空的資料庫,新建第二個 bufferpool ,重新連接資料庫時出現以上錯誤訊息

    Ans:

    1. 檢查實體記憶體夠不夠
    2. 執行 ipcs -l
      ------ Shared Memory Limits --------
      max number of segments = 4096
      max seg size (kbytes) = 26214400  <== 參數 shmmax
      max total shared memory (kbytes) = 29360128  <== shmall
      min seg size (bytes) = 1

      修改 /etc/sysctl.conf
      kernel.shmmax = 26843545600   (bytes)  32G(RAM) * 80% = 25G * 1024 *1024 *1024
      kernel.shmall = 7340032             (pages)  32G(RAM) * 90% = 28G * 1024 *1024 /4

       
    3. 執行 db2level
      DB21085I  Instance "istrmm" uses "64" bits and DB2 code release "SQL08029" with
      level identifier "030A0106".

      DB2 Instance 必須是 64 bit
       
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core