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 > need reorg synchronous

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-10, 13:05
bic bic is offline
Registered User
 
Join Date: Feb 2007
Posts: 42
need reorg synchronous

I have DB2 v8 FP 17.

I notice that if I do an REORG TABLE PROD.ACTION IN PLACE ALLOW WRITE ACCESS;

These are asynchronous. I want to do synchronous instead since I have an update stats and rebind at the end of the script (these get executed almost immediately). How can I achieve that easily? I can probably switch to ALLOW READ ACCESS if that's the case...
Reply With Quote
  #2 (permalink)  
Old 03-03-10, 13:38
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Well, don't do it INPLACE then.
Reply With Quote
  #3 (permalink)  
Old 03-03-10, 13:48
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Two options :

a) After issuing the reorgs, check the status of them on a periodic basis ... Do the runstats and rebind after all reorgs complete. There is a admin function for the reorg status ...

b) Do the reorgs on one day and the runstats/rebind the next day

The second option is easy and OK only if you are doing a 'casual' reorg, and NOT after a specfiic operation like DELETE of a huge number of rows.


Quote:
Originally Posted by bic View Post
I have DB2 v8 FP 17.

I notice that if I do an REORG TABLE PROD.ACTION IN PLACE ALLOW WRITE ACCESS;

These are asynchronous. I want to do synchronous instead since I have an update stats and rebind at the end of the script (these get executed almost immediately). How can I achieve that easily? I can probably switch to ALLOW READ ACCESS if that's the case...
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #4 (permalink)  
Old 03-03-10, 14:26
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
Go with option a above. You can check the status in a script, while still running go to sleep for a bit, then check again, when complete then start next set of commands.
Reply With Quote
  #5 (permalink)  
Old 03-04-10, 03:33
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by dav1mo View Post
Go with option a above. You can check the status in a script, while still running go to sleep for a bit, then check again, when complete then start next set of commands.
Correct. Used to do that. One of the reasons why I do not like INLINE reorgs: complex scripts and a lot of logging, slow and additional action required to reorg your indexes as well.
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