RENAME OR MOVE A LOGFILE IN ORACLE

 RENAME AND OR MOVE A LOGFILE


1. Shutdown the database.

    SQL> SHUTDOWN IMMEDIATE;  

2. Copy the logfile to the new name/location at operating system level.

    $cp oldfile  newfile  

3. Mount the database.

     SQL> STARTUP MOUNT

      This command  reads the control file but will not mount the datafiles. 

4. Rename the file.

     SQL> ALTER DATABASE RENAME FILE
                'PATH_OF_OLD_LOCATION/REDO_LOG_NAME.LOG'
                TO
                '/PATH_OF_NEW_LOCATION/REDO_LOG_NAME.LOG';


5. Open the database.

     SQL> ALTER DATABASE OPEN;

6. Remove the logfile(s) from the old location at the operating system level.

     $rm oldfile

Post a Comment

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post