Monday , November 25 2024

Script to Reduce the tablespace size and reduce the free pages

 

Most of the cases we need to monitor the space of the FileSystem while data is growing in the database.

And if there are any delete operations performed on a table then the table must be reorged and space should be reclaimed.

It this case we need to reduce the free pages that are there in a tablespace.

So to automate that we can use the below script.

Here is the script.

Loading

About Vinay Kumar

One comment

  1. santosh Raghuwanshi

    This script is fine . I would suggest couple of additions
    1. Check to ensure it runs at specific time so that There should be minimum sufficient pages to ensure insert /load operation should not be affected due to less number of free pages (this happens in very rare cases but terminate Load/insert)
    2. This script takes care of only Automatic tablespaces . It Can be amended to take care of those tablespaces which has created in 9.7 as DMS but not automatic.

Leave a Reply

Your email address will not be published. Required fields are marked *