IC93985: ALTER TABLE STATEMENT REFERENCING A TABLE NAME CONTAINING TRAILING SPACES MIGHT PRODUCE SQL0901N

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Under rare scenarios, DB2 might produce a SQL0901N error message
    if the following conditions are true
    1. The statement is an alter
    2. The table is a dependent object for view/trigger/procedure
    3. Delimited table name inside the alter statement or the
    view/trigger/procedure body has trailing
    spaces
    
    Example:
    Create table "Table1234" (c1 DECIMAL(16,0) NOT NULL GENERATED
    ALWAYS AS IDENTITY (
                START WITH +1
                INCREMENT BY +1
                MINVALUE +1
                MAXVALUE +9999999999999999
                NO CYCLE
                CACHE 20
                NO ORDER ),
                c2 GRAPHIC(1) NOT NULL WITH DEFAULT 'i');
    
    create trigger "trigger1234"
    no cascade before update of c2 on "Table1234" referencing old as
    "deleted" new as "inserted"
    for each row mode db2sql
    begin atomic
        if ("deleted".c2 <> 'i'
            and "inserted".c2 <> 'i') then
         SIGNAL SQLSTATE '75000' SET MESSAGE_TEXT= 'Error';--
        end if;--
    end;
    
    alter table "Table1234 " alter column c1 drop identity;
    
    SQL0901N The SQL statement failed because of a non-severe system
    error.
    Subsequent SQL statements can be processed. (Reason "table not
    found
    in dep list during alt/drop".) SQLSTATE=58004
    

Local fix

  • Workaround:
    Make sure that the table names referenced across all objects and
    the
    alter statement are an exact match.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.7 and Fix Pack 9                    *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 Version 9.7 and Fix Pack 9
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC93985

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-07-09

  • Closed date

    2013-12-16

  • Last modified date

    2013-12-16

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC95485 IC96288

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

DB2 for Linux, UNIX and Windows

Software version:

9.7

Reference #:

IC93985

Modified date:

2013-12-16

Translate my page

Machine Translation

Content navigation