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 > Reorg

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-02-05, 01:01
AnilKale AnilKale is offline
Registered User
 
Join Date: Feb 2005
Posts: 118
Reorg

Hi All !

Is there a lot of difference in the way a REORG runs for DB2 on os/390 and that for db2 on aix (or windows) ?
On the os/390, REORG could be either REORG INDEX or REORG TABLESPACE. Besides, you have s SHRLEVEL option to influence the TS access during reorg. There are lot many options to influence LOGGING, COPY, UNLOAD etc
What is the deal on DB2 for AIX or Windows ?
The syntax in the manual just says
REORG TABLE--table-name----+--------------------+------------>
'-INDEX--index-name--'

>-----+-----------------------+--------------------------------><
'-USE--tablespace-name--

Does it restrict access on the Table being reorged ? or is there a way to influence the access at the time of reorg.
Any tips and tricks with REORG on AIX or WINDOWS ?

thanks
Anil
Reply With Quote
  #2 (permalink)  
Old 03-02-05, 01:19
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,

There are many differences in aix (or win) environment, depending if you use version v7 or v8 of database. I think you use vesion 7, which has some limitations. Please post database version and fixpack level. Please see Must Read before posting to get info about how to get this data.

Hope this helps,
Grofaty
Reply With Quote
  #3 (permalink)  
Old 03-02-05, 02:07
AnilKale AnilKale is offline
Registered User
 
Join Date: Feb 2005
Posts: 118
Oops !

DB2 ver 7.2 on AIX and some databases on DB2 ver 7.2 on Windows.

Anil
Reply With Quote
  #4 (permalink)  
Old 03-02-05, 02:33
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,

DB2 version 7 for Linux, Unix and Windows has some limitations. In version 8 you can do the following:

Code:
REORG {TABLE table-name Table-Clause | INDEXES ALL FOR TABLE table-name
Index-Clause} [On-DbPartitionNum-Clause]

Table-Clause:
  [INDEX index-name] [[ALLOW {READ | NO} ACCESS]
  [USE tablespace-name] [INDEXSCAN] [LONGLOBDATA]] |
  [INPLACE [ [ALLOW {WRITE | READ} ACCESS] [NOTRUNCATE TABLE]
  [START | RESUME] | {STOP | PAUSE} ]]

Index-Clause:
  [ALLOW {READ | NO | WRITE} ACCESS]
  [{CLEANUP ONLY [ALL | PAGES] | CONVERT}]

On-DbPartitionNum-Clause:
  ON {{DBPARTITIONNUM | DBPARTITIONNUMS} (db-partition-number
  [TO  db-partition-number] , ... ) | ALL DBPARTITIONNUMS [EXCEPT
  {DBPARTITIONNUM | DBPARTITIONNUMS} (db-partition-number
  [TO db-partition-number] , ...)]}

NOTE: From the operating system prompt, prefix commands with 'db2'.
      Special characters MAY require an escape sequence (\), for example:
      db2 \? change database
      db2 ? change database xxx comment with \"text\"
Hope this helps,
Grofaty

Last edited by grofaty; 03-02-05 at 02:36.
Reply With Quote
  #5 (permalink)  
Old 03-02-05, 02:38
AnilKale AnilKale is offline
Registered User
 
Join Date: Feb 2005
Posts: 118
Which means as far as REORG on these environments is concerned (ver 7.2 on AIX or windows), there would be a outage during REORGs.
IS that true, or is there a workaround ?

Anil
Reply With Quote
  #6 (permalink)  
Old 03-02-05, 02:46
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
AFAIK, you will have an outage ...
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #7 (permalink)  
Old 03-02-05, 02:46
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
As far as I know you need to migrate to version 8 to get extra functionalitys.
Grofaty
Reply With Quote
  #8 (permalink)  
Old 03-02-05, 04:04
AnilKale AnilKale is offline
Registered User
 
Join Date: Feb 2005
Posts: 118
While I still don't have the luxury of ver 8, do I have to REORG one index (when table has multiple indexes) at a time ? or am I better of just dropping the indexes and rebuilding them again ?

Anil
Reply With Quote
  #9 (permalink)  
Old 03-02-05, 07:04
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
You can do the following:
REORG TABLE schema.table_name INDEX schema.index_name
Reply With Quote
  #10 (permalink)  
Old 03-02-05, 11:34
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
In version 7.x, when you reorg the table, all indexes are reorged.

When you specify an index in the index clause of the reorg in version 7, that tells DB2 which index to use to order the rows of the table, and not which indexes to reorg.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #11 (permalink)  
Old 03-03-05, 01:19
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Marcus_A, you are correct, I missunderstood AnilKale.
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