14 Ekim 2014 Salı

HOW TO RESIZE OR ADD TABLESPACE SIZE ?


How to resize an existing tablespace datafile;

alter database
datafile  '<datafile_path/data_file_name>'
resize 150M;

For example;

alter database
datafile '/ora_data/PROD/proddata/xxxt06.dbf'
resize 150M;


How to add a new datafile on partition for an existing tablespace;

alter tablespace
<tablespace_name>
add datafile '<datafile_path/data_file_name>'
size 200M
autoextend on;

For example;

alter tablespace 
xxxt
add datafile '/ora_data/PROD/proddata/xxxt07.dbf'
size 500M
autoextend off;

I have also added  'autoextend on/off' option which is useful.It will manage automatically extending datafile's size.

To see also tablespace autospace management;

select tablespace_name,segment_space_management
from dba_tablespace;

Hiç yorum yok:

Yorum Gönder