How to move/rename
redo log files.
This document tells us how to move/rename redo log files
from one location to other location.
Step 1: Find the
location of redo log files by issuing below command.
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/TEST/redo03.log
/u01/app/oracle/oradata/TEST/redo02.log
/u01/app/oracle/oradata/TEST/redo01.log
Step 2: Shutdown
database.
SQL> shut
immediate
Database
closed.
Database
dismounted.
ORACLE
instance shut down.
SQL>
Step 3: Create
file structure where we want to move the redo logs.
[oracle@server3 TEST]$ mkdir -p /u02/oradata/TEST
Step 4: Move redo
log files from current location to new location.
[oracle@server3 ~]$ mv
/u01/app/oracle/oradata/TEST/redo03.log /u02/oradata/TEST/
[oracle@server3 ~]$ mv
/u01/app/oracle/oradata/TEST/redo02.log /u02/oradata/TEST/
[oracle@server3 ~]$ mv
/u01/app/oracle/oradata/TEST/redo01.log /u02/oradata/TEST/
Step5: We need to
update the new location information in data dictionary and control files. Start
the database in mount stage and update them.
SQL>
startup mount
ORACLE
instance started.
Total System
Global Area 221331456 bytes
Fixed Size 2251856 bytes
Variable
Size 163578800 bytes
Database
Buffers 50331648 bytes
Redo Buffers 5169152 bytes
Database
mounted.
SQL>
SQL>
alter database rename file '/u01/app/oracle/oradata/TEST/redo03.log' to
'/u02/oradata/TEST/redo03.log';
Database
altered.
SQL>
alter database rename file '/u01/app/oracle/oradata/TEST/redo02.log' to
'/u02/oradata/TEST/redo02.log';
Database
altered.
SQL>
alter database rename file '/u01/app/oracle/oradata/TEST/redo01.log' to
'/u02/oradata/TEST/redo01.log';
Database
altered.
Step 6: Check the redo log files
location by issuing below command.
SQL>
select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u02/oradata/TEST/redo03.log
/u02/oradata/TEST/redo02.log
/u02/oradata/TEST/redo01.log
SQL>
Step 7: Open database.
SQL> alter database open;
Database altered.
SQL>
No comments:
Post a Comment