Sunday, August 29, 2021

 Renaming or Moving Oracle Files

https://oracle-base.com/articles/misc/renaming-or-moving-oracle-files


SQL> SELECT member FROM v$logfile;

MEMBER
--------------------------------------------------------------------------------

/u02/oradata/PRODCDB/redo010.log
/u01/oradata/PRODCDB/redo011.log
/u02/oradata/PRODCDB/redo020.log
/u01/oradata/PRODCDB/redo021.log
/u02/oradata/PRODCDB/redo030.log
/u01/oradata/PRODCDB/redo031.log


SQL> shutdown immediate

HOST mv /u01/oradata/PRODCDB/redo011.log /u02/oradata/PRODCDB/redo011.log

HOST mv /u01/oradata/PRODCDB/redo021.log /u02/oradata/PRODCDB/redo021.log

HOST mv /u01/oradata/PRODCDB/redo031.log /u02/oradata/PRODCDB/redo031.log


SQL> STARTUP MOUNT

ALTER DATABASE RENAME FILE '/u01/oradata/PRODCDB/redo011.log' TO '/u02/oradata/PRODCDB/redo011.log';

ALTER DATABASE RENAME FILE '/u01/oradata/PRODCDB/redo021.log' TO '/u02/oradata/PRODCDB/redo021.log';


ALTER DATABASE RENAME FILE '/u01/oradata/PRODCDB/redo031.log' TO '/u02/oradata/PRODCDB/redo031.log';


SQL> ALTER DATABASE OPEN;

SQL> SELECT member FROM v$logfile;

MEMBER
--------------------------------------------------------------------------------

/u02/oradata/PRODCDB/redo010.log
/u02/oradata/PRODCDB/redo011.log
/u02/oradata/PRODCDB/redo020.log
/u02/oradata/PRODCDB/redo021.log
/u02/oradata/PRODCDB/redo030.log
/u02/oradata/PRODCDB/redo031.log

No comments:

Post a Comment

  RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...