In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The larger the file the computer operates on, the less efficient the system, so log files should be as small as possible, but too small a file can cause frequent log file switching, causing full checkpoints and causing system hangs
Redo log maintenance or repair involves removing problematic redo log groups or log members and rebuilding them. You can manipulate redo log groups as well as members, and it is generally recommended to manipulate log groups.
Add Log Group:
SQL> ALTER DATABASE ADD LOGFILE
('/u01/app/oracle/onlinelog/redo_01a.log', '/u02/app/oracle/onlinelog/redo_01b.log')
SIZE 100M;
Delete Log Group:
SQL> ALTER DATABASE DROP LOGFILE GROUP 4;
Add new members to redo log group in ASM app:
Because ASM automatically manages files, you only need to specify ASM disk groups, you do not need to specify file paths and file names, and you can specify specific file paths and file names if you want.
SQL> ALTER DATABASE ADD LOGFILE MEMBER '+ASM_RCY' REUSE TO GROUP 1;
As shown below:
online redolog file status:
Blank: indicates that the file is in use
STale: Indicates that the contents of the file are incomplete
invalid: indicates that the file cannot be accessed
deleted: indicates that the file is no longer useful
Delete log members:
SQL> ALTER DTABASE DROP LOGFILE MEMBER '/u01/app/oracle/onlinelog/redo_01.log';
Members of the current group cannot be deleted. If you want to delete them, you should first switch them by using the ALTER SYSTEM SWITCH LOGFILE command.
If you want to delete a member whose status is invalid, the normal operation method may need to issue several ALTER SYSTEM SWITCH LOGFILE commands to switch multiple times. To wait for a long time, the faster method is to close the database first and open the database at this time.
Each log group must have at least one member to function properly
Remove online redo logfile
Sometimes log groups cannot be maintained by deleting and rebuilding, for example, there are only two log groups in the database or a crashed log file belongs to the current log group. In this case, if the database is open, archiving activity fails due to an online log file crash, eventually causing the database to hang.
At this point, you can reinitialize the online redo log file using the following command:
SQL> ALTER DATABASE CLEAR LOGFILE GROUP group number;
If the crashed log files cannot be archived (all members of the group are bad), you can use the UNARCHIVED keyword in the above command to clean up the crashed redo log files and avoid archiving them. The command format is as follows:
SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP group number;
Note: Executing any of the above commands will invalidate the previous backup of the Oracle database, so a full backup should be done next.
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.