Skip to main content

Datafile Rename.


Datafile Rename


To properly move the datafile around or rename the datafile, follow this steps:

 1. Login to oracle SQLPlus or Connect to target database using any trird party tool.

 bash#sqlplus /nolog
SQL> conn sys as sysdba
   
2. Shutdown the database instance with SHUTDOWN command.
SQL> shutdown immediate;
   
3. Rename or/and move the datafiles at operating system level.
   
4. Start Oracle database in mount state with STARTUP MOUNT command.
SQL> startup mount;
   
5. Modify the name or location of datafiles in Oracle data dictionary using following command syntax:
    SQL> ALTER DATABASE RENAME FILE ‘<fully qualified path to original data file name>’ TO ‘<new or original fully qualified path to new or original data file name>’;
   
6. Open Oracle database instance completely with ALTER DATABASE OPEN command.
SQL> alter database open;
------------------------------------------------------------------------------------------------


hAPPY TO hELP !!!

Comments