Hello,
I got stung today as Orasnap reporting was falsly indicating that there were no 'Object Extent Warning' or 'Segs >= 50% Of MaxExts' issues.
The no segs > 50% of max extents I can understand as maxextents is huge. And the 'object extent warning' misinterpretation is due I believe to the fact that for locally managed tablespaces next extents is 0 and so there is ALWAYS room for 0 bytes !!!
I found Oracle Note 1020090.6, Script to Report on Space in Tablespaces which is supposed to be good for product versions 7.3 to 9.2. Inside this script, oracle has a query to identify segments where there's not enough room for the next extent.
I've recreated the problem, I believe it is bigger than being and Orasnap issue. I found Oracle Note 1020090.6, Script to Report on Space in Tablespaces which is supposed to be good for product versions 7.3 to 9.2. Inside this script, oracle has a query to identify segments where there's not enough room for the next extent.
I've created a tablespace and table on a test database and it was created as locally managed, autoallocate, initial 512K, tablespace max size is 1MB (maybe 8k bigger than that I manually expanded in 1 time).
Anyway, whenever autoallocate is used, the next extent doesn't ever get taken (if specified on creation) because Oracle uses it's own system generated next extents.
I created a plsql loop to fill the table until ora-01653.
So, now we have a table, that cannot extend 1 more time. Running both oracle's version of the report and orasnap's version of the report, neither one of them report a problem. I believe this is due to the fact that both are quering dba_free_space, and this table/tablespace doesn't even show up in that view since it has no space.
Ideally, I would like to get the warning if a tablespace is near 80% of the amount it could grow to, assuming tablespace autoextend were to function the max. Has anyone else ran into this and if so, do you have a nice fix? Thanks in advance!
I got stung today as Orasnap reporting was falsly indicating that there were no 'Object Extent Warning' or 'Segs >= 50% Of MaxExts' issues.
The no segs > 50% of max extents I can understand as maxextents is huge. And the 'object extent warning' misinterpretation is due I believe to the fact that for locally managed tablespaces next extents is 0 and so there is ALWAYS room for 0 bytes !!!
I found Oracle Note 1020090.6, Script to Report on Space in Tablespaces which is supposed to be good for product versions 7.3 to 9.2. Inside this script, oracle has a query to identify segments where there's not enough room for the next extent.
I've recreated the problem, I believe it is bigger than being and Orasnap issue. I found Oracle Note 1020090.6, Script to Report on Space in Tablespaces which is supposed to be good for product versions 7.3 to 9.2. Inside this script, oracle has a query to identify segments where there's not enough room for the next extent.
I've created a tablespace and table on a test database and it was created as locally managed, autoallocate, initial 512K, tablespace max size is 1MB (maybe 8k bigger than that I manually expanded in 1 time).
Anyway, whenever autoallocate is used, the next extent doesn't ever get taken (if specified on creation) because Oracle uses it's own system generated next extents.
I created a plsql loop to fill the table until ora-01653.
So, now we have a table, that cannot extend 1 more time. Running both oracle's version of the report and orasnap's version of the report, neither one of them report a problem. I believe this is due to the fact that both are quering dba_free_space, and this table/tablespace doesn't even show up in that view since it has no space.
Ideally, I would like to get the warning if a tablespace is near 80% of the amount it could grow to, assuming tablespace autoextend were to function the max. Has anyone else ran into this and if so, do you have a nice fix? Thanks in advance!
Code:
[b]***Orasnap's report (adjusted to include just my tablespace to speed up query)***[/b]
SQL> select ds.OWNER,
2 ds.SEGMENT_NAME,
3 ds.SEGMENT_TYPE,
4 ds.TABLESPACE_NAME,
5 ds.NEXT_EXTENT,
6 dfs.MAX,
7 dfs.SUM,
8 ds.EXTENTS
9 from dba_segments ds,
10 (select max(BYTES) max,
11 sum(BYTES) sum,
12 TABLESPACE_NAME
13 from dba_free_space
14 where tablespace_name='TODDTEST'
15 group by tablespace_name) dfs
16 where ds.NEXT_EXTENT > dfs.MAX
17 and ds.TABLESPACE_NAME = dfs.TABLESPACE_NAME
18 order by ds.OWNER, ds.TABLESPACE_NAME, ds.SEGMENT_NAME;
no rows selected
[b]***Oracle's own query (adjusted to query just my tablespace) ***[/b]
SQL> select a.owner, a.segment_name, b.tablespace_name,
2 decode(ext.extents,1,b.next_extent,
3 a.bytes*(1+b.pct_increase/100)) nextext,
4 freesp.largest
5 from dba_extents a,
6 dba_segments b,
7 (select owner, segment_name, max(extent_id) extent_id,
8 count(*) extents
9 from dba_extents
10 group by owner, segment_name
11 ) ext,
12 (select tablespace_name, max(bytes) largest
13 from dba_free_space
14 where tablespace_name='TODDTEST'
15 group by tablespace_name
16 ) freesp
17 where a.owner=b.owner and
18 a.segment_name=b.segment_name and
19 a.owner=ext.owner and
20 a.segment_name=ext.segment_name and
21 a.extent_id=ext.extent_id and
22 b.tablespace_name = freesp.tablespace_name and
23 decode(ext.extents,1,b.next_extent,
24 a.bytes*(1+b.pct_increase/100)) > freesp.largest
25 /
no rows selected