Move a datafile online
OracleStorageCommand
ALTER DATABASE MOVE DATAFILE
'/u01/oradata/ORCL/customer_data01.dbf'
TO '/u03/oradata/ORCL/customer_data01.dbf';
-- Move into ASM:
ALTER DATABASE MOVE DATAFILE
'/u01/oradata/ORCL/customer_data01.dbf' TO '+DATA';
-- Use KEEP to retain the old file instead of deleting it:
-- ALTER DATABASE MOVE DATAFILE '...' TO '...' KEEP;What it does
Moves a datafile to a new location while the database is open (12c+); changes storage without downtime.
When to use it
When changing the disk/mount point, migrating to ASM, or moving to hot storage.
Caution
Requires 12c or later and Enterprise Edition. The move generates extra I/O. If you do not use KEEP, the old file is deleted.