Oracle数据库修改redo文件大小

2024年 1月 18日 86.5k 0

  1. 查看现有日志文件组

SQL> select group#,member,status from v$logfile;

SQL> select group# from v$log;

    GROUP#

----------

         1

         2

         3

传送到redo文件所在文件夹

$ du -m redo01.log

100.00  redo01.log

  1. 创建临时使用的新日志文件组(4,5)

SQL> alter database add logfile group 4 '/tablespace/orcl/admin/redo04.log' size 200M;

Database altered.

SQL> alter database add logfile group 5 '/tablespace/orcl/admin/redo05.log' size 200M;

Database altered.

  1. 切换到新建日志组(4,5)

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> select group#,status from v$log;

    GROUP# STATUS

---------- ----------------

         1 INACTIVE

         2 INACTIVE

         3 INACTIVE

         4 INACTIVE

         5 CURRENT

  1. 删除原有的1,2,3日志文件组

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.

  1. 重新创建1,2,3日志文件组

SQL> alter database add logfile group 1 '/tablespace/orcl/admin/redo01.log' size 200M;

Database altered.

SQL> alter database add logfile group 2 '/tablespace/orcl/admin/redo02.log' size 200M;

Database altered.

SQL> alter database add logfile group 3 '/tablespace/orcl/admin/redo03.log' size 200M;

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> select group#,status from v$log;

    GROUP# STATUS

---------- ----------------

         1 INACTIVE

         2 CURRENT

         3 UNUSED

         4 INACTIVE

         5 INACTIVE

  1. 删除日志文件组4,5

SQL> alter database drop logfile group 4;

Database altered.

SQL> alter database drop logfile group 5;

Database altered.

7.RAC增加redo文件

select * from v$logfile

select * from v$log

select group#, sequence#, members, bytes, status, archived from v$log;

ALTER DATABASE add LOGFILE THREAD 1 group 6 '+DATA' SIZE 200M;

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论