首页 » ORACLE » Relocating redo log files (修改日志文件路径)

Relocating redo log files (修改日志文件路径)

修改日志文件路径,实现多路径,虽然这会降低性能,但与数据的安全性相比,是值得的!还有数据优化中记的把redo log 与数据文件分开,而且要把redo log放在最快的硬盘设备上,实现 减轻io负载

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
———- ——- ——- ———————————————————————- —
3 ONLINE /oradata/ahjcyl/redo03_1.log NO
3 ONLINE /oracle/oradata/ahjcyl/redo03_2.log NO
2 ONLINE /oracle/oradata/ahjcyl/redo02_1.log NO
2 ONLINE /oracle/oradata/ahjcyl/redo02_2.log NO
1 ONLINE /oradata/ahjcyl/redo01_1.log NO
1 ONLINE /oracle/oradata/ahjcyl/redo01_2.log NO

6 rows selected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> starup mount
SP2-0734: unknown command beginning “starup mou…” – rest of line ignored.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size 2084296 bytes
Variable Size 385876536 bytes
Database Buffers 1207959552 bytes
Redo Buffers 14692352 bytes
Database mounted.
SQL> host
[oracle@ahjcyl-db ahjcyl]$ cp /oracle/oradata/ahjcyl/redo02_1.log /oradata/ahjcyl/redo02_1.log
[oracle@ahjcyl-db ahjcyl]$ exit
exit

SQL> alter database rename file ‘/oracle/oradata/ahjcyl/redo02_1.log’ to ‘/oradata/ahjcyl/redo02_1.log’
2 ;

Database altered.

SQL> alter database open;

Database altered.

SQL> set linesize 150
SQL> col member for a70
SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
———- ——- ——- ———————————————————————- —
3 ONLINE /oradata/ahjcyl/redo03_1.log NO
3 ONLINE /oracle/oradata/ahjcyl/redo03_2.log NO
2 ONLINE /oradata/ahjcyl/redo02_1.log NO
2 ONLINE /oracle/oradata/ahjcyl/redo02_2.log NO
1 ONLINE /oradata/ahjcyl/redo01_1.log NO
1 ONLINE /oracle/oradata/ahjcyl/redo01_2.log NO

6 rows selected.

SQL>

打赏

目前这篇文章有2条评论(Rss)评论关闭。

  1. Rosemary Storey | #1
    2011-12-21 at 07:34

    There are several posts on the market near this, I believe taking there reference could experience made this spot or article really informative. I am not saying expression this information is unhealthy. Simply I can pronounce the info provided here was unique, merely so it will be more in close proximity to complete, supporting with other former information will receive been actually good. The points you receive touched allow me to share really important, thus I’ll spot a number of the information here to make this actually perfect for entirely the newbie’s here. Thank you this data. Actually helpful!

  2. Rosabel | #2
    2011-11-11 at 16:21

    THX that’s a great asenwr!