可以这么去做。
但要注意步骤:
1.使该数据文件的表空间脱机
alter tablespace xxxx offline normal;2.在操作系统里移动数据文件并重命名
$ rm /oracle/oradata/orcl/users01.dbf /u01/oracle/oradata/orcl/users01.dbf3.在数据库里重命名数据文件
alter tablespace xxxx
rename '/oracle/oradata/orcl/users01.dbf'
to '/u01/oracle/oradata/orcl/users01.dbf';4.恢复表空间
alter tablespace xxxx online normal;
但要注意步骤:
1.使该数据文件的表空间脱机
alter tablespace xxxx offline normal;2.在操作系统里移动数据文件并重命名
$ rm /oracle/oradata/orcl/users01.dbf /u01/oracle/oradata/orcl/users01.dbf3.在数据库里重命名数据文件
alter tablespace xxxx
rename '/oracle/oradata/orcl/users01.dbf'
to '/u01/oracle/oradata/orcl/users01.dbf';4.恢复表空间
alter tablespace xxxx online normal;
这条命令是否会把前一个文件拷贝到后一个文件中?
(LINUX 命令还不是很熟,但我查RM说明,好象不能用来拷贝,只是删除文件)
应该为
$ mv /oracle/oradata/orcl/users01.dbf /u01/oracle/oradata/orcl/users01.dbf
但这里也有一个错误,更正一下,
alter tablespace xxxx online normal; 这句语句有错误,正确为: alter tablespace xxxx online;