In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about oracle 11g rac how to add redo log files, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article. Let's take a look at it with the editor.
1) Experimental ideas:
[1] View current online redo log file information
[2] make necessary file backups before the experiment
[3] add two sets of online redo log files, each with a size of 2G
[4] check the running status of oracle, one for each instance, so that each instance has a total of 5 log files
[5] add a set of log files again, one for each instance, so that each instance has a total of 5 log files
[6] Delete the original two groups of 300MB log files
[7] add two sets of 2G log files
2) first check the status of the current online log file
View from the logical level of the database
Export ORACLE_SID=rac1
Sqlplus / nolog
Conn / as sysdba
Select instance_name from v$instance
Set linesize 120
Select * from v$log
Do the same thing on rac2
Export ORACLE_SID=rac2
Sqlplus / nolog
Conn / as sysdba
Select instance_name from v$instance
Set linesize 120
Select * from v$log
From the physical level of database storage:
Export ORACLE_SID=+ASM1
Asmcmd
Ls
Cd onlinelog
Ls-l
3) back up the necessary files before the experiment
Backup of parameter files:
SQL > create pfile='/oracle/pfile_20140212_before_add_redolog.ora' from spfile
Control the backup of files
Sql > alter database backup controlfile to'/ oracle/control_20140212_before_add_redolog.ora'
4) add online log files (stored on ASM disk):
Alter database add logfile thread 1 group5 ('+ DATA/rac/onlinelog/group5') size 2g
Alter database add logfile thread 2 group6 ('+ DATA/rac/onlinelog/group6') size 2g
Alter database add logfile thread 1 group7 ('+ DATA/rac/onlinelog/group7') size 2g
Alter database add logfile thread 2 group8 ('+ DATA/rac/onlinelog/group8') size 2g
After adding online logs, execute SQL > select * from v$logfile
View current physical file information
Alter system switch logfile
Alter system switch logfile
View the current online log file information on Node 2:
Select * from v$log
5) add two more log files to Node 1:
Alter database add logfile thread 1 group 9
('+ data/rac/onlinelog/group9') size 2g
Alter database add logfile thread 2 group 10
('+ data/rac/onlinelog/group10') size 2g
Select * from v$log
View the physical file information stored on ASM disk through asmcmd:
Export ORACLE_SID=+ASM1
Asmcmd
Cd + data/rac/onlinelog
Ls-l
6) Delete the old 300m online log file:
Note: notes for deleting log files:
[1] the file has been archived
[2] not currently in use, that is, the status is INACTIVE
[3] you must ensure that each instance has at least two log files after the log file is deleted
Alter database drop logfile group 1
Select * from v$log
Alter database drop logfile group 3
Alter database drop logfile group 2
Alter database drop logfile group 4
7) after the deletion is completed, a total of 3 groups of log files are left, with 3 log files for each instance. Add the following:
Alter database add logfile thread 1 group1 ('+ data/rac/onlinelog/group1') size 2g
Alter database add logfile thread 2 group2 ('+ data/rac/onlinelog/group2') size 2g
Alter database add logfile thread 1 group3 ('+ data/rac/onlinelog/group3') size 2g
Alter database add logfile thread 2 group4 ('+ data/rac/onlinelog/group4') size 2g
To view the information of physical files stored on ASM disk through asmcmd, there should be 5 groups of 10 log files:
Cd + data/rac/onlinelog
There are indeed 10 online redo log files on the asm disk group.
To be on the safe side, do the following on both nodes, and manually switch to make the new log file take effect:
Alter system switch logfile
Alter system switch logfile
Select * from v$log
8) after all operations have been performed, check the current status of the system and check the log:
1. View the current status of RAC
Crs_stat-t
2. View the alert log on the two nodes to see if there are any exception records:
Before adding log files: a total of 4 groups of log files. Two files in each group. There are 8 files for one instance and 16 files for two instances.
SQL > /
INST_ID GROUP# STATUS TYPE MEMBER IS_
1 2 ONLINE + DATA/oralnx/onlinelog/group_2.262.83253 NO 1117
1 2 ONLINE + BACKUP/oralnx/onlinelog/group_2.258.832 YES 531119
11 ONLINE + DATA/oralnx/onlinelog/group_1.261.83253 NO 1115
11 ONLINE + BACKUP/oralnx/onlinelog/group_1.257.832 YES 531117
1 3 ONLINE + DATA/oralnx/onlinelog/group_3.265.83253 NO 1269
1 3 ONLINE + BACKUP/oralnx/onlinelog/group_3.259.832 YES 531271
1 4 ONLINE + DATA/oralnx/onlinelog/group_4.266.83253 NO 1271
1 4 ONLINE + BACKUP/oralnx/onlinelog/group_4.260.832 YES 531273
2 2 ONLINE + DATA/oralnx/onlinelog/group_2.262.83253 NO 1117
2 2 ONLINE + BACKUP/oralnx/onlinelog/group_2.258.832 YES 531119
2 1 ONLINE + DATA/oralnx/onlinelog/group_1.261.83253 NO 1115
2 1 ONLINE + BACKUP/oralnx/onlinelog/group_1.257.832 YES 531117
2 3 ONLINE + DATA/oralnx/onlinelog/group_3.265.83253 NO 1269
2 3 ONLINE + BACKUP/oralnx/onlinelog/group_3.259.832 YES 531271
2 4 ONLINE + DATA/oralnx/onlinelog/group_4.266.83253 NO 1271
2 4 ONLINE + BACKUP/oralnx/onlinelog/group_4.260.832 YES 531273
16 rows selected.
20140212 do the following on rac1:
SQL > alter database add logfile thread 1 group 5 ('+ DATA/oralnx/onlinelog/group_5.log','+BACKUP/oralnx/onlinelog/group_5.log') size 2g
Database altered.
SQL > alter database add logfile thread 2 group 6 ('+ DATA/oralnx/onlinelog/group_6.log','+BACKUP/oralnx/onlinelog/group_6.log') size 2g
Database altered.
SQL > select inst_id,group#,thread#,bytes/1024/1024 sizeMB,status from gv$log
INST_ID GROUP# THREAD# SIZEMB STATUS
--
1 1 1 300 INACTIVE
1 2 1 300 CURRENT
1 3 2 300 CURRENT
1 4 2 300 INACTIVE
1 5 1 2048 UNUSED
1 6 2 2048 UNUSED
2 1 1 300 INACTIVE
2 2 1 300 CURRENT
2 3 2 300 CURRENT
2 4 2 300 INACTIVE
2 5 1 2048 UNUSED
INST_ID GROUP# THREAD# SIZEMB STATUS
--
2 6 2 2048 UNUSED
SQL > alter database drop logfile group 1
Database altered.
SQL > alter database add logfile thread 1 group 1 ('+ DATA/oralnx/onlinelog/group_1.log','+BACKUP/oralnx/onlinelog/group_1.log') size 2g
SQL > alter database drop logfile group 4
SQL > alter database add logfile thread 2 group 4 ('+ DATA/oralnx/onlinelog/group_4.log','+BACKUP/oralnx/onlinelog/group_4.log') size 2g
This is how oracle 11g rac adds redo log files. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.