您的位置:首页 > 数据库 > Oracle

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

2012-02-06 17:32 633 查看

一.控制文件中的 MAXDATAFILES 参数

有关Oracle 的控制文件说明,参考我之前的Blog:
Oracle 控制文件
/article/1361931.html

在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


[thead] [/thead]
PropertyDescription
Parameter typeInteger
Default value200
ModifiableNo
Range of valuesMinimum: the largest among the absolute file numbers of the datafiles in the database Maximum: operating system-dependent
BasicNo
Oracle RACMultiple 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的值。






-------------------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
Email: tianlesoftware@gmail.com
Skype: tianlesoftware
Blog: http://www.tianlesoftware.com 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐