A row is treated as a variable length row when an ALTER TABLE has added a new column to the table. My understanding is that future inserted and updated rows have an indicator set in the row header marking these rows as variable length.

Additionally there is an indication in the DBD. It follows that a REORG will standardize the row lengths and remove the variable length row indicator from the row header, but is the row now really treated as a fixed length row, or is a MODIFY also needed before these rows are treated as fixed length rows? And if so, what if you don't use DB2 Image Copy to backup your data? The documentation states that MODIFY must find at least one...

By submitting your personal information, you agree to receive emails regarding relevant products and special offers from TechTarget and its partners. You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.

COPY row in SYSCOPY before it will maintain the DBD and log range table. We are on version 8 of DB2 for z/OS.

There is nothing in the row header, other than the row length, to indicate that a row is variable length. If you have altered or added a column, there is an indicator in the Record OBD that a table might have a variable length row (OBDREVLF). That way DB2 doesn't end with an error if it encounters a row that doesn't contain the newly added column. The old rows are treated as exceptions because their row length is shorter than the maximum.

A subsequent REORG instantiates the new column in all rows, but it does not turn off the OBDREVLF bit. A MODIFY that is run after the reorg and that deletes all recovery resources prior to the reorg does turn it off.

This is the way it works prior to DB2 V8. Haven't tested in v8, but I doubt this has changed.

Special thanks to Michael Murley from BMC Software R+D for his assistance in preparing this answer.

0 comments

E-Mail

Username / Password

Password

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy