SAP DB2 Tables-space Reorganization on UNIX

Summary:-

This document contains the steps that how to do DB2 tablespace reorganization on UNIX System.

Author: Brindavan Mookaiah

Designation: SAP BASIS Consultant


Steps to follow:-


1) Login into udt

2) #sudo  su – DB2SID

3) # cd dba/bin

4) # ksh

5) #db2reorgchk.ksh

Capture.PNG

6) Enter selection: a

Capture1.PNG

Enter the value: 100(its show the last 100days table’s space to Reorg)


Capture2.PNG


Continue y/n? (Default=y): y

8) Enter your name :< Name>

Make the tables to group reorg ,its reduce the time.

Capture3.PNG

9) Enter selection : g


Enter MINIMUM REORG_ SCORE to be grouped (default=7): 2


Capture4.PNG

Enter YOUR NAME for the audit trail (default=<name>): name

Capture5.PNG

Enter the value:40000 (its make two groups)


Capture6.PNG

Capture7.PNG


Enter selection: 12 (to list the table Reorg grouping)



Capture8.PNG


Run the first group  to reorg

Enter : X

Enter: cd…

Enter: rr

#hostnameDB2SID:SID:NODE0:/db2/db2SID/dba/bin>nohup db2rr.ksh -run db2rr_reorg_grp1.cfg &

To stop the reorg use the command

#hostname: DB2:SID:NODE0:/db2/db2SID/bin> stop_num=y

Online Reorg in SAP level

——————————————————————

Capture9.PNG

Step 1) T-code Db02


Capture10.PNG


Step2) Click the Tables and Index


Step3) Right hand side double click the table name which you want to Reorg


Capture11.PNG



Capture12.PNG

Step4) Click the option REORG Table


Capture16.PNG

Step5) Click Online option to run the Reorg

By this way Online reorg will trigger in background in SAP Level

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. S BASIS

    Good document with screenshot… thumbs up for your efforts.

    Please share pre-post activities also…

    Regards

    s.Basis

    (0) 
  2. Martin Mikala

    I’ve just study how is it with reorganization in DB2 10.5, because online table reorg by auto maintenance was suspended (limited to table lower then 1kB) and now is recommended use ITC tables for archived tables and hold free space in table if is are only repeatedly cleaned. Free space will be reused by new records.

    There are good docs about it:

    Avoiding Database REORG O perations in SAP Systems on DB2 for Linux, UNIX, and Windows Version 10.1

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20cb4be9-3cff-2f10-d99a-b3417eee3583?QuickLink=index&overridelayout=true&57475252413637

    Insert Time Clustering Tables in DB2 LUW 10.5: Observations in a Customer System

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e09699f8-0f42-3110-358a-8564e643482b?QuickLink=index&overridelayout=true&58965606033933


    975352 – DB6: Configuring DB2 Auto Reorg for Space Reclamation and Index Cleanup

    http://service.sap.com/sap/support/notes/975352


    1942183 – DB6: When to consider a table or index reorganization

    http://service.sap.com/sap/support/notes/1942183


    B.R.

    Martin

    (0) 

Leave a Reply