SAP DB2 Tables space Reorganization on UNIX
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
6) Enter selection: a
Enter the value: 100(its show the last 100days table’s space to Reorg)
Continue y/n? (Default=y): y
8) Enter your name :< Name>
Make the tables to group reorg ,its reduce the time.
9) Enter selection : g
Enter MINIMUM REORG_ SCORE to be grouped (default=7): 2
Enter YOUR NAME for the audit trail (default=<name>): name
Enter the value:40000 (its make two groups)
Enter selection: 12 (to list the table Reorg grouping)
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
——————————————————————
Step 1) T-code Db02
Step2) Click the Tables and Index
Step3) Right hand side double click the table name which you want to Reorg
Step4) Click the option REORG Table
Step5) Click Online option to run the Reorg
By this way Online reorg will trigger in background in SAP Level
Nice doc with details.
Good document with screenshot... thumbs up for your efforts.
Please share pre-post activities also...
Regards
s.Basis
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
Please post a copy of the db2reorgchk.ksh script referenced above in this article.
Thank you
Very usefull information, really appreciated.
🙂
Regards,
Dhanesh