Monday, December 9, 2019


Add  Data file to a Tablespace

adding datafile  add new data file 

#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;
 
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

  RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...