SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE 12.1.0.2.0 Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> select name from v$datafile where file#=1;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/sztech/system01b.dbf
1 rows selected.
SQL> alter database move datafile '/u01/app/oracle/oradata/sztech/system01b.dbf' to '/u01/app/oracle/oradata/sztech/system01.dbf';
Database altered.
SQL> select name from v$datafile file#=1;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/sztech/system01.dbf
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL>
连system表空间都可以在线修改,其他文件,就更不用说。
能否移动到其他地方去呢,
答案是肯定的,可以从文件系统移动到asm,也可以从asm移动到文件系统;
alter database move datafile 1 to '+data' ;