Solved

Reduce Oracle Database size

Posted on 2011-02-20
3
1,011 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

743 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

10 Experts available now in Live!

Get 1:1 Help Now