By Kamran Agayev:
Question: I need to move my redo
loog files in RAC under ASM from one location to another.
How do I move redo ogs under ASM in a RAC environment?
Answer: Here're the steps you need
to perform in order to move redo log files to the different
ASM diskgroup in a RAC environment
First of all, make sure you've been provided shared disks
by system administrators. If you're using asmlib,
create the disks using oracleasm as follows, using
the oracleasm create command:
[oracle@node1 ~] sudo /etc/init.d/oracleasm
createdisk RLOGS /dev/mapper/mpath6
Then run scan and query new disks from other nodes:
[oracle@node2 ~]$
sudo /etc/init.d/oracleasm scandisks
[oracle@node2 ~]$ sudo /etc/init.d/oracleasm
listdisks
After having your disk added to the list, query it from
/dev/oracleasm/disks folder:
[oracle@node1
~]$ ls -ltr /dev/oracleasm/disks/
If you got the disk, then everything is ok. Now you can
connect to the ASM instance and create a diskgroup. For
this, get the name of the ASM instance from OS and connect
to it:
ps -ef
| grep ASM
export ORACLE_SID=+ASM1
sqlplus / as sysdba
SQL> create diskgroup RLOGS external
redundancy
2
DISK '/dev/oracleasm/disks/RLOGS';
Diskgroup created.
If it's not mounted on the rest nodes, connect to those
nodes and mount it manually:
SQL> alter diskgroup RLOGS mount;
And also make sure the name of the disk group is added to
asm_diskstrings parameter at ASM instance
After having your disk group created, create new redo log
group per thread, and remove on redo log group from the same
thread which has INACTIVE status. You can check the
status of any group based on thread using V$LOG view:
SELECT
group#,
thread#,
status
FROM
v$log
WHERE
thread# = 2
ORDER BY
2, 1;
GROUP# THREAD# STATUS
———- ———- —————-
20 2 CURRENT
21 2 INACTIVE
Now add new group to the same thread (thread#=2) and
check v$logfile view:
SQL> ALTER DATABASE
ADD LOGFILE THREAD 2 GROUP 22 ('+RLOGS') SIZE 50M
SELECT
lf.group#,
lf.MEMBER
FROM
v$logfile lf,
v$log l
WHERE
lf.group# = l.group#
AND
l.thread# = 2;
GROUP# MEMBER
———- ——————————————————-
20 +OLD_LOG/PROD/onlinelog/group_20.259.815656575
21 +OLD_LOG/PROD/onlinelog/group_21.260.815656475
22 +RLOGS/PROD/onlinelog/group_22.260.815656475
Now you can safely delete INACTIVE redo log group from
the same thread:
SQL> ALTER DATABASE DROP LOGFILE GROUP 21;
Perform above mentioned steps one by one for each thread.
Each time switch log file and make sure the new redo log
member is used. Moreover, try to query both sql commands
that are written above after each time you add and drop redo
log group to see if it's added/deleted successfully.
|
|
|
Burleson is the American Team

Note:
This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.
Verify
experience!
Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.
Errata?
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just
e-mail:
and include the URL for the page.
Copyright © 1996 - 2020
All rights reserved by
Burleson
Oracle ®
is the registered trademark of Oracle Corporation.
|
|