If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Row format in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-11, 03:03
raghuripples raghuripples is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Row format in db2

Hi,
I am just curious when a row format in a data page, change in db2.
Because from the information center V9.7:

A REORG-recommended operation has occurred when changes resulting from an ALTER TABLE statement affect the row format of the data. When this occurs, most subsequent operations on the table are restricted until a table
reorganization operation completes successfully.

Because when a drop column operation occurs on a table, a reorg reccomended operation is required, whereas when a add column operation occurs, a reorg recommended operation is not necessary. But I would think that when either on of the two(add column or drop column) operation occurs on a table, row format would change, and a reorg is necessary.

But db2 puts the table in reorg pending state only when a drop column operation occurs or in some other scenarios when the data type of a column is changed. So in what way these operations are different from adding columns to a table scenario.

Please help me understand this concept.
Thanks for your help.

I am using DB2 LUW V9.5,9.7.
Raghu.
Reply With Quote
  #2 (permalink)  
Old 05-06-11, 08:29
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
A new column is added at the end of the row. Dropped or altered column can introduce changes in the middle of the row.
Reply With Quote
  #3 (permalink)  
Old 05-08-11, 04:18
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Existing static SQL (from before the "add column") need not be redone since all its absolute addresses (on the phyisical row) are still valid. Even inserts and updates can still be done consistently (as long as they don't refer the new column, which is impossible with old static SQL).
When bytes in the middle of the row change interpretation, the situation is of course different. Except for static SQL that only refers columns in front of the change. So, some packages will possibly not be invalidated. But the tablespace as a whole needs reorganisation before inserts or updates into it using the new row format are allowed.
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On