In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Create 3 new log groups
SQL > ALTER DATABASE ADD LOGFILE GROUP 4 ('/ u01ax SIZE SIZE 500m)
SQL > ALTER DATABASE ADD LOGFILE GROUP 5 ('/ u01ax SIZE SIZE 500m)
SQL > ALTER DATABASE ADD LOGFILE GROUP 6 ('/ u01ax SIZE SIZE 500m)
View log group
SQL > select * from v$logfile
two。 Switch the current log to a new log group
SQL > alter system switch logfile
SQL > alter system switch logfile
SQL > alter system switch logfile
Cut to delete as INCACTIVE.
SQL > select group#,sequence#,bytes,members,status from v$log
GROUP# SEQUENCE# BYTES MEMBERS STATUS
--
1 139 52428800 1 INACTIVE
2 137 52428800 1 INACTIVE
3 138 52428800 1 INACTIVE
4 140 524288000 1 ACTIVE
5 141 524288000 1 CURRENT
6 136 524288000 1 INACTIVE
3. Delete the old log group
SQL > alter database drop logfile group 1
Database altered.
SQL > alter database drop logfile group 2
Database altered.
SQL > alter database drop logfile group 3
Check to see if the log group is deleted
SQL > select group#,sequence#,bytes,members,status from v$log
GROUP# SEQUENCE# BYTES MEMBERS STATUS
--
4 140 524288000 1 INACTIVE
5 141 524288000 1 CURRENT
6 136 524288000 1 INACTIVE
4. The operating system deletes files in original log groups 1, 2, and 3
[oracle@oracle122 log] $cd / u01/app/oracle/oradata/orcl
[oracle@oracle122 orcl] $
[oracle@oracle122 orcl] $pwd
/ u01/app/oracle/oradata/orcl
[oracle@oracle122 orcl] $ls
Control01.ctl example01.dbf redo01.log redo02.log redo03.log redo04.log redo05.log redo06.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf
[oracle@oracle122 orcl] $rm-rf redo01.log
[oracle@oracle122 orcl] $rm-rf redo02.log
[oracle@oracle122 orcl] $rm-rf redo03.log
5. Rebuild log group 1, 2, 3
SQL > ALTER DATABASE ADD LOGFILE GROUP 1 ('/ u01ax SIZE SIZE 500m)
SQL > ALTER DATABASE ADD LOGFILE GROUP 2 ('/ u01ax SIZE SIZE 500m)
SQL > ALTER DATABASE ADD LOGFILE GROUP 3 ('/ u01ax SIZE SIZE 500m)
7. Delete log groups 4, 5 and 6 for intermediate transition, and query select group#,sequence#,bytes,members,status from vault log when deleting; delete whether the group is INACTIVE, and execute alter system switch logfile if it is not INACTIVE
Check it out.
SQL > select group#,sequence#,bytes,members,status from v$log
GROUP# SEQUENCE# BYTES MEMBERS STATUS
--
1 148 524288000 1 CURRENT
2 143 524288000 1 INACTIVE
3 144 524288000 1 INACTIVE
4 146 524288000 1 INACTIVE
5 147 524288000 1 INACTIVE
6 145 524288000 1 INACTIVE
SQL > alter database drop logfile group 4
Database altered.
SQL > alter database drop logfile group 5
Database altered.
SQL > alter database drop logfile group 6
Database altered.
8. Delete groups 4, 5, 6 to the operating system
[oracle@oracle122 orcl] $rm-rf redo04.log
[oracle@oracle122 orcl] $rm-rf redo05.log
[oracle@oracle122 orcl] $rm-rf redo06.log
9. Back up the latest control files
SQL > alter database backup controlfile to trace resetlogs
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.