stephenwales
MIS
We have recently converted our databases from a combination on LMT auto extent allocation and DMT to all being LMT with Uniform Extent Allocation.
One of the things I need to do now, is to set up a monitor that will inform me that I have an object that can't grow to its next extent.
In Oracle 8, I might have done something like this:
Not sure if that would get me exactly what I want, but it's near enough - the theory behind it being that if at any time for any object in the database, the next required extent is greater than the largest amount of contiguous freespace in the tablespace, then I, as a DBA, need to know about it so that action can be taken before a failure occurs.
One thing that could be done, I suppose, is auto-extendable tablespaces - but we don't use that feature here, so that's out.
Doing some research on uniform extent sizes, it appears that the only time we'll get a problem is when every extent in the tablespace is used, hence there's no space left to grow into a new one - problem with this is that once the last extent is allocated, that there's no longer any records in DBA_FREE_SPACE.
I'm wondering if the solution to my problem here is something as simple as this:
Is it truly this simple, or am I missing something here?
Steve
One of the things I need to do now, is to set up a monitor that will inform me that I have an object that can't grow to its next extent.
In Oracle 8, I might have done something like this:
Code:
select table_name
from dba_tables a
where next extent >
(select max(bytes)
from dba_free_space b
where a.tablespace_name = b.tablespace_name);
Not sure if that would get me exactly what I want, but it's near enough - the theory behind it being that if at any time for any object in the database, the next required extent is greater than the largest amount of contiguous freespace in the tablespace, then I, as a DBA, need to know about it so that action can be taken before a failure occurs.
One thing that could be done, I suppose, is auto-extendable tablespaces - but we don't use that feature here, so that's out.
Doing some research on uniform extent sizes, it appears that the only time we'll get a problem is when every extent in the tablespace is used, hence there's no space left to grow into a new one - problem with this is that once the last extent is allocated, that there's no longer any records in DBA_FREE_SPACE.
I'm wondering if the solution to my problem here is something as simple as this:
Code:
select tablespace_name
from dba_tablespaces
where tablespace_name not in
(select tablespace_name from dba_free_space)
and contents not in ('TEMPORARY', 'UNDO');
Is it truly this simple, or am I missing something here?
Steve