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: How to shrink a database on Linux?

Re: How to shrink a database on Linux?

From: A.Liggins <A.Liggins_at_hotmail.com>
Date: Sat, 8 Sep 2001 12:10:32 +0100
Message-ID: <9ncues$a8$1@uranium.btinternet.com>


First off connect as system or sys.

Make sure the large table has been dropped

drop table owner.table_name;

select * from dba_tablespaces;

And for each tablespace :-

alter tablespace a_tablespace_name coalesce; (this should shrink them).

select * from v$datafile;

For each datafile :-
alter database datafile '/the/name/datafile' resize 50m;

If you get an error try resizing to a slightly large size than 50m, (repeat)

Liggs

"Some One Else" <algernon_at_spamcop.net> wrote in message news:MOZl7.95371$MC1.30735949_at_news1.elcjn1.sdca.home.com...
>
> Ok, I finally got Oracle 8.1.7 to install on Linux Mandrake 8. I used the
> Dbassist to create the database. At that time I had about 400 megs or more
> left on a 1.8 meg drive.
>
> Then I ran a thrasher test program. And it ate all my space creating the
> test table. So I dropped the test table. But Oracle hasn't relinquished
the
> space it gobbled up. How do I get the database to shrink?
>
> If that's not possible, how do I safely delete the database without having
> to do another (12th ?) nightmarish install?
>
> Thanks everyone!
Received on Sat Sep 08 2001 - 06:10:32 CDT

Original text of this message

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