oracle 12c 移动数据文件

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/system01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/users01.dbf
/u01/app/oracle/oradata/tt.dbf


SQL> create table tt (id int) tablespace tt;

Table created.


SQL> select * from tt;

        ID
----------
         1


SQL> alter database move datafile '/u01/app/oracle/oradata/tt.dbf' to '/u01/app/oracle/oradata/orcl/tt01.dbf';

Database altered.


SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/system01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/users01.dbf
/u01/app/oracle/oradata/orcl/tt01.dbf


SQL> select * from tt;

        ID
----------
         1

  

posted @ 2022-01-14 10:52  orcl  阅读(101)  评论(0编辑  收藏  举报