db_files和maxdatafiles


db_files和maxdatafiles


maxdatafiles: max # of datafiles that can be recorded in the control file. the larger value of maxdatafiles, the larger the control file

db_files: max # of datafiles that can be open for a particular instance. usaully db_files is less than maxdatafiles. the larger value of db_files, the larger SGA.


the max number of datafiles an instance can attach is min(db_files, maxdatafiles)


===============================================


Oracle db_files and maxdatafiles parameters

Don Burleson


The db_files parameter is a "soft limit " parameter that controls the maximum number of physical OS files that can map to an Oracle instance. Historically (before Oracle8i) you need to be careful not to set db_files too high, else you would have DBWR (database writer) issues.


The maxdatafiles parameter is a different "hard limit" parameter. When you issue a "create database" command, the value you specify for maxdatafiles is stored in your Oracle control files. The default value of 32 is usually sufficient, but after Oracle8i there is no downside to using a larger value.
In practice, many Oracle DBA with large databases will segregate important tables and indexes into isolated tablespaces and datafiles to give them more control and detailed statistrics.

Fixing a maxdatafiles limit problem
In practice, the ORA-1118 occurs when your database has hit the MAXDATAFILES limit, usually during database maintenance. Here are instructions from "Rhubarb" Stewart McGlaughlin, one of the best Oracle DBA's in North Carolina:

1. Shutdown database; Backup database
2. Start up database
3. From sqlplus as sysdba, type: alter database backup controlfile to trace;
4. Type: shutdown immediate:
5. Go to the operating system and go to the USER_DUMP_DEST directory
6. Find the newest trace file
7. Edit the trace file and change MAXDATAFILES to the new value. You will also need to delete all of the lines prior to the line that begins: STARTUP NOMOUNT. See sample text below (the example is for a database using ARCHIVELOG):

STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "ORACLE" RESETLOGS ARCHIVELOG
MAXLOGFILES 32 MAXLOGMEMBERS 2
MAXDATAFILES 32
MAXINSTANCES 16
MAXLOGHISTORY 1600
LOGFILE
GROUP 1 'D:ORAWIN95DATABASELOG2ORCL.ORA' SIZE 200K,
GROUP 2 'D:ORAWIN95DATABASELOG1ORCL.ORA' SIZE 200K DATAFILE 'D:ORAWIN95DATABASESYS1ORCL.ORA', 'D:ORAWIN95DATABASEUSR1ORCL.ORA', 'D:ORAWIN95DATABASERBS1ORCL.ORA', 'D:ORAWIN95DATABASETMP1ORCL.ORA' ;

# Database can now be opened normally. ALTER DATABASE OPEN RESETLOGS;


8. From sqlplus as sysdba, run the edited trace file from step 7.
9. Shutdown database and backup database

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

转载于:http://blog.itpub.net/35489/viewspace-85036/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值