Vincent Roure wrote :

>Hi,

>To handle customer changes, we often use ADD definitions and DROP
>definitions in ALTER TABLE statement.
>Some times, we reach the 'Row too long' limit (Internal length of a
>table row limit).

>But, when we try to delete some columns (DROP definition) to reduce
>total length and we do some new ADD definition with lower size, we
>receive same error (-2000 : Row to long).

>Is there any method to reset the internal length as existing column
>sizes ?

Normally, if you drop a column via the drop definition, the column is just
marked as dropped without releasing the space occupied by that column.
This makes the execution of the drop definition very fast, but it explains
why you cannot add a column after you once reached the row limitation.

To handle those situations the drop definition provides the 
'release space' option, for example

ALTER TABLE TEST DROP COL1 RELEASE SPACE

In this case the table will be reorganized and the space hold by column COL1
will be
released. The size of each row of the table will be reduced by the length
of the corresponding value of COL1, i.e. you will have no problem to add a
new shorter column afterwards.
But please take into account, that the RELEASE SPACE option normally
requires
an internal copy of the complete table. If your table is large, this may
require
a considerable period of time.
Maybe it's enough to use the RELEASE SPACE option, when you are approaching
the row limitation. This is because if you drop a column with release space
option, 
all columns that are already marked as dropped are released implicitly in
the same go.    

Thomas

---

Thomas Anhaus
SAPDB, SAP Labs Berlin



 


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to