溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

oracle修改redo log files路徑

發(fā)布時間:2020-06-08 15:10:13 來源:網(wǎng)絡 閱讀:8218 作者:xjsunjie 欄目:關系型數(shù)據(jù)庫

如果可以關閉數(shù)據(jù)庫,可以采用下述步驟。如果不能關閉數(shù)據(jù)庫,只能采用新建redo log files的方式來實現(xiàn)修改該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]$ ls
redo01.rdo  redo02.rdo  redo03.rdo
[oracle@oradb01 ctl]$ ll
total 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 2011
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to an idle instance.

 

--3 mount database

SQL> startup mount
ORACLE instance started.

Total System Global Area 3273641984 bytes
Fixed Size                  2232800 bytes
Variable Size             721423904 bytes
Database Buffers         2533359616 bytes
Redo Buffers               16625664 bytes
Database 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.


向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI