Datacom

  • 1.  Online Reorg

    Posted Nov 29, 2017 04:18 PM

    I am currently running an online reorg are processing 426,312,683 records.

    So far we are at: OLREORG ROW 149,175,426   OF ABOUT 426,312,683   ROWS MOVED 25,568,630 

    I need to cancel the reorg and restart.  Would I use the 'FIRSTKEY' optional keyword and would I use the

    'OLREORG ROW' number displayed?



  • 2.  Re: Online Reorg

    Broadcom Employee
    Posted Nov 29, 2017 04:33 PM

    Lydia,

     

    No, you wouldn't use the *number* for OLREORG ROW displayed.  FIRSTKEY is a native sequence key *value* that you supply.  You are about 35% into the file.  Can you determine a key value at about 35% into the file?  As a wild example, if the key were zip code and we assumed all zip codes had the same number of records in your file, you might be at a value of about "12449".  You could specify FIRSTKEY=0512449 (meaning 5 bytes with a value of 12449) to pick up where you left off.

     

    Long story short, you need to know a little about your data distribution to have a feel for the key value you were on to choose a FIRSTKEY for a restart of OLREORG.

     

    Hope this helps.

     

    Dale Russell



  • 3.  Re: Online Reorg

    Posted Nov 29, 2017 04:38 PM

    Note that there is no great penalty for a FIRSTKEY choice that is a bit off, Lydia. Probably err on the low side, so a few blocks get “re-REORGed”, but even a bit high just means a few blocks miss out, and the table will still be ‘mostly’ organised

     

    Clyde



  • 4.  Re: Online Reorg

    Broadcom Employee
    Posted Nov 29, 2017 04:36 PM

    Hi Lydia,

     

    Also, from CA Datacom Core - 15.1  section "OLREORG (Reorganize a Database Online)"

    https://docops.ca.com/ca-datacom/15-1/en/reference/dbutlty-reference/utility-function-summary/olreorg-reorganize-a-database-online

     

    Note: You can interrupt or stop the execution of OLREORG without any risk to your environment by issuing a COMM REQABORT. The REQABORT is honored after each reference group is processed. In this case, no summary report is produced. The last key value processed is provided instead. This key value can be used for the FIRSTKEY= parameter if you want to start the process again by running a new DBUTLTY OLREORG.



  • 5.  Re: Online Reorg

    Posted Dec 05, 2017 12:18 PM

    After cancelling (operator cancel) the reorg, I restarted with the first 2 digits of the 'FIRSTKEY' is the key length:

       //OLREGIDX EXEC DBUTLTY                                       
       //SYSIN    DD  *                                              
        OLREORG TABLE=IDX,DBID=094,REFGROUP=64,FIRSTKEY=09174582806
    /*                                                             

    The job has been running about 48 hours and does not show any information such as:

       'ROW 174,582,806 OF ABOUT 426,312,683   ROWS MOVED 33,361,412'

    I need to cancel the reorg again, I am going to end it using 'REQABORT'

     

    After cancelling, can I go ahead and run the DEFRAG?

    Once we re-start the reorg, will it restart from the beginning?



  • 6.  Re: Online Reorg

    Broadcom Employee
    Posted Dec 06, 2017 08:13 AM

    Lydia

    yes you can run DEFRAG as you suggested.

     

    Restart the OLREORG can be done either way, either use the Key value of some kind for first Key or leave it off. If you leave it off then OLREORG will restart from the beginning.    

     

    Ken