1 数据文件的状态设置为offline状态
表空间置为offline
SQL> select file_name,tablespace_name from dba_data_files;
SQL> alter tablespace users offline;
SQL> select name,status from v$datafile;
NAME STATUS
-------------------------------------------------- -------
/u01/app/oracle/oradata/ORA11GR2/system01.dbf SYSTEM
/u01/app/oracle/oradata/ORA11GR2/sysaux01.dbf ONLINE
/u01/app/oracle/oradata/ORA11GR2/undotbs01.dbf ONLINE
/u01/app/oracle/oradata/ORA11GR2/users01.dbf OFFLINE
/u01/app/oracle/oradata/ORA11GR2/example01.dbf ONLINE
2 操作系统层面完成真正的改名操作
3 数据库层面修改数据文件名
alter database rename file ‘/u01/app/oracle/oradata/ORA11GR2/users01.dbf‘ to ‘/u01/app/oracle/oradata/ORA11GR2/users01.dbf.bk‘;
4 表空间重新置为online状态
alter tablespace users online;
SQL> select name,status from v$datafile;