Rename Datafile In Oracle Standby on New Location
Rename Datafile In Oracle Standby on New Location
Recently, I encountered a situation while working for a customer where there was a space constraint on the DR server. Unfortunately, we were unable to allocate additional space. However, some directories had approximately 90GB of available free space. To resolve this issue, I came up with a solution to rename the data file and move it to a new mount that had sufficient space. The process of renaming a data file on a standby database is relatively straightforward.
SQL> Alter database recover managed standby database cancel;
SQL> shutdown immediate
SQL> startup mount
SQL> alter system set standby_file_management=MANUAL;
ALTER DATABASE MOVE DATAFILE '/u01/oracle/db/UATDB/APEX002.dbf' TO '/u20/oracle/db/UATDB/APEX002.dbf';
SQL> alter system set standby_file_management=AUTO;
Step 5: Resume the managed recovery process that was halted in Step 1.
SQL> Alter database recover managed standby database using current logfile disconnect;