DB2 SQL1477N問題


ERROR [55019] [IBM][DB2/NT] SQL1477N  For table "DB_YHJX.YHJX_FHDKFHZ" an object "521" in table space "3" cannot be accessed.  SQLSTATE=55019
SQL1477N  對於表 "<表名>",不能訪問表空間 "<表空間標識>" 中的對象 "<對象標識>"。
說明:
試圖訪問一個表,而該表的其中一個對象是不可訪問的。由於下列原因之一,該表可能不可訪問:
1.當回滾工作單元時,該表激活了 NOT LOGGED INITIALLY。
2.該表是一個已創建的分區臨時表或者已聲明的分區臨時表,由於已聲明此臨時表或者已將它實例化,因此一個或多個數據庫分區失敗。
3.ROLLFORWARD 在此表上遇到了 NOT LOGGED INITIALLY 激活,或者遇到了NONRECOVERABLE 裝入。
不允許訪問此表,因為不能保證其完整性。
是不是你的存儲過程里 有將表清空的語句類似於
ALTER TABLE  表名 ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE

I got a call from a lication team yesterday
that many tables are "can not be acceed" all of sudden.

SQL1477N  Table "RI_ A_T1" ca ot be acceed.  SQLSTATE=55019
SQL1477N  Table "RI_ L_T2" ca ot be acceed.  SQLSTATE=55019
SQL1477N  Table "RI_ T_T3" ca ot be acceed.  SQLSTATE=55019
SQL1477N  Table "RI_PTC_T4" ca ot be acceed.  SQLSTATE=55019

After talking to the developer, he coded some tables with "not logged initially" hope to get better performance,
somehow a job did not complete succe fully and caused many tables in-co istent state.

It mea  that whenever you i ue ALTER TABLE ... ACTIVATE NOT LOGGED INITIALLY then everything between that and the next commit is not logged.
If you encounter a rollback/failure, as you recover the table is marked inacce ible and you ca ot recover it.
Your only option is "DROP" and then "CREATE"  those in question tables again.

Holly smoke! I understand now why those IBM guys brag db2 is so superior than Oracle --
(UDB software lab is in Toronto, got lucky talk to those db2 developers/managers face to face). 
Fortunately, db2 dba is only my secondary job.  How do you guys feel?  Look at those Oracle forums so red and hot.


總結:NOT LOGGED INITIALLY慎用,中途失敗將導致表要被刪除重建。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM