Oracle 控制文件中MAXDATAFILES, DB_FILES 参数 与 数据库最大datafiles 关系说明

 

 

一.控制文件中的 MAXDATAFILES 参数

有关Oracle 的控制文件说明,参考我之前的Blog:

Oracle 控制文件

http://www.cndba.cn/Dave/article/1216

 

在Oracle 的控制文件中有一个参数:MAXDATAFILES,其用来控制数据库最大支持的datafile 的个数。在使用DBCA 创建实例时可以修改这个参数。

 


也可以通过dump 控制文件来查看这个参数:

 SQL> oradebug setmypid

Statement processed.

SQL> alter database backup controlfileto trace;

Database altered.

SQL> oradebug tracefile_name

d:\app\administrator\diag\rdbms\newccs\newccs\trace\newccs_ora_6960.trc

 

trace 里的内容:

CREATE CONTROLFILE REUSE DATABASE"NEWCCS" RESETLOGS  ARCHIVELOG

   MAXLOGFILES 16

   MAXLOGMEMBERS 3

    MAXDATAFILES 100

   MAXINSTANCES 8

MAXLOGHISTORY292

--这里的100 是控制文件中的默认值

 

 

二.DB_FILES 参数

Oracle 11gR2 上对这个参数的说明:

http://docs.oracle.com/cd/E11882_01/server.112/e25513/initparams057.htm

 

 

Property

Description

Parameter type

Integer

Default value

200

Modifiable

No

Range of values

Minimum: the largest among the absolute file numbers of the datafiles in the database

Maximum: operating system-dependent

Basic

No

Oracle RAC

Multiple instances must have the same value.

 

DB_FILES specifies the maximum numberof database files that can be opened for this database. The maximum valid valueis the maximum number of files, subject to operating system constraint, thatwill ever be specified for the database, including files to be addedby ADD DATAFILE statements.

--DB_FILES 参数指定数据库能打开的最大的datafiles 的数量,这个最大值也会受操作系统的限制。

 

If you increasethe value of DB_FILES, then you must shut down and restart all instancesaccessing the database before the new value can take effect. If you have aprimary and standby database, then they should have the same value for thisparameter.

--如果我们增加DB_FILES 的值,那么必须重启instance,才能让修改生效。 如果是DG 环境,也需要保证主备库参数一致。

 

       在Oracle 11gR2 中,这个参数的默认值是200,比控制文件的默认值大。

 

三.控制文件中的 MAXDATAFILES 和 DB_FILES 关系

MOS 文档:kccrsz: expanded controlfile message in"alert.log" [ID 101020.1]

 

 

Problem Description

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

 

The "alert.log" file shows thefollowing message:

   kccrsz: expanded controlfile section 4 from 17 to 18 records

           number of logical blocks in section remains at 2

   Completed: alter tablespace tb1 add datafile

 

 

Solution Description

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

 

Starting inOracle8 the controlfile is automatically expanded. A new datafile is addedbeyond the maxdatafiles limited specified in the control file. 

--从Oracle 8 开始,控制文件是自动扩展的,当新添加的datafile时,datafile的个数超过了控制空maxdatafiles 参数的限制时,maxdatafiles参数值会自动的增加。

--这个验证可以通过dump 控制文件来查看

 

This alsohappens if new records are added to the "log_history" section of thecontrol files and there are no entries that could be replaced. 

--控制文件的自动扩展也发生在的section 不够时。

 

The routine thatperforms the expansion writes this message to the alert log. The messagesspecifies the section that was expanded and the amount of the expansion. Pleasenote that this message cannot be turned off.

--执行扩展操作时会往alert log 里写一些log 信息,就是上面部分的内容,这部分内容列出了扩展的section和扩展的数量,这个显示信息不能被关闭。

 

The automatic expansion only occurs up to the limit of the "init.ora" parameter "DB_FILES".

       --注意,控制文件中的自控扩展的datafile 的最大值就是我们DB_FILES 参数的值。 所以这也是我们之前看的,DB_FILES 参数值比控制文件中默认值大的原因。

 

 

 

总结一下:

       数据库中真正的最大的datafiles 的个数由DB_FILES 参数决定,虽然控制文件中也有限制,但是这个控制文件中的限制参数会自动的增加,直到到达DB_FILES的值。

 

 

 

 

 

 

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

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

QQ:492913789

Email:ahdba@qq.com

Blog:  http://www.cndba.cn/dave

Weibo: http://weibo.com/tianlesoftware

Twitter: http://twitter.com/tianlesoftware

Facebook:http://www.facebook.com/tianlesoftware

 

-------加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请----

DBA1 群:62697716(满);   DBA2 群:62697977(满)  DBA3 群:62697850(满)  

DBA 超级群:63306533(满);  DBA4 群:83829929   DBA5群: 142216823

DBA6 群:158654907    DBA7 群:172855474   DBA总群:104207940

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值