Oracle7 Server Administrator's Guide
Renaming and Relocating Online Redo Log Members
You can rename online redo log members to change their locations. This procedure is necessary, for example, if the disk currently used for some online redo log files is going to be removed, or if datafiles and a number of online redo log files are stored on the same disk and should be separated to reduce contention.
To rename online 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 renaming any online redo log members, ensure that the new online redo log files already exist.
Warning: The following steps only modify the internal file pointers in a database's control files; they do not physically rename or create any operating system files. Use your computer's operating system to copy the existing online redo log files to the new location.
Rename online redo log members with the Rename Logfile Member property sheet of Server Manager, or the SQL command ALTER DATABASE with the RENAME FILE parameter.
To Rename and Relocate Online Redo Log Members
Before making any structural changes to a database, such as renaming or relocating online redo log members, completely back up the database (including the control file) in case you experience any problems while performing this operation.
2. Copy the online redo log files to the new location.
Operating system files, such as online redo log members, must be copied using the appropriate operating system commands. See your operating system manual for more information about copying files.
Suggestion: You can execute an operating system command to copy a file without exiting Server Manager. Use the Server Manager HOST command.
3. Rename the online redo log members.
Use the Rename Online Redo Log Member dialog box, or the ALTER DATABASE command with the RENAME FILE clause to rename the database's online redo log files.
4. Open the database for normal operation.
The online redo log alterations take effect the next time that the database is opened. Opening the database may require shutting down the current instance (if the database was previously opened by the current instance) or just opening the database using the current instance.
5. Back up the control file.
As a precaution, after renaming or relocating a set of online redo log files, immediately back up the database's control file.
The following example renames the online redo log members. However, first assume that:
- The database is currently mounted by, but closed to, the instance.
- The online redo log is duplexed: one group consists of the members LOG1A and LOG1B, and the second group consists of the members LOG2A and LOG2B. The files LOG1A and LOG2A are stored on Disk A, while LOG1B and LOG2B are stored on Disk B.
- The online redo log files located on Disk A must be relocated to Disk C. The new filenames will reflect the new location: LOG1C and LOG2C.
The files LOG1A and LOG2A on Disk A must be copied to the new files LOG1C and LOG2C on Disk C.
ALTER DATABASE
RENAME FILE 'log1a', 'log2a'
TO 'log1c', 'log2c';