|Oracle® Database Administrator's Guide
11g Release 2 (11.2)
Part Number E17120-05
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 a number of 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.
The log files are located on two disks:
The redo log is duplexed: one group consists of the members
/diskb/logs/log1b.rdo, and the second group consists of the members
The redo log files located on
diska must be relocated to
diskc. The new filenames will reflect the new location:
Steps for Renaming Redo Log Members
Shut down the database.
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
HOSTcommand. 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
Startup the database, mount, but do not open it.
CONNECT / as SYSDBA STARTUP MOUNT
Rename the redo log members.
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';
Open the database for normal operation.
The redo log alterations take effect when the database is opened.
ALTER DATABASE OPEN;