How to manage log files in the RAC environment
Tuesday, 2004-09-14 11:52
Eygle
Original connection:
http://www.eygle.com/faq/how.to.mngement.redologfile.in.rac.raw.htm
This article briefly introduces how to manage log files in the RAC bare equipment environment (Redolog file)
This article: Oracle9i RAC VCS4.0 VXVM4.0 Solaris9.0 Sunfire210
1. First see the current naked device situation
# vxprint
Disk group: oradg
Ty Name Assoc KState Length Ploffs State Tutil0 Putil0
DG 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 ENABED 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 ENABED 204800 - ACTIVE - -
PL SPFILE-01 SPFILE ENABED 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 - - --d 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 Uses 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. Assign new bare devices and set appropriate permissions
This step needs to be performed as 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. Re-planning the Redolog file group
$ SQLPLUS "/ as sysdba"
SQL * Plus: Release 9.2.0.4.0 - Production on Tue Sep 14 10:02:47 2004
CopyRight (C) 1982, 2002, Oracle Corporation. All Rights Reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the real application clusters Option
JServer Release 9.2.0.4.0 - Production
SQL> SET LINESIZE 120
SQL> 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-043 2 17 10485760 1 NO CURRENT 3016310 14-SEP-04
4 2 16 10485760 1 NO inactive 1619198 13-Sep-04
SQL> ALTER DATABASE Add Logfile Thread 1 Group 6 ('/ dev / vx / rdsk / orad / 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-04
7 rows selected.
SQL> ALTER DATABASE DROP LOGFILE GROUP 5;
Database altered.
SQL> ALTER DATABASE Add Logfile Thread 1 Group 5 ('/ dev / vx / rdsk / orad / 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-04
7 rows selected.