In previous Oracle versions to move datafile to another location # procedure as follows
# Make datafile offline
# Rename datafile to another location
# copy datafile from old location to new location @
# Recover datafile
# Make datafile online
In 12c # we can move datafile online #
# Make datafile offline
# Rename datafile to another location
# copy datafile from old location to new location @
# Recover datafile
# Make datafile online
In 12c # we can move datafile online #
[oracle@red ~]$ mkdir -p /u01/app/mldb69
[oracle@red ~]$ exit
SQL> alter database move datafile '/u02/database/mldb69/MLDB69/datafile/fix0001.dbf' to '/u01/app/mldb69/fix0001.dbf';
Database altered.
SQL> COLUMN file_name FORMAT A70
SELECT file_id, file_name FROM dba_data_files ORDER BY file_id;SQL>
FILE_ID FILE_NAME
---------- ----------------------------------------------------------------------
1 /u02/database/mldb69/MLDB69/datafile/o1_mf_system_bmjl16tx_.dbf
2 /u02/database/mldb69/MLDB69/datafile/o1_mf_sysaux_cnkdbgdz_.dbf
3 /u02/database/mldb69/MLDB69/datafile/o1_mf_sysaux_bmjkxj7o_.dbf
4 /u02/database/mldb69/MLDB69/datafile/o1_mf_undotbs1_bmjl4npx_.dbf
5 /u02/database/mldb69/MLDB69/datafile/o1_mf_stage_cnjrt641_.dbf
6 /u02/database/mldb69/MLDB69/datafile/o1_mf_users_bmjl4k6w_.dbf
7 /u02/database/mldb69/MLDB69/datafile/o1_mf_system_cnkdc79d_.dbf
8 /u02/database/mldb69/MLDB69/datafile/ggs_stage01.dbf
9 /u02/database/mldb69/MLDB69/datafile/harry01.dbf
10 /u02/database/mldb69/MLDB69/datafile/admin01.dbf
12 /u01/app/mldb69/fix0001.dbf
---Nikhil Tatineni---
---12c Database #
---12c Database #