[DB2] Alter table limitations, DB21034E

Problem ถ้าหากนำ Script ด้านบนนี้ไปรันบน DB2 ที่มี Version ต่ำกว่า 9.7 พบว่า Script ตัวนี้สามารถรันได้ โดยไม่มีปัญหาครับ แต่ถ้านำ Script นี้ไปรันบน DB2 ที่มี Version สูงกว่านี้ เช่น 10.5 พบว่ามี Error Message ในจุดที่ (4) ดังนี้ครับ DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL20054N The table “INVS.COMPANYACCOUNT_SECURITY_DETAIL” is in an invalid state for the operation. Reason code=”23″. SQLSTATE=55019 Root Cause ตอนนี้ลองวกกลับมาหาที่สาเหตุบ้าง ส่วนตัวผมเข้าใจว่าระหว่างการเปลี่ยนแปลง ALTER Table เพื่อแก้ Data Type หรือ ขนาดของ Field รวมถึงการ DROP COLUMN – Multiple ALTER TABLE operations within a single unit of work Certain ALTER TABLE operations, like dropping a…



