Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

How to automate tablespace expansion task?

JasonPCMar 6 2024

I'm wondering, is there anyway that I could perhaps create a job that will increase my tablespace size whenever it hit certain threshold?

My database is not running on ASM nor I have enterprise manager running. I monitored the disk space usage via cron jobs scheduled every day. Within this cron job, there's a job to monitor tablespace sizes and whenever any tablespace hit 90% usage, I will receive an alert to my email which I then manually increase the tablespace by adding more datafiles to it so the usage will come back down.

Theoretically it seems quite straight forward to automate the task I can get the output of my cron jobs and issue the ‘alter tablespace add datafile’ command, but somehow it's rather not practical to implement it since I each tablespace has different naming for the datafiles.

Thus I'm just asking for any ideas or feedbacks on whether this can be done or not.

Comments
Post Details
Added on Mar 6 2024
5 comments
127 views