Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    1

    Unanswered: DB2 Drop or Modify column...Urgent Please!!!

    Hi,

    I am working on DB2 Version 4.1 on OS/390 Operating System.

    I have altered a table.

    By mistake, I have given the type for a column as DECIMAL(11,2) instead of CHAR(1). It was ofcourse a Copy Paste mistake of previous columns.

    I want to get this fixed immediately.

    I am unable to alter the column as well as unable to drop the column.

    Please help me...

    You can mail me at pepsoft239@yahoo.com

    Thanks a lot for the help
    Praveen

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: DB2 Drop or Modify column...Urgent Please!!!

    I think the only option available is to drop and recreate the table ...

    Even with the latest release V8 (not yet GA), you can change the column types only between comatible types (ie, CHAR cannot smallint can be modified to int, but not char) ...


    Not sure if you have any Change Management tools ... For eg, BMC Change Manager allows you to change the column type (though I assume it will be doing the same thing behind the scenes)

    Cheers
    sathyaram

    Originally posted by pepsoft239
    Hi,

    I am working on DB2 Version 4.1 on OS/390 Operating System.

    I have altered a table.

    By mistake, I have given the type for a column as DECIMAL(11,2) instead of CHAR(1). It was ofcourse a Copy Paste mistake of previous columns.

    I want to get this fixed immediately.

    I am unable to alter the column as well as unable to drop the column.

    Please help me...

    You can mail me at pepsoft239@yahoo.com

    Thanks a lot for the help
    Praveen
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Yes, BMC will automatically create a worklist to unload the data, drop the table, recreate the table with the changed columns, reload the data (to the correct columns), and rebind any packages or plans affected by the drop.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •