Oracle redo log groups should have two members per group with each member located on different physical storage devices to ensure optimal performance and recoverability.
This procedure covers the movement of existing redo logs to different devices in Oracle 10.2, however it can be used in several other versions.
1. Obtain the current location and log file names and groups in the V$LOGFILE view.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
—— ——- ——- ——————–
3 ONLINE /u05/oradata/DB1/redo03.log
2 ONLINE /u05/oradata/DB1/redo02.log
1 ONLINE /u05/oradata/DB1/redo01.log
2 Logon to Oracle with sysdba privileges and shutdown immediate.
mylinux# sqlplus /nolog
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Dec 11 13:32:22 2007
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
SQL> connect / as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
3. At the OS level, move the log files to their new locations.
mylinux# mv /u05/oradata/DB1/redo03.log /u03/oradata/DB1/redo03.log
mylinux# mv /u05/oradata/DB1/redo02.log /u02/oradata/DB1/redo02.log
4. Logon to Oracle with sysdba privileges and startup the database in mount mode.
mylinux# sqlplus /nolog
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Dec 11 13:38:12 2007
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 2028568 bytes
Variable Size 201329640 bytes
Database Buffers 104857600 bytes
Redo Buffers 6356992 bytes
Database mounted.
SQL>
5. Issue an alter database command to rename the log files to their new locations.
SQL> ALTER DATABASE
2 RENAME FILE ‘/u05/oradata/DB1/redo03.log’
3 TO ‘/u03/oradata/DB1/redo03.log’;
Database altered.
SQL> ALTER DATABASE
2 RENAME FILE ‘/u05/oradata/DB1/redo02.log’
3 TO ‘/u02/oradata/DB1/redo02.log’;
Database altered.
SQL>
6. Now you can open the database for use.
SQL> alter database open;
Database altered.
SQL>
7. Reselect from the view V$LOGFILE shows the redo log files in their new locations.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
—— ——- ——- ——————–
3 ONLINE /u03/oradata/DB1/redo03.log
2 ONLINE /u02/oradata/DB1/redo02.log
1 ONLINE /u05/oradata/DB1/redo01.log
No comments:
Post a Comment