Solved

Reduce Oracle Database size

Posted on 2011-02-20
3
1,012 Views
Last Modified: 2012-05-11
Dear Experts ,

I have oracle 9i database and 10g database in the company which is used for testing purpose. The Database Size is 42 GB and the company decided to remove 2 year old data and  take the export and store it on the DVD and use this server for different purpose.
I have deleted almost 90 % of the data from almost 100 tables but the size of the database is not reduced. The Database size is still the same.
I know that oracle 9i does not reclaim the free space. As far as i know for oracle 10g we can use shrink space or shrink space compact

So i need to reduce the size to as less as possible. So what is the best way to do that ?

Please let me know to reduce the size of the database for both 9i and 10g database ?

Thanks

0
Comment
Question by:oraclescsa
3 Comments
 
LVL 26

Expert Comment

by:tigin44
ID: 34937629
you should shrink the database files this link may halp you.

http://www.articles.freemegazone.com/shrinking-oracle-datafiles.php
0
 
LVL 15

Accepted Solution

by:
Aaron Shilo earned 500 total points
ID: 34937686
hi

in 9i : use the ALTER table XXX move;
this will rebuild the table and use only the space it needs.
you alsow must rebuild all indexes after this action.

in 10g: use shrink space compact

after you done that if you want to shrink the physical size of the datafile use :
alter database datafile resize XXmb;
0
 

Author Comment

by:oraclescsa
ID: 35014595
Dear Ashilo,

In Oracle 9i i have the same as suggested and it is successful.

In oracle 10g do i need to rebuild the index after running the shrink space compact command.
Is there any impact if this command is used .
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now