Q

When is a row a fixed length row?

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...

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.

This was first published in January 2005

Dig deeper on Oracle DBA jobs, training and certification

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close