In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Connect to the database server, query existing online log group information, and add online log groups.
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
Connected as system
SQL > select * from v$logfile
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
-
2 ONLINE + DATA/oracle/onlinelog/group_2.262.900549871 NO
2 ONLINE + FRA/oracle/onlinelog/group_2.258.900549873 YES
1 ONLINE + DATA/oracle/onlinelog/group_1.261.900549865 NO
1 ONLINE + FRA/oracle/onlinelog/group_1.257.900549867 YES
3 ONLINE + DATA/oracle/onlinelog/group_3.265.900550437 NO
3 ONLINE + FRA/oracle/onlinelog/group_3.259.900550441 YES
4 ONLINE + DATA/oracle/onlinelog/group_4.266.900550445 NO
4 ONLINE + FRA/oracle/onlinelog/group_4.260.900550449 YES
8 rows selected
Add a new log group file
SQL > alter database add logfile thread 1 group5 ('+ DATA/oracle/onlinelog/group5','+FRA/oracle/onlinelog/group5') size 200m
Database altered
SQL > alter database add logfile thread 2 group6 ('+ DATA/oracle/onlinelog/group6','+FRA/oracle/onlinelog/group6') size 200m
Database altered
SQL > alter database add logfile thread 1 group7 ('+ DATA/oracle/onlinelog/group7','+FRA/oracle/onlinelog/group7') size 200m
Database altered
SQL > alter database add logfile thread 2 group8 ('+ DATA/oracle/onlinelog/group8','+FRA/oracle/onlinelog/group8') size 200m
Database altered
SQL > select * from v$logfile
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
-
2 ONLINE + DATA/oracle/onlinelog/group_2.262.900549871 NO
2 ONLINE + FRA/oracle/onlinelog/group_2.258.900549873 YES
1 ONLINE + DATA/oracle/onlinelog/group_1.261.900549865 NO
1 ONLINE + FRA/oracle/onlinelog/group_1.257.900549867 YES
3 ONLINE + DATA/oracle/onlinelog/group_3.265.900550437 NO
3 ONLINE + FRA/oracle/onlinelog/group_3.259.900550441 YES
4 ONLINE + DATA/oracle/onlinelog/group_4.266.900550445 NO
4 ONLINE + FRA/oracle/onlinelog/group_4.260.900550449 YES
5 ONLINE + DATA/oracle/onlinelog/group5 NO
5 ONLINE + FRA/oracle/onlinelog/group5 NO
6 ONLINE + DATA/oracle/onlinelog/group6 NO
6 ONLINE + FRA/oracle/onlinelog/group6 NO
7 ONLINE + DATA/oracle/onlinelog/group7 NO
7 ONLINE + FRA/oracle/onlinelog/group7 NO
8 ONLINE + DATA/oracle/onlinelog/group8 NO
8 ONLINE + FRA/oracle/onlinelog/group8 NO
16 rows selected
SQL > select thread#,group#,archived,status from v$log
THREAD# GROUP# ARCHIVED STATUS
--
1 1 NO CURRENT
1 2 YES INACTIVE
2 3 YES INACTIVE
2 4 NO CURRENT
1 5 YES UNUSED
2 6 YES UNUSED
1 7 YES UNUSED
2 8 YES UNUSED
8 rows selected
Switch Lo
SQL > alter system switch logfile
System altered
SQL > alter system switch logfile
System altered
SQL > alter system switch logfile
System altered
SQL > alter system switch logfile
System altered
SQL > alter system switch logfile
System altered
SQL > select thread#,group#,archived,status from v$log
THREAD# GROUP# ARCHIVED STATUS
--
1 1 YES ACTIVE
1 2 YES ACTIVE
2 3 YES INACTIVE
2 4 YES ACTIVE
1 5 NO CURRENT
2 6 YES ACTIVE
1 7 YES INACTIVE
2 8 NO CURRENT
8 rows selected
SQL > select * from v$logfile
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
-
2 ONLINE + DATA/oracle/onlinelog/group_2.262.900549871 NO
2 ONLINE + FRA/oracle/onlinelog/group_2.258.900549873 YES
1 ONLINE + DATA/oracle/onlinelog/group_1.261.900549865 NO
1 ONLINE + FRA/oracle/onlinelog/group_1.257.900549867 YES
3 ONLINE + DATA/oracle/onlinelog/group_3.265.900550437 NO
3 ONLINE + FRA/oracle/onlinelog/group_3.259.900550441 YES
4 ONLINE + DATA/oracle/onlinelog/group_4.266.900550445 NO
4 ONLINE + FRA/oracle/onlinelog/group_4.260.900550449 YES
5 ONLINE + DATA/oracle/onlinelog/group5 NO
5 ONLINE + FRA/oracle/onlinelog/group5 NO
6 ONLINE + DATA/oracle/onlinelog/group6 NO
6 ONLINE + FRA/oracle/onlinelog/group6 NO
7 ONLINE + DATA/oracle/onlinelog/group7 NO
7 ONLINE + FRA/oracle/onlinelog/group7 NO
8 ONLINE + DATA/oracle/onlinelog/group8 NO
8 ONLINE + FRA/oracle/onlinelog/group8 NO
16 rows selected
SQL > select thread#,group#,archived,status from v$log
THREAD# GROUP# ARCHIVED STATUS
--
1 1 YES INACTIVE
1 2 YES INACTIVE
2 3 YES INACTIVE
2 4 YES INACTIVE
1 5 NO CURRENT
2 6 YES INACTIVE
1 7 YES INACTIVE
2 8 NO CURRENT
8 rows selected
Delete the original online log group, and the physical files will be deleted automatically.
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
Database altered
SQL > alter database drop logfile group 4
Database altered
SQL > select thread#,group#,archived,status from v$log
THREAD# GROUP# ARCHIVED STATUS
--
1 5 NO CURRENT
2 6 YES INACTIVE
1 7 YES INACTIVE
2 8 NO CURRENT
SQL > select * from v$logfile
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
5 ONLINE + DATA/oracle/onlinelog/group5 NO
5 ONLINE + FRA/oracle/onlinelog/group5 NO
6 ONLINE + DATA/oracle/onlinelog/group6 NO
6 ONLINE + FRA/oracle/onlinelog/group6 NO
7 ONLINE + DATA/oracle/onlinelog/group7 NO
7 ONLINE + FRA/oracle/onlinelog/group7 NO
8 ONLINE + DATA/oracle/onlinelog/group8 NO
8 ONLINE + FRA/oracle/onlinelog/group8 NO
8 rows selected
SQL > /
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
5 ONLINE + DATA/oracle/onlinelog/group5 NO
5 ONLINE + FRA/oracle/onlinelog/group5 NO
6 ONLINE + DATA/oracle/onlinelog/group6 NO
6 ONLINE + FRA/oracle/onlinelog/group6 NO
7 ONLINE + DATA/oracle/onlinelog/group7 NO
7 ONLINE + FRA/oracle/onlinelog/group7 NO
8 ONLINE + DATA/oracle/onlinelog/group8 NO
8 ONLINE + FRA/oracle/onlinelog/group8 NO
8 rows selected
SQL > select thread#,group#,archived,status from v$log
THREAD# GROUP# ARCHIVED STATUS
--
1 5 NO CURRENT
2 6 YES INACTIVE
1 7 YES INACTIVE
2 8 NO CURRENT
SQL > alter system switch logfile
System altered
SQL > /
System altered
SQL > /
System altered
SQL > /
System altered
SQL > /
System altered
SQL > select * from v$logfile
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
5 ONLINE + DATA/oracle/onlinelog/group5 NO
5 ONLINE + FRA/oracle/onlinelog/group5 NO
6 ONLINE + DATA/oracle/onlinelog/group6 NO
6 ONLINE + FRA/oracle/onlinelog/group6 NO
7 ONLINE + DATA/oracle/onlinelog/group7 NO
7 ONLINE + FRA/oracle/onlinelog/group7 NO
8 ONLINE + DATA/oracle/onlinelog/group8 NO
8 ONLINE + FRA/oracle/onlinelog/group8 NO
8 rows selected
SQL > select thread#,group#,archived,status from v$log
THREAD# GROUP# ARCHIVED STATUS
--
1 5 YES ACTIVE
2 6 NO CURRENT
1 7 NO CURRENT
2 8 YES ACTIVE
SQL >
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.