Skip Headers
Oracle® Database Administrator's Guide
11g Release 2 (11.2)

Part Number E25494-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Relocating and Renaming Redo Log Members

You can use operating system commands to relocate redo logs, then use the ALTER DATABASE statement to make their new names (locations) known to the database. This procedure is necessary, for example, if the disk currently used for some redo log files is going to be removed, or if datafiles and several redo log files are stored on the same disk and should be separated to reduce contention.

To rename redo log members, you must have the ALTER DATABASE system privilege. Additionally, you might also need operating system privileges to copy files to the desired location and privileges to open and back up the database.

Before relocating your redo logs, or making any other structural changes to the database, completely back up the database in case you experience problems while performing the operation. As a precaution, after renaming or relocating a set of redo log files, immediately back up the database control file.

Use the following steps for relocating redo logs. The example used to illustrate these steps assumes:

Steps for Renaming Redo Log Members 

  1. Shut down the database.

    SHUTDOWN
    
  2. Copy the redo log files to the new location.

    Operating system files, such as redo log members, must be copied using the appropriate operating system commands. See your operating system specific documentation for more information about copying files.

    Note:

    You can execute an operating system command to copy a file (or perform other operating system commands) without exiting SQL*Plus by using the HOST command. Some operating systems allow you to use a character in place of the word HOST. For example, you can use an exclamation point (!) in UNIX.

    The following example uses operating system commands (UNIX) to move the redo log members to a new location:

    mv /diska/logs/log1a.rdo /diskc/logs/log1c.rdo
    mv /diska/logs/log2a.rdo /diskc/logs/log2c.rdo
    
  3. Startup the database, mount, but do not open it.

    CONNECT / as SYSDBA
    STARTUP MOUNT
    
  4. Rename the redo log members.

    Use the ALTER DATABASE statement with the RENAME FILE clause to rename the database redo log files.

    ALTER DATABASE 
      RENAME FILE '/diska/logs/log1a.rdo', '/diska/logs/log2a.rdo' 
               TO '/diskc/logs/log1c.rdo', '/diskc/logs/log2c.rdo';
    
  5. Open the database for normal operation.

    The redo log alterations take effect when the database is opened.

    ALTER DATABASE OPEN;