68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
select s.segment_name, s.tablespace_name, s.next_extent,
s.extents, decode(s.max_extents,2147483645,-1,s.max_extents) n1
from sys.dba_segments s, sys.dba_free_space fs
where s.segment_type in (
'TABLE','TABLE PARTITION',
'INDEX','INDEX PARTITION',
'LOBINDEX','LOBSEGMENT')
and s.tablespace_name <> 'SYSTEM'
and s.tablespace_name = fs.tablespace_name
and (s.next_extent *12 ) > (select max(fs2.bytes)
from sys.dba_free_space fs2
where s.tablespace_name = fs2.tablespace_name)
group by s.segment_name, s.tablespace_name, s.next_extent,
s.extents, decode(s.max_extents,2147483645,-1,s.max_extents)
INTERSECT
select s.segment_name, s.tablespace_name, s.next_extent,
s.extents, decode(s.max_extents,2147483645,-1,s.max_extents) n1
from sys.dba_segments s, sys.dba_free_space fs
where s.segment_type in (
'TABLE','TABLE PARTITION',
'INDEX','INDEX PARTITION',
'LOBINDEX','LOBSEGMENT')
and s.tablespace_name <> 'SYSTEM'
and s.tablespace_name = fs.tablespace_name
and 12 > (select count(*)
from sys.dba_free_space fs2
where s.tablespace_name = fs2.tablespace_name
and s.next_extent <= fs2.bytes)
group by s.segment_name, s.tablespace_name, s.next_extent,
s.extents, decode(s.max_extents,2147483645,-1,s.max_extents)
order by 2;
-----Original Message-----
From: Joan Hsieh [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 9:03 AM
To: [EMAIL PROTECTED]
Subject: RE: failed to extent to the nextWell, if next_extent=250m, pctincrease=0. bytes *12 >= next_extent means dba_free_space must have a (bytes*12) large space to satisfy the condition. But I want 12 slots >250m, if I get less than 12 slots < 250m, I will get email. Gee, I am confused myself, am I right?Joan-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jacques Kilchoer
Sent: Thursday, April 05, 2001 5:51 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: failed to extent to the next> -----Original Message-----
> From: Joan Hsieh [mailto:[EMAIL PROTECTED]]
>
> I used to use this script detect the tablespace fail to
> extent to the next
> and sent email to me everyday. It works fine. However, the
> other dba think
> next extent is not good enough to get quick responds since we
> have so much
> volume transactions going on. He want to detect the
> tablespace can't extent
> to the next 12 extents. I tried couple ways, (bytes * 12)
> but that result
> not 100% correct. Thanks in advance if someone can share your ideas.What do you mean by "not 100% correct"? How do you know? Have you considered the pct_increase factor for the next_extent?
