If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 Drop or Modify column...Urgent Please!!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-30-04, 18:19
pepsoft239 pepsoft239 is offline
Registered User
 
Join Date: Jan 2004
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 01-30-04, 19:22
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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

Quote:
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.
Reply With Quote
  #3 (permalink)  
Old 01-30-04, 19:45
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On