Toad World® Forums

Incorrect creation of script for extended alter

I have to insert a column in between two existing columns of a table. The table has 12 partitions in UTS rage partitioned tablespace.

Toad generates:

UNLOAD TABLESPACE …
DROP TABLE …
CREATE TABLE…
LOAD DATA INTO TABLE …

There are two problems with this script:

  1. DB2 gives me the following error message “DB2 Database Error: ERROR [42917] [IBM][DB2] SQL0669N A system required index cannot be dropped explicitly.” Instead of just a DROP TABLE …
    -> Toad should generate the following sequence: DROP TABLESPACE …, CREATE TABLESPACE …This a severe error.
  2. The LOAD utility input is quite big (14 template statements and load for 12 partitions and 53 fields), too big, more 32K. An error occurs “DB2 Database Error: ERROR [22001] [IBM][DB2] SQL0433N Value “” is too long.”
    Toad shows a popup message (see attachment), indicating that error before it executes the load step (not before executing the script).
    -> Toad should warn BEFORE executing the script and I should be able to abort before executing the script (where a table or a tablespace will be dropped!)

Thanks
Martin

Hi Martin,

I opened issue TDB-1169 to request an enhancement to check for >32K statements before execution, and I’m researching script error.

Thanks,

Adam

I opened TDB-1170 to track the resolution of the DROP TABLE scripting error.