Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Script to find segment that have just ONE more extent

Re: Script to find segment that have just ONE more extent

From: Luis Santos <lsantos_at_pobox.com>
Date: Mon, 08 Jan 2001 17:49:14 GMT
Message-ID: <93cuil$tpt$1@nnrp1.deja.com>

   Hi Michael!

   Well, this is a part, the easy part, of the script.

   Letīs assume that you have a table called TAB, located on tablespace TBS01. TAB has a initial extent of 10M, a next of 5M and maxextents unlimited.

   If the following select

select bytes from dba_free_space
where tablespace_name='TBS1'
order by 1 desc;

   returns a output like this one

     BYTES


   8000000
   4000000
   2000000

       ...

   I would like to be advised too, as a next allocation can fit on the 8000000 extents but the after on donīt.

   Best regards,
   Luis Santos

In article <93ci97$q63$1_at_s1.read.news.oleane.net>,   "Michel Cadot" <micadot_at_netcourrier.com> wrote:
> I'm not sure to understand what you want.
> Is it not this:
> select segment_name from user_segments where extents=max_extents-1;
>
> --
> Have a nice day
> Michel
>
> "Luis Santos" <lsantos_at_pobox.com> a écrit dans le message news:
 93cc8o$db5$1_at_nnrp1.deja.com...
> > Hello!
> >
> > There are several scripts on the Web (and itīs easy to write
 one!)
> > that show the segments that canīt be extended anymore, due to
> > maxextents reached or no more contiguous space on the segmentīs
> > tablespace.
> >
> > But itīs not easy to find or write a script that shows all the
> > segments that can allocate more one, and only one, extent.
> >
> > Does someone has such a script?
> >
> > Best regards
> >
> > --
> > Luis Santos
> > Oracle DBA
> >
> >
> > Sent via Deja.com
> > http://www.deja.com/
>
>

--
   Luis Santos
   Oracle DBA


Sent via Deja.com
http://www.deja.com/
Received on Mon Jan 08 2001 - 11:49:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US