Prior to Oracle 12c, moving datafiles has always been an offline task
Oracle 12c includes an enhancement to
Connect as SYSDBA
SQL>SELECT file_id, file_name FROM dba_data_files ORDER BY file_id;
SQL> ALTER DATABASE MOVE DATAFILE '/u01/app/oracle/oradata/cdb1/system01.dbf'
TO '/tmp/system01.dbf';
Database altered.
SQL> SELECT file_id, file_name FROM dba_data_files WHERE file_id = 1;
Oracle 12c includes an enhancement to
ALTER DATABASE
command to allow datafiles to be moved onlineConnect as SYSDBA
SQL>SELECT file_id, file_name FROM dba_data_files ORDER BY file_id;
SQL> ALTER DATABASE MOVE DATAFILE '/u01/app/oracle/oradata/cdb1/system01.dbf'
TO '/tmp/system01.dbf';
Database altered.
SQL> SELECT file_id, file_name FROM dba_data_files WHERE file_id = 1;