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: Changing datafile size.

Re: Changing datafile size.

From: Joel Garry <joel-garry_at_home.com>
Date: 21 Dec 2005 14:58:49 -0800
Message-ID: <1135205929.519080.268920@g44g2000cwa.googlegroups.com>


Oracle will let you decrease the size of the file manually down to where it hits some data. So if you want to balance the two files, you must manually move the data at the top of the tablespace away to another tablespace (look for alter table move command, or export and truncate, or ctas and delete, depending on RI), shrink the file, then move the data back to the tablespace.

You can see where the data is in the tablespace with a GUI tool like OEM (look for tablespace map under storage by right clicking on the tablespace name), or google for scripts to do it the hard way.

I had a tablespace in a bunch of datafiles, then shrank some of the data. Rather than rebuilding everything, I just shrank down the last few data files, set them to autoextend with a limit of their original size. Now I don't have to worry about that tablespace for months.

Be careful shrinking datafiles if you have extremely old versions of Oracle, there were bugs.

jg

-- 
@home.com is bogus.
http://www.linkworld.ws/funny/monkey/
Received on Wed Dec 21 2005 - 16:58:49 CST

Original text of this message

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