Flying & Snaking
===========================================================
Managing Logfiles
===========================================================
The current location of the logfiles can be queried from the V$LOGFILE view, as shown below.
SELECT member FROM v$logfile;
MEMBER
--------------------------------------------------------
/u01/app/oracle/product/9.2.0/oradata/DEVSOL/redo01.log
/u01/app/oracle/product/9.2.0/oradata/DEVSOL/redo02.log
/u01/app/oracle/product/9.2.0/oradata/DEVSOL/redo03.log
To move or rename a logfile do the following:
* Shutdown the database.
* Rename the physical file on the OS.
* Start the database in mount mode.
* Issue the ALTER DATABASE RENAME FILE command to rename the file within the Oracle dictionary.
* Open the database.

The following SQL*Plus output shows how this is done.
SHUTDOWN IMMEDIATE!mv /old_path/redo01.log /new_path/redo01.log
!mv /old_path/redo02.log /new_path/redo02.log
!mv /old_path/redo03.log /new_path/redo03.log
STARTUP MOUNT

ALTER DATABASE RENAME FILE '/old_path/redo01.log'' TO '/new_path/redo01.log';
ALTER DATABASE RENAME FILE '/old_path/redo02.log'' TO '/new_path/redo02.log';
ALTER DATABASE RENAME FILE '/old_path/redo03.log'' TO '/new_path/redo03.log';
ALTER DATABASE OPEN;
Repeating the initial query shows that the the logfile has been renamed in the data dictionary.
SELECT member FROM v$logfile;
2jliu 发表于:2008.07.03 14:43 ::分类: ( @EBS ) ::阅读:(17次) :: 评论 (0)

发表评论
标题

在此添加评论
表情符号: smile laughing tongue angry crying sad wassat wink

称呼

邮箱地址(可选)

个人主页(可选)




自我介绍
切换风格
新闻聚合
博客日历
文章归档...
最新发表...
博客统计...
Blog信息
网站链接...