on 04-15-2014 7:28 AM
Hi,
is it possible to move certain amt of tables/data from one datafile to another datafile of same tablespace to reduce
the size of the datafile.
one of the datafile is of size 10g . so i want to reduce the size of the datafile by moving the content to another datafile which is of size 2G.
Kindly suggest.
Regards
Yugandhar.
You will need to do a tablespace reorganization.
Regards
RB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
It is easily possible to move a table from a tablespace to another, but you do not have control over the datafile within that tablespace that will be used. Efficient reduction of datafile size will require to reorganize the tablespace.
10 G does not seem too big for a datafile.
Check how datafiles are defined and how extension is set,
select FILE_NAME, substr(TABLESPACE_NAME,1,15), ONLINE_STATUS, BYTES/1024/1024, MAXBYTES/1024/1024 from dba_data_files;
You could block extension on the 'big' datafile
(setting maxsize to current size => MAXSIZE or disabling autoextend => AUTOEXTEND OFF ) and then only the second one will grow.
alter database datafile 'D:\ORACLE\SID\SAPDATA4\SID_10\SID.DATA10' autoextend off;
alter database datafile 'D:\ORACLE\QAS\SAPDATA4\QAS_10\QAS.DATA10' maxsize 10000M;
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi yves,
Re-org will give some space. but my scenario is few datafiles is of 10G. i have to move some contents to other datafile which is of 4G to have size of all datafile size in uniform.
Is it possible in my case because Re-org wil provide space but will not reduce datafile size of 10g to <10g.
i have already made auto extend off.
Please suggest.
Regards
Yugandhar.
Message was edited by: yugandhar yugi
Is it possible in my case because Re-org wil provide space but will not reduce datafile size of 10g to <10g.
Not correct. if you do a tablespace reorg then you have the preivilege to create the tablespace datafiles in the size you want.
Eg: if you are doing the reorg of the tablespace using export / import then you will export the contents to the OS level. Drop the tablespace and recreate them and start the import.
Regards
RB
Hello
After a reorg it is possible to shrink the datafile to recover the freespace alter database datafile 'D:\...\SID.DATA10' resize 8G;
You could also move all segments to a new tablespace with size limited datafiles and the rename the tablespace.
By the end I do not see major drawbacks to have a datafile bigger than the other, especially if it is as small as 10g .
Regards
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.