ITPub博客

首页 > Linux操作系统 > Linux操作系统 > redo日志管理(二)10g中MAXLOGFILES参数的变化

redo日志管理(二)10g中MAXLOGFILES参数的变化

原创 Linux操作系统 作者:lsq_008 时间:2009-04-01 19:43:54 0 删除 编辑

1.首先dump出trace文件,查看原来的MAXLOGFILES参数设置。
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "EBANK" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXDATAFILES 100
    MAXINSTANCES 1
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '/oracle/oradata/ebank/10g_redo01.log'  SIZE 10M,
  GROUP 2 '/oracle/oradata/ebank/10g_redo02.log'  SIZE 10M,
  GROUP 3 '/oracle/oradata/ebank/10g_redo03.log'  SIZE 10M
-- STANDBY LOGFILE
DATAFILE
  '/oracle/oradata/ebank/10g_system01.dbf',
  '/oracle/oradata/ebank/users01.dbf',
  '/oracle/oradata/ebank/10g_sysaux01.dbf',
  '/oracle/oradata/ebank/10g_undotbs01.dbf',
  '/oracle/oradata/ebank/tools01.dbf',
  '/oracle/oradata/ebank/tsa01.dbf',
  '/oracle/oradata/ebank/tsb01.dbf',
  '/oracle/oradata/ebank/tsc01.dbf',
  '/oracle/oradata/ebank/tsd01.dbf',
  '/ora10g/oradata/ebank/users02.dbf',
  '/ora10g/oradata/ebank/users03.dbf'
CHARACTER SET US7ASCII
;

可见,原来建库的时候设置了该参数为5,接下来进行测试,手动添加6组redo日志:

SQL> alter database add logfile GROUP 4 '/oracle/oradata/ebank/10g_redo04.log'  SIZE 10M;

Database altered.

SQL> alter database add logfile GROUP 5 '/oracle/oradata/ebank/10g_redo05.log'  SIZE 10M;
alter database add logfile GROUP 6 '/oracle/oradata/ebank/10g_redo06.log'  SIZE 10M;
alter database add logfile GROUP 7 '/oracle/oradata/ebank/10g_redo07.log'  SIZE 10M;
alter database add logfile GROUP 8 '/oracle/oradata/ebank/10g_redo08.log'  SIZE 10M;
alter database add logfile GROUP 9 '/oracle/oradata/ebank/10g_redo09.log'  SIZE 10M;


Database altered.

SQL>

Database altered.

SQL>
Database altered.

SQL>
Database altered.

SQL>
Database altered.

SQL> SQL> SQL>

添加成功后,再次dump出控制文件,查看trace内容:

SQL>  alter database backup controlfile to trace;

Database altered.


STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "EBANK" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 21
    MAXLOGMEMBERS 5
    MAXDATAFILES 100
    MAXINSTANCES 1
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '/oracle/oradata/ebank/10g_redo01.log'  SIZE 10M,
  GROUP 2 '/oracle/oradata/ebank/10g_redo02.log'  SIZE 10M,
  GROUP 3 '/oracle/oradata/ebank/10g_redo03.log'  SIZE 10M,
  GROUP 4 '/oracle/oradata/ebank/10g_redo04.log'  SIZE 10M,
  GROUP 5 '/oracle/oradata/ebank/10g_redo05.log'  SIZE 10M,
  GROUP 6 '/oracle/oradata/ebank/10g_redo06.log'  SIZE 10M,
  GROUP 7 '/oracle/oradata/ebank/10g_redo07.log'  SIZE 10M,
  GROUP 8 '/oracle/oradata/ebank/10g_redo08.log'  SIZE 10M,
  GROUP 9 '/oracle/oradata/ebank/10g_redo09.log'  SIZE 10M
-- STANDBY LOGFILE
DATAFILE
  '/oracle/oradata/ebank/10g_system01.dbf',
  '/oracle/oradata/ebank/users01.dbf',
  '/oracle/oradata/ebank/10g_sysaux01.dbf',
  '/oracle/oradata/ebank/10g_undotbs01.dbf',
  '/oracle/oradata/ebank/tools01.dbf',
  '/oracle/oradata/ebank/tsa01.dbf',
  '/oracle/oradata/ebank/tsb01.dbf',
  '/oracle/oradata/ebank/tsc01.dbf',
  '/oracle/oradata/ebank/tsd01.dbf',
  '/ora10g/oradata/ebank/users02.dbf',
  '/ora10g/oradata/ebank/users03.dbf'
CHARACTER SET US7ASCII
;

发现MAXLOGFILES 已经变为21,可见,oracle 10g中,该参数已经可以自动调整。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10972173/viewspace-584290/,如需转载,请注明出处,否则将追究法律责任。

上一篇: round(date)函数
请登录后发表评论 登录
全部评论
十余年大型金融及电信系统数据库管理经验,曾服务于中国建设银行、中国移动。对oracle,mysql数据库有深入了解。 擅长python开发,独立开发了开源数据库自动化监控运维平台Power Monitor。

注册时间:2008-02-29

  • 博文量
    325
  • 访问量
    1235852