Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle modifies redo log files path

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

If it is possible to shut down the database, the following steps can be used. If you cannot close the database, you can only modify the redo path by creating a redo log file.

Shut down the database

Copy redo log file to new location

Third, database mount

4. Renaming redo

5. Open database

--1 .shutdown the database

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Copy redo log file to new location

[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 rename 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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report