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

Modify redo_logfile group membership and size

2025-04-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

1.SYS@ORCL > select GROUP#, BYTES/1024/1024 size_M,STATUS,ARCHIVED from v$log

GROUP# SIZE_M STATUS ARC

1 50 INACTIVE YES

2 50 INACTIVE YES

3 50 CURRENT NO

two。 Delete the original log group; (only operate log groups with the status of inactive)

If the log group is current, you need to switch logs first: alter system switch logfile

If active, you can force a checkpoint: alter system checkpoint

SYS@ORCL > alter system switch logfile

System altered.

SYS@ORCL > alter system checkpoint;-- enforce checkpoints

SYS@ORCL > select GROUP#, BYTES/1024/1024 size_M,STATUS,ARCHIVED from v$log

GROUP# SIZE_M STATUS ARC

1 50 INACTIVE YES

2 50 INACTIVE YES

3 50 ACTIVE YES

SYS@ORCL > alter database drop logfile group 1

Database altered.

SYS@ORCL > alter database drop logfile group 2

Database altered.

-

After deletion, you also need to specify a directory to delete log files before you can create files. For example, log groups with other names should not have this restriction.

-

3. Add 3 log groups with a size of 200m

SYS@ORCL > alter database add logfile group 1'/ u01/app/oracle/oradata/orcl11g/redo01.log'size 200m

Database altered.

SYS@ORCL > alter database add logfile group 2'/ u01/app/oracle/oradata/orcl11g/redo02.log'size 200m

Database altered.

SYS@ORCL > alter database add logfile group 3'/ u01/app/oracle/oradata/orcl11g/redo03.log'size 200m

4. Add a member to a log group

Cd / u01/app/oracle/oradata/orcl11g/

Mkdir redo_bak

SYS@ORCL > alter database add logfile member'/ u01 to group to group 1

Database altered.

SYS@ORCL > alter database add logfile member'/ u01 to group to group 2

Database altered.

SYS@ORCL > alter database add logfile member'/ u01 to group to group 3

Database altered.

5. Delete a log group member

Alter database drop logfile member'/ u01 apprentice.oracle.oradata; orcl11g; redoblembak; redo02qbakandredo02q.log'

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: 250

*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