Expert Answer Center > Expert Knowledgebase > View Answer
EMAIL THIS
Expert Knowledgebase
  EXPERT KNOWLEDGEBASE HOME        RSS FEEDS  
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 INSERT'ed and UPDATE'ed 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 back up 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. QUESTION POSED ON: 01 FEB 2005
QUESTION ANSWERED BY: Craig Mullins

There is nothing in the row header, other than the row length, to indicate that a row is variable length. If you have alter 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. It is the old rows that 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 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.

(Thanks to Michael Murley from BMC Software R+D for his assistance in preparing this answer.)

Related Topics:

Search Advice from more than 250 TechTarget Experts
Your question may have already been answered! Browse or search more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice
ASSOCIATED RSS FEEDS

Expert Answer Center: Expert Q&As
View all RSS Feeds  |  RSS Info

HomeExperts on DemandIT Expert Webcast SeriesExpert KnowledgebaseSite Index
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  RSS  |  Site Map




All Rights Reserved, Copyright 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts