I think a PMR is the appropriate route here.
"sebastien david "
<db2udbdba-ezmlmshield-x61449359.[Email address protected] wrote on
01/31/2006 02:23:34 AM:
> Hi all
>
> My config: Windows 2000, DB2 v8.1.10.812 Personal Edition
>
> I created this procedure:
>
> CREATE PROCEDURE myschema.DROPCOLUMN ( IN NEW_TABLE_DEF VARCHAR(2048) )
> LANGUAGE SQL
> DYNAMIC RESULT SETS 1
> MODIFIES SQL DATA
> P1: BEGIN
> DECLARE MSG VARCHAR(2048);
> DECLARE ALTER_ID INTEGER;
> set ALTER_ID = -1;
> CALL
> SYSPROC.ALTOBJ('APPLY_CONTINUE_ON_ERROR',NEW_TABLE_DEF,ALTER_ID,MSG);
> END P1
>
> I created this table:
>
> CREATE TABLE test_table ( COL1 BIGINT NOT NULL,COL2 BIGINT,COL3
> INTEGER,COL4 SMALLINT,COL5 CHARACTER(1),COL6 BLOB,COL7 DOUBLE,COL8
> VARCHAR(255),COL9 TIMESTAMP,OPERATION_COUNT BIGINT)
>
> When i execute the following command, the column COL2 is correctly
> dropped from the table:
> CALL myschema.DROPCOLUMN('CREATE TABLE test_table ( COL1 BIGINT NOT
> NULL,COL3 INTEGER,COL4 SMALLINT,COL5 CHARACTER(1),COL6 BLOB,COL7
> DOUBLE,COL8 VARCHAR(255),COL9 TIMESTAMP,OPERATION_COUNT BIGINT)
>
> After i execute the command:
> CALL myschema.DROPCOLUMN('CREATE TABLE test_table ( COL1 BIGINT NOT
> NULL,COL4 SMALLINT,COL5 CHARACTER(1),COL6 BLOB,COL7 DOUBLE,COL8
> VARCHAR(255),COL9 TIMESTAMP,OPERATION_COUNT BIGINT)
>
> Sometimes, the column COL3 is correctly dropped but in major case i got
> this error:
>
> com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -443, SQLSTATE:
> 38553, SQLERRMC: ALTOBJ;;SQL1227 Reason code or token: 0|CARD|6
>
> Please let me know what's the problem ?
>
> What means 0|CARD|6 ?
>
>
> Another Problem: With ALTOBJ procedure, the UNIQUE KEY are not
> correctly recreated (the key
> is renamed: SQL2006....!)
>
>
> Thanks for you help!
>
> Sebastien
>
>
>
>
>
> ---------------------------------------------------------------------
> PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> website: http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
DB2 & UDB email list listserv db2-l LazyDBA home page