本文共 1732 字,大约阅读时间需要 5 分钟。
如果可以关闭数据库,可以采用下述步骤。如果不能关闭数据库,只能采用新建redo log files的方式来实现修改该redo 的路径了。
一、shutdown the database
二、拷贝redo log 文件到新的位置
三、mount database
四、重命名redo
五、open database
--1 .shutdown the database SQL> shutdown immediate;Database closed.
Database dismounted.ORACLE instance shut down.SQL> exit
-- 2.拷贝redo log 文件到新的位置[oracle@oradb01 orcl]$ mv /opt/ora11g/oradata/orcl/redo01.log /opt/ora11g/oradata/orcl/ctl/redo01.rdo[oracle@oradb01 orcl]$ mv /opt/ora11g/oradata/orcl/redo02.log /opt/ora11g/oradata/orcl/ctl/redo02.rdo[oracle@oradb01 orcl]$ mv /opt/ora11g/oradata/orcl/redo03.log /opt/ora11g/oradata/orcl/ctl/redo03.rdo
[oracle@oradb01 orcl]$ cd ctl
[oracle@oradb01 ctl]$ lsredo01.rdo redo02.rdo redo03.rdo[oracle@oradb01 ctl]$ lltotal 153792-rw-r----- 1 oracle dba 52429312 Nov 14 10:43 redo01.rdo-rw-r----- 1 oracle dba 52429312 Nov 14 10:43 redo02.rdo-rw-r----- 1 oracle dba 52429312 Nov 14 11:00 redo03.rdo[oracle@oradb01 ctl]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Nov 14 11:08:58 2011Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.
--3 mount database
SQL> startup mountORACLE instance started.
Total System Global Area 3273641984 bytes
Fixed Size 2232800 bytesVariable Size 721423904 bytesDatabase Buffers 2533359616 bytesRedo Buffers 16625664 bytesDatabase mounted.--4 重命名redo log files
SQL> ALTER DATABASE RENAME FILE '/opt/ora11g/oradata/orcl/redo01.log' ,'/opt/ora11g/oradata/orcl/redo02.log','/opt/ora11g/oradata/orcl/redo03.log' 2 to '/opt/ora11g/oradata/orcl/ctl/redo01.rdo','/opt/ora11g/oradata/orcl/ctl/redo02.rdo','/opt/ora11g/oradata/orcl/ctl/redo03.rdo' 3 ;Database altered.
-- 5. open database
SQL> alter database open;
Database altered.
转载地址:http://qjyno.baihongyu.com/