自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

db2表空間被鎖的解決方法

數(shù)據(jù)庫
db2表空間被鎖,應該如何解決呢?下面就教您一個處理db2表空間被鎖問題的方法,希望能夠對您有所幫助。

如果遇到db2表空間被鎖,重啟數(shù)據(jù)庫, 無效,怎么辦呢?下文就為您介紹db2表空間被鎖的解決方法,如果您遇到過db2表空間被鎖的問題,不妨一看。

錯誤代碼是
Table space access is not allowed.   SQLSTATE=55039

force application all
db2stop
db2start

>;db2 "list tablespace containers for 2 show detail"|pg

         Tablespace Containers for Tablespace 2

Container ID                      = 0
Name                               = /dev/rhisdb01
Type                               = Disk
Total pages                          = 5242880
Useable pages                      = 5242848
Accessible                         = Yes         

容器是正常的阿
正常表空間狀態(tài)是
State                                = 0x0000
Detailed explanation:
    Normal                                 
現(xiàn)在表空間狀態(tài)是
Tablespace ID                      = 4
Name                               = ff
Type                               = Database managed space
Contents                             = Any data
State                                = 0x0004
Detailed explanation:
    Quiesced: EXCLUSIVE

如何解除這種狀態(tài)

Enter db2 "list tablespaces show detail".
Find the tablespace id and object id that have the tablespace in this state.
Look at the system catalog table syscat.tables to determine to which table the object id refers.
Reissue the load with the replace or restart option against this table.

編碼時死鎖是很常見的事情,沒有理由去指責程序員的疏忽,死鎖后及時的排除死鎖才是最重要的。我的問題已經得到解決,方法是利用第三方工具對掛起的表空間中的所有表進行quiesce reset,另外謝謝anto的指點
,但不知"Find the tablespace id and object id that have the tablespace in this state"中object id 是指什么?怎么查找?

object id just like this
'表空間標識                      = 0'
應該是吧![/quote]
tablespace id 應該是表空間標識的id,而object id應該是造成死鎖表的id,然后可以通過 select tabname from syscat.tables where tableid=object id,來得到表的名稱,最后用quiesce tablespaces for table tablename reset語句來清除這樣狀態(tài)。

經過驗證已找到答案如下
Number of quiescers                = 1
Quiescer 1:
    Tablespace ID                    = 2
    Object ID                      = 3338

朋友們,為了不要deallock,請千萬不要在 Commit & Rollback 前放 MessageBox
 

 

 

【編輯推薦】

帶約束的DB2建表語句

不允許設置db2主鍵問題的解決

DB2創(chuàng)建表空間的方式

Linux中DB2用戶組的介紹

DB2性能優(yōu)化的十大注意事項

責任編輯:段燃 來源: 互聯(lián)網
相關推薦

2010-11-03 09:34:39

DB2臨時表

2010-09-01 14:00:01

DB2表空間

2010-11-04 10:44:27

DB2 not fou

2010-11-01 12:11:43

DB2表空間

2010-11-01 16:54:09

DB2表空間

2010-11-01 16:07:22

DB2表空間

2010-09-30 10:04:06

DB2創(chuàng)建表空間

2010-11-01 16:38:13

DB2表空間

2010-11-02 14:45:12

DB2創(chuàng)建表空間

2010-11-01 16:44:43

DB2表空間

2010-11-03 11:26:39

DB2表空間

2010-09-30 11:36:31

DB2表空間

2010-08-13 14:46:08

DB2 -964

2010-09-01 14:07:33

DB2映射

2010-09-30 11:55:03

DB2表空間

2010-09-01 14:46:16

DB2表空間

2010-11-01 16:30:21

DB2表空間

2010-11-01 14:30:47

db2擴充表空間

2010-11-03 14:57:44

DB2備份所有表

2010-09-01 11:17:29

DB2備份
點贊
收藏

51CTO技術棧公眾號