Oracle - Rename DataFile

Sometimes, we need to rename Datafiles in Oracle, here we show you the alter database method.


1. Shut down the SAP 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 Oracle Instance.

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

4. Start the SAP Instance.

As adm ---->>>> startsap