Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Reduce Oracle Database size

Posted on 2011-02-20
3
Medium Priority
?
1,031 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

596 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