|
沙发
楼主 |
发表于 2023-8-22 16:13:44
|
只看该作者
本帖最后由 jiawang 于 2023-8-22 16:18 编辑
12C 以上可以在线使用move修改数据文件名称了
SQL> r
1* select name,file#,status from v$datafile
NAME FILE# STATUS
-------------------------------------------------- ---------- -------
/u01/app/oracle/oradata/orcl/system01.dbf 1 SYSTEM
/u01/app/oracle/oradata/orcl/sysaux01.dbf 2 ONLINE
/u01/app/oracle/oradata/orcl/undotbs01.dbf 3 ONLINE
/u01/app/oracle/oradata/orcl/users01.dbf 4 ONLINE
/u01/app/oracle/oradata/orcl/example01.dbf 5 ONLINE
/u01/app/oracle/oradata/orcl/EXAMPLE02.dbf 6 ONLINE
6 rows selected.
SQL> alter database move datafile '/u01/app/oracle/oradata/orcl/system01.dbf' to '/home/oracle/system.dbf';
Database altered.
SQL> select name,file#,status from v$datafile
2 ;
NAME FILE# STATUS
-------------------------------------------------- ---------- -------
/home/oracle/system.dbf 1 SYSTEM
/u01/app/oracle/oradata/orcl/sysaux01.dbf 2 ONLINE
/u01/app/oracle/oradata/orcl/undotbs01.dbf 3 ONLINE
/u01/app/oracle/oradata/orcl/users01.dbf 4 ONLINE
/u01/app/oracle/oradata/orcl/example01.dbf 5 ONLINE
/u01/app/oracle/oradata/orcl/EXAMPLE02.dbf 6 ONLINE
6 rows selected. |
|