在RAC环境中如何管理日志(redolog file)组
发表于:2007-07-02来源:作者:点击数:
标签:
在RAC环境中如何管理日志(redolog file)组 Tuesday, 2004-09-14 11:52 Eygle 原文连接: http://www.eygle.com/faq/How.To.Mangement.redologfile.in.Rac.Raw.htm 本文简单介绍在RAC裸设备环境下如何管理日志文件(redolog file) 本文环境:Oracle9i Rac + VCS4
在RAC环境中如何管理日志(redolog file)组
Tuesday, 2004-09-14 11:52 Eygle
原文连接:
http://www.eygle.com/faq/How.To.Mangement.redologfile.in.Rac.Raw.htm
本文简单介绍在RAC裸设备环境下如何管理日志文件(redolog file)
本文环境:Oracle9i Rac + VCS4.0 + VxVM4.0 + Solaris9.0 + SunFire210
1.首先可以查看当前裸设备情况
# vxprintDisk group: oradgTY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0dg oradg oradg - - - - - -dm oradg01 c2t0d2s2 - 244143872 - - - -v ctlfile1 gen ENABLED 204800 - ACTIVE - -pl ctlfile1-01 ctlfile1 ENABLED 204800 - ACTIVE - -sd oradg01-13 ctlfile1-01 ENABLED 204800 0 - - -v ctlfile2 gen ENABLED 204800 - ACTIVE - -pl ctlfile2-01 ctlfile2 ENABLED 204800 - ACTIVE - -sd oradg01-14 ctlfile2-01 ENABLED 204800 0 - - -v redo101 gen ENABLED 204800 - ACTIVE - -pl redo101-01 redo101 ENABLED 204800 - ACTIVE - -sd oradg01-04 redo101-01 ENABLED 204800 0 - - -v redo102 gen ENABLED 204800 - ACTIVE - -pl redo102-01 redo102 ENABLED 204800 - ACTIVE - -sd oradg01-05 redo102-01 ENABLED 204800 0 - - -v redo103 gen ENABLED 204800 - ACTIVE - -pl redo103-01 redo103 ENABLED 204800 - ACTIVE - -sd oradg01-06 redo103-01 ENABLED 204800 0 - - -v redo201 gen ENABLED 204800 - ACTIVE - -pl redo201-01 redo201 ENABLED 204800 - ACTIVE - -sd oradg01-07 redo201-01 ENABLED 204800 0 - - -v redo202 gen ENABLED 204800 - ACTIVE - -pl redo202-01 redo202 ENABLED 204800 - ACTIVE - -sd oradg01-08 redo202-01 ENABLED 204800 0 - - -v redo203 gen ENABLED 204800 - ACTIVE - -pl redo203-01 redo203 ENABLED 204800 - ACTIVE - -sd oradg01-09 redo203-01 ENABLED 204800 0 - - -v spfile gen ENABLED 204800 - ACTIVE - -pl spfile-01 spfile ENABLED 204800 - ACTIVE - -sd oradg01-12 spfile-01 ENABLED 204800 0 - - -v srvcfg gen ENABLED 1024000 - ACTIVE - -pl srvcfg-01 srvcfg ENABLED 1024000 - ACTIVE - -sd oradg01-15 srvcfg-01 ENABLED 1024000 0 - - -v system gen ENABLED 1638400 - ACTIVE - -pl system-01 system ENABLED 1638400 - ACTIVE - -sd oradg01-01 system-01 ENABLED 1638400 0 - - -v temp gen ENABLED 2048000 - ACTIVE - -pl temp-01 temp ENABLED 2048000 - ACTIVE - -sd oradg01-02 temp-01 ENABLED 2048000 0 - - -v undo11 gen ENABLED 16777216 - ACTIVE - -pl undo11-01 undo11 ENABLED 16777216 - ACTIVE - -sd oradg01-10 undo11-01 ENABLED 2048000 0 - - -sd oradg01-17 undo11-01 ENABLED 14729216 2048000 - - -v undo21 gen ENABLED 2048000 - ACTIVE - -pl undo21-01 undo21 ENABLED 2048000 - ACTIVE - -sd oradg01-11 undo21-01 ENABLED 2048000 0 - - -v users gen ENABLED 16777216 - ACTIVE - -pl users-01 users ENABLED 16777216 - ACTIVE - -sd oradg01-03 users-01 ENABLED 2048000 0 - - -sd oradg01-16 users-01 ENABLED 14729216 2048000 - - -
2.分配新的裸设备并设置相应的权限
这一步需要以root身份执行
# vxassist -g oradg -U gen make redo104 100m
# vxassist -g oradg -U gen make redo105 100m
# vxedit -g oradg set user=oracle mode=644 redo104
# vxedit -g oradg set user=oracle mode=644 redo105
3.重新规划redolog file组
$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Sep 14 10:02:47 2004Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit ProductionWith the Real Application Clusters optionJServer Release 9.2.0.4.0 - ProductionSQL> set linesize 120SQL> select * from v$log; GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- 1 1 6313 52428800 1 NO ACTIVE 3193855 14-SEP-04 2 1 6312 52428800 1 NO INACTIVE 3191691 14-SEP-04 5 1 6314 52428800 1 NO CURRENT 3196041 14-SEP-04 3 2 17 10485760 1 NO CURRENT 3016310 14-SEP-04 4 2 16 10485760 1 NO INACTIVE 1619198 13-SEP-04SQL> alter database add logfile thread 1 group 6 (@#/dev/vx/rdsk/oradg/redo104@#) size 90M;Database altered.SQL> alter database add logfile thread 1 group 7 (@#/dev/vx/rdsk/oradg/redo105@#) size 90M;Database altered.SQL> select * from v$log; GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- 1 1 6316 52428800 1 NO INACTIVE 3200415 14-SEP-04 2 1 6315 52428800 1 NO INACTIVE 3198233 14-SEP-04 5 1 6317 52428800 1 NO ACTIVE 3202621 14-SEP-04 6 1 6318 94371840 1 NO CURRENT 3204811 14-SEP-04 7 1 0 94371840 1 YES UNUSED 0 3 2 17 10485760 1 NO CURRENT 3016310 14-SEP-04 4 2 16 10485760 1 NO INACTIVE 1619198 13-SEP-047 rows selected.SQL> alter database drop logfile group 5;Database altered.SQL> alter database add logfile thread 1 group 5 (@#/dev/vx/rdsk/oradg/redo103@#) size 90M;Database altered.....SQL> select *from v$log; GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- 1 1 6327 94371840 1 NO INACTIVE 3238534 14-SEP-04 2 1 6329 94371840 1 NO CURRENT 3246417 14-SEP-04 5 1 0 94371840 1 YES UNUSED 0 6 1 6328 94371840 1 NO ACTIVE 3242482 14-SEP-04 7 1 6326 94371840 1 NO INACTIVE 3234597 14-SEP-04 3 2 17 10485760 1 NO CURRENT 3016310 14-SEP-04 4 2 16 10485760 1 NO INACTIVE 1619198 13-SEP-047 rows selected.
原文转自:http://www.ltesting.net