Monday, June 28, 2010

Renaming a redo log member from .log to .rdo

Using dbca in 11gR2 will default the redo log names with the .log extension. This may cause confusion with other log files in the future, so to be safe they should be use the .rdo file extension. In my example I am have 3 redo groups with 2 members each. Some of the members ending up with the default extension of .log. I want to update those members to have the .rdo file extension.

  1. Query the current redo locations.
  2. Shutdown the database.
  3. Rename the redo log members on the server.
  4. Startup the database in mount.
  5. Rename the redo log members in the database.
  6. Open the database.
  7. Verify the redo log member names are correct.
SQL> select member from v$logfile;

MEMBER-------------------------------------------------------------------------------
/u02/oradata/prod/redo01a.log
/u03/oradata/prod/redo01b.rdo
/u02/oradata/prod/redo02a.log
/u03/oradata/prod/redo02b.log
/u02/oradata/prod/redo03a.log
/u03/oradata/prod/redo03b.rdo

6 rows selected.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> !mv /u02/oradata/prod/redo01a.log /u02/oradata/prod/redo01a.rdo
SQL> !mv /u02/oradata/prod/redo02a.log /u02/oradata/prod/redo02a.rdo
SQL> !mv /u03/oradata/prod/redo02b.log /u03/oradata/prod/redo02b.rdo
SQL> !mv /u02/oradata/prod/redo03a.log /u02/oradata/prod/redo03a.rdo

SQL> startup mount

ORACLE instance started.
Database mounted.

SQL> alter database rename file '/u02/oradata/prod/redo01a.log' to '/u02/oradata/prod/redo01a.rdo';
Database altered.

SQL> alter database rename file '/u02/oradata/prod/redo02a.log' to '/u02/oradata/prod/redo02a.rdo';
Database altered.

SQL> alter database rename file '/u03/oradata/prod/redo02b.log' to '/u03/oradata/prod/redo02b.rdo';
Database altered.

SQL> alter database rename file '/u02/oradata/prod/redo03a.log' to '/u02/oradata/prod/redo03a.rdo';
Database altered.

SQL> alter database open;
Database altered.

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u02/oradata/prod/redo01a.rdo
/u03/oradata/prod/redo01b.rdo
/u02/oradata/prod/redo02a.rdo
/u03/oradata/prod/redo02b.rdo
/u02/oradata/prod/redo03a.rdo
/u03/oradata/prod/redo03b.rdo

6 rows selected.

No comments:

Post a Comment

Oracle runInstaller fails on Linux, Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.

How to get Oracle's runInstaller to run on Linux or Unix environment using from Windows using Cygwin as an xterm emulator. Download an...