一.控制文件中的
MAXDATAFILES
参数
在Oracle
的控制文件中有一个参数:MAXDATAFILES,其用来控制数据库最大支持的datafile
的个数。在使用DBCA
创建实例时可以修改这个参数
http://s5/mw690/a5a24bcbtd1e5946cbf94&690
SQL> oradebug
setmypid
Statement processed.
SQL> alter database backup
controlfile to trace;
Database altered.
SQL> oradebug
tracefile_name
/home/oracle/app/product/10.2.0/db_1/admin/orcl/udump/orcl_ora_3492.trc.
trace里的内容
http://s11/mw690/a5a24bcbtd2589da6558a&690
--这里的100是控制文件中默认的值
二.DB_FILES 参数
Oracle 11gR2上对这个参数的说明:
http://docs.oracle.com/cd/E11882_01/server.112/e25513/initparams058.htm
http://s13/bmiddle/a5a24bcbtd258a00ea78c&690
DB_FILES specifies the maximum number of database files that can be opened for this database. The maximum valid value is the maximum number of files, subject to operating system constraint, that will ever be specified for the database, including files to be added by ADD DATAFILE statements.
--DB_FILES 参数指定数据库能打开的最大的datafiles 的数量,这个最大值也会受操作系统的限制
If you increase the value of DB_FILES, then you must shut down and restart all instances accessing the database before the new value can take effect. If you have a primary and standby database, then they should have the same value for this parameter.
--如果我们增加DB_FILES 的值,那么必须重启instance,才能让修改生效。 如果是DG 环境,也需要保证主备库参数一致。
三.控制文件中的 MAXDATAFILES 和 DB_FILES 关系
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的值。
源文来自http://blog.csdn.net/tianlesoftware/article/details/7237448的分享
加载中,请稍候......