set ORACLE_SID = ORCL;
sqlplus /nolog
connect sys/1234 as sysdba;
alter tablespace tablespace_name offline;
alter database rename file '......\tablespace_name.dbf' to '......\tablespace_name.dbf';
alter tablespace tablespace_name online;
recover datafile 'tablespace_name.DBF';
alter tablespace tablespace_name online;
commit;
exit;
SELECT tablespace_name,
file_id,
file_name,
round(bytes / (1024 * 1024), 0) total_space
FROM dba_data_files