We can use the alter tablespace rename datafile command, but the tablespace most be offline and you must re-name the data file while the tablespace is offline:
sqlplus: ALTER TABLESPACE cust_ts OFFLINE;
linux> mv 'OLDFILE.DBF ' 'NEWFILE.DBF'
sqlplus: ALTER TABLESPACE
cust_ts
RENAME datafile
'/u01/app/oracle/mysid/oldname.dbf'
TO
'/u01/app/oracle/mysid/newname.dbf'
We can also use the alter database rename datafile command, but the data file must be renamed in the OS (using the mv linux command) while the database is down and the rename data file must be done while the database is un-opened (in the mount stage):
sqlplus: shutdown;
linux> mv 'OLDFILE.DBF ' 'NEWFILE.DBF'
sqlplus: startup mount;
sqlplus: ALTER DATABASE
RENAME file
'/u01/app/oracle/mysid/oldname.dbf'
TO
'/u01/app/oracle/mysid/newname.dbf'
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/66530/viewspace-548707/ ,如需转载,请注明出处,否则将追究法律责任。