Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

DEFRAGMENT+REPACK+SHRINK with IDS 11.7FC5

$
0
0
Hi All,

To keep the number of table extents low and to release some unused pages within the dbspace I use a self made script which does ...

1. EXECUTE FUNCTION TASK("defragment","database:table")
to reduce extents

2. EXECUTE FUNCTION TASK("table repack","table","database","tab owner")
to get rid of empty pages (if exist) and move to content to free pages

3. EXECUTE FUNCTION TASK("table shrink","table","database","tab owner")
to give free space back to dbspace

This works fine apart from some exceptions I struggle with.
In some cases every single command (mentioned above) ends up with OK/successful but at the end nothing changed, i.e. for a table called TAB1 which has the following properties:

TAB1 (with pagesize 4K)
14 pages used
14 pages allocated
fextsize 16
nextsize 16
3 extents

Maybe I have some gaps in my knowledge, but for the moment I'm not able to logically combine in my head what to do to bring the no of extents down to 1 ;)

Best regards from Germany and thanks in advance for any help
:rolleyes:

Viewing all articles
Browse latest Browse all 13329

Trending Articles