Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:services:storage_services:backup:tsm:admin:dbreorg [2018/11/28 11:43] – [LInux] bnachtw | en:services:storage_services:backup:tsm:admin:dbreorg [2018/11/28 11:47] (current) – [preparation on windows] bnachtw | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DB2 offline Reorg ====== | ||
+ | due to [[https:// | ||
+ | * there is an unacceptable level of database growth or | ||
+ | * there is degradation in server performance. | ||
+ | |||
+ | **steps to do:** | ||
+ | ===== preparation | ||
+ | ==== Windows ==== | ||
+ | |||
+ | The DB2 commandline needs to be run as that user who runs the DB2 and TSM/ISP instance. **Administrative permissions / privileges** are **not suffiecient!** | ||
+ | |||
+ | so create a // | ||
+ | |||
+ | so for example it should look like:< | ||
+ | \\ | ||
+ | Notice:\\ You'll be asked for the user's password! | ||
+ | |||
+ | ==== Linux ==== | ||
+ | the commands must be issued with the userspace of the instance owner so | ||
+ | * //sudo// every command: '' | ||
+ | * become instance-user using a login shell: '' | ||
+ | |||
+ | then //cd// to the instance' | ||
+ | |||
+ | ===== Determine temporary space ===== | ||
+ | //When the server is running, determine the amount of temporary space that is required to organize a table. The temporary space that is required is twice the value of the table size. To determine the table size, issue the following commands// | ||
+ | < | ||
+ | db2 connect to tsmdb1 | ||
+ | db2 set schema tsmdb1 | ||
+ | </ | ||
+ | and for each tabular: | ||
+ | < | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 select tsize from session.tb_stats | ||
+ | </ | ||
+ | so directing the output to files with skipping all the blanks looks like: | ||
+ | ==== Windows ==== | ||
+ | |||
+ | < | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | db2 call sysproc.reorgchk_tb_stats(' | ||
+ | db2 " | ||
+ | </ | ||
+ | ==== Linux ==== | ||
+ | FIXME | ||
+ | ===== Create a temporary table space to use during the reorganization ===== | ||
+ | //Create a temporary table space to use during the reorganization. Issue the following commands:// | ||
+ | < | ||
+ | db2 " | ||
+ | TABLESPACE REORG PAGESIZE pagesize | ||
+ | MANAGED BY SYSTEM USING ('< | ||
+ | DROPPED TABLE RECOVERY OFF Copy | ||
+ | </ | ||
+ | //The ''< | ||
+ | |||