Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Add redo log group and add log group diversification

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

View the status of redo log groups and the location of logs.

SQL > select * from v$log

GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCSTATUS FIRST_CHANGE#FIRST_TIME NEXT_CHANGE# NEXT_TIME

1 1 10 52428800 512 1YES INACTIVE 102400224-NOV-15 1026535 24-NOV-15

2 1 11 52428800 512 1YES ACTIVE 102653524-NOV-15 1039876 27-NOV-15

3 1 12 52428800 512 1NO CURRENT 1039876 27-NOV-15 2.8147E+14

SQL > col memberfor A50

SQL > select * from v$logfile

GROUP# STATUS TYPE MEMBER IS_

3 ONLINE / u01/apps/oracle/oradata/orcl/redo03.log NO

2 ONLINE / u01/apps/oracle/oradata/orcl/redo02.log NO

1 ONLINE / u01/apps/oracle/oradata/orcl/redo01.log NO

Establish the path where the system will store log groups.

SQL >! mkdir-p/u01/apps/oracle/oradata/orcl/redo

SQL > alter database add logfile group4 ('/ u01ax size size 50m)

Database altered.

Establish diversity for each redo log group.

SQL > alter database add logfilemember'/ u01qappsUniplicateoracle.oradataUniplicationorclPlanceRedoLog'to group 1

Databasealtered.

SQL > alter database add logfilemember'/ u01 to group to group 2

Databasealtered.

SQL > alter database add logfilemember'/ u01 to group to group 3

Databasealtered.

SQL > alter database add logfilemember'/ u01 to group to group 4

Databasealtered.

Check the status of redo, combination 4 is not used, so cut the log several times, combination 4 has taken effect.

SQL > select * from v$log

GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCSTATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME

-

1 1 10 52428800 512 2YES INACTIVE 102400224-NOV-15 1026535 24-NOV-15

2 1 11 52428800 512 2YES INACTIVE 102653524-NOV-15 1039876 27-NOV-15

3 1 12 52428800 512 2NO CURRENT 103987627-NOV-15 2.8147E+14

4 1 0 52428800 512 2YES UNUSED 00

SQL > select * fromv$logfile

GROUP# STATUS TYPE MEMBER IS_

3 ONLINE / u01/apps/oracle/oradata/orcl/redo03.log NO

2 ONLINE / u01/apps/oracle/oradata/orcl/redo02.log NO

1 ONLINE / u01/apps/oracle/oradata/orcl/redo01.log NO

4 ONLINE / u01/apps/oracle/oradata/orcl/redo/redo04.log NO

1 INVALID ONLINE / u01/apps/oracle/oradata/orcl/redo/redo011.log NO

2 INVALID ONLINE / u01/apps/oracle/oradata/orcl/redo/redo022.log NO

3 INVALID ONLINE / u01/apps/oracle/oradata/orcl/redo/redo033.log NO

4 INVALID ONLINE / u01/apps/oracle/oradata/orcl/redo/redo044.log NO

SQL > alter systemswitch logfile

Systemaltered.

SQL > /

Systemaltered.

SQL > /

Systemaltered.

SQL > /

Systemaltered.

View log group diversity

SQL > select * fromv$log

GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCSTATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME

-

1 1 14 52428800 512 2YES INACTIVE 104102627-NOV-15 1041029 27-NOV-15

2 1 15 52428800 512 2YES INACTIVE 104102927-NOV-15 1041037 27-NOV-15

3 1 16 52428800 512 2NO CURRENT 104103727-NOV-15 2.8147E+14

41 13 52428800 512 2YES INACTIVE 104100727-NOV-15 1041026 27-NOV-15

SQL > select * fromv$logfile

GROUP# STATUS TYPE MEMBER IS_

3 ONLINE / u01/apps/oracle/oradata/orcl/redo03.log NO

2 ONLINE / u01/apps/oracle/oradata/orcl/redo02.log NO

1 ONLINE / u01/apps/oracle/oradata/orcl/redo01.log NO

4 ONLINE / u01/apps/oracle/oradata/orcl/redo/redo04.log NO

1 ONLINE / u01/apps/oracle/oradata/orcl/redo/redo011.log NO

2 ONLINE / u01/apps/oracle/oradata/orcl/redo/redo022.log NO

3 ONLINE / u01/apps/oracle/oradata/orcl/redo/redo033.log NO

4 ONLINE / u01/apps/oracle/oradata/orcl/redo/redo044.log NO

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report