Re: In-place alter table
Posted in 1999
Carlson@WHSmith wrote: > > IDS 7.23.UC11 > HPUX 10.2 > > Due to various requirements, I will need to change the length of a char > column in various tables in my system. I understand that the alter > table will make this change in-place on this version. Since I haven't > done this before, I'm wondering if there are any gotchas out there. > > 1. What are the log space requirements for a database using buffered > logging? > 2. Is is better to force completion of the physical updates to the > table? > > I've scanned Dejanews and haven't found much. > > Still sounds better than an unload, drop, recreate, reload . . . > anything you all could add would be great. V7.23 only does in-place alter for appended columns or dropping the last column and a few other specific alters. V7.24 extended this and 7.3 extended it even further. I just checked and 7.24 will expand a character column in the middle of a row in-place. I cannot vouch for 7.23, I suspect not. If not you are left with only two good options: 1) Unload, drop, recreate with new schema, reload; or 2) Create a new table with new schema, copy the data, drop old table, rename new table. The latter can be done with minimal locking using my dbcopy.ec or some similar utility. Art S. Kagel