Rename DataFile in Oracle

How to rename a dataFile in Oracle.

The alter database method:

.1. Shut down the instance

As adm ---->>>> stopsap r3
sqlplus /nolog
connect / as sysdba
ALTER SYSTEM ARCHIVE LOG CURRENT;
shutdown
exit



.2. Rename and/or move the datafile using operating system commands.

cd /oracle//sapsystem/system_3
cp '/oracle//sapsystem/system_3/system.data3"' '/oracle//sapsystem/system_3/system.data3.xxx'
mv '/oracle//sapsystem/system_3/system.data3"' '/oracle//sapsystem/system_3/system.data3'



.3. Start the instance Oracle.

sqlplus /nolog
connect / as sysdba;
startup mount ;
alter database rename file '/oracle//sapsystem/system_3/system.data3"' TO '/oracle//sapsystem/system_3/system.data3';
alter database open;
exit



As adm ---->>>> startsap