Add Data file to a Tablespace
adding datafile add new data file
Execute the following command to create the necessary file
ALTER TABLESPACE <TABLESPACE NAME> ADD DATAFILE ‘<DATA FILE PATH>’ SIZE 10G AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;
#sqlplus / as sysdba
set pages 999
set lines 400
col FILE_NAME format a75
select d.TABLESPACE_NAME, d.FILE_NAME, d.BYTES/1024/1024 SIZE_MB,
d.AUTOEXTENSIBLE, d.MAXBYTES/1024/1024 MAXSIZE_MB,
d.INCREMENT_BY*(v.BLOCK_SIZE/1024)/1024 INCREMENT_BY_MB
from dba_data_files d, v$datafile v
where d.FILE_ID = v.FILE#
order by d.TABLESPACE_NAME, d.FILE_NAME;
d.AUTOEXTENSIBLE, d.MAXBYTES/1024/1024 MAXSIZE_MB,
d.INCREMENT_BY*(v.BLOCK_SIZE/1024)/1024 INCREMENT_BY_MB
from dba_data_files d, v$datafile v
where d.FILE_ID = v.FILE#
order by d.TABLESPACE_NAME, d.FILE_NAME;
Execute the following command to create the necessary file
ALTER TABLESPACE <TABLESPACE NAME> ADD DATAFILE ‘<DATA FILE PATH>’ SIZE 10G AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;
No comments:
Post a Comment