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 > online reorg + runstats

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-02-08, 18:05
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
online reorg + runstats

Hi all,
I have problem: i need mass delete from table. Next operation must be reorg (can be online only) and statistics capture using runstats. Problem is, that online reorg works asynchronous. How I can ensure, that runstat will run on reorganized table ?
thanks
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #2 (permalink)  
Old 09-03-08, 04:03
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Assuming that you are on z/OS, you can collect statistics during reorg itself. Or do you use DB2 on a different platform? Which version of DB2?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 09-03-08, 04:05
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
stolze: i have db2 udb LUW on linux, 8.2.3
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #4 (permalink)  
Old 09-03-08, 06:47
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
In DB2 LUW, the DB2 CLP will be blocked until the REORG is finished. REORG is not asynchronous in this case. The same applies to the invocation of the reorg API. So that wouldn't be a problem at all.

The question is now how you start REORG in your environment and why you think it is asynchrounous.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 09-03-08, 07:13
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
stolze: thanks for help
when i run reorg offline, CLP is blocked, as you wroted. but when I use keyword "inplace" then
is reorg executed asynchronous.
Next cmd I like runstats. How to ensure that table in this time will be reorganized ?


db2 => connect to mydb

Database Connection Information

Database server = DB2/LINUX 8.2.3
SQL authorization ID = DB2INST1
Local database alias = MYDB

db2 => reorg table log.task
DB20000I The REORG command completed successfully

db2 => reorg table log.task inplace allow write access start
DB20000I The REORG command completed successfully.
DB21024I This command is asynchronous and may not be effective immediately.

db2 =>

first command is done in few second, second command immediate.
some ideas?
thanks
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #6 (permalink)  
Old 09-03-08, 08:11
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Now we are finally getting to the point where we know what you are really doing...

In your case, you will have to poll the system regularly to check if the REORG is completed. After that, you con start the RUNSTATS. That's your only option - unless you can resort to a REORG that doesn't use the INPLACE option - do you really need that?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #7 (permalink)  
Old 09-03-08, 09:31
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
system is 7x24... what i can use instead INPLACE option?
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #8 (permalink)  
Old 09-03-08, 10:11
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
INPLACE means that the reorg cannot use a shadow copy to do the reorg on. I guess you want to use the option ALLOW READ/WRITE ACCESS instead.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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