控制檔案MAXDATAFILES, MAXLOGFILES, MAXLOGMEMBERS等引數的說明?

studywell發表於2017-08-19
在建立資料庫時,注意到這樣幾個引數:
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100

建立後的控制檔案中包含引數:
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXDATAFILES 100
    MAXINSTANCES 1
    MAXLOGHISTORY 292


查詢後備注留記錄:
1、MAXLOGFILES

MaxLogFiles can be defined when the database is created or when the controlfile is recreated. 
The default value, if not especified, is 32, and the maximun value is 256.

2、MAXLOGMEMBERS

MaxLogMembers can be defined when the database is created or when the controlfile is recreated. 
The default value, if not especified, is 2, and the maximun value is 5.

In Oracle10g, now you can also specify the following parameters:

3、 MAXINSTANCES 

The MAXINSTANCES option of CREATE DATABASE limits the number of instances that can access a database concurrently. 
The default value for this option under z/OS is 15. Set MAXINSTANCES to a value greater than the
maximum number of instances you expect to run concurrently.


4、MAXLOGHISTORY 

The MAXLOGHISTORY option of CREATE DATABASE specifies the maximum number of redo log files that can be recorded in the log
history of the control file. The log history is used for automatic media recovery of
Oracle Real Application Clusters.
For Oracle Real Application Clusters, set MAXLOGHISTORY to a large value, such
as 100. The control file can then store information about this number of redo log
files. When the log history exceeds this limit, the Oracle server overwrites the oldest
entries in the log history. 
Setting the MAXLOGHISTORY to 0 (zero), disables log history.

5、MAXDATAFILES
    
MAXDATAFILES 在控制檔案中自動擴充套件,但必須小於spfile中的“db_files”;


==========================================================
對這些引數11G官方文件額限定值:


Table A-1 CREATE CONTROLFILE and CREATE DATABASE Parameters

Parameter Default Maximum Value

MAXLOGFILES

16

255

MAXLOGMEMBERS

2

5

MAXLOGHISTORY

100

65534

MAXDATAFILES

30

65534

MAXINSTANCES

1

63


 lists the Oracle Database file size limits in bytes.

File Type Maximum SIze

Data files

4,194,303 multiplied by the value of the DB_BLOCK_SIZE parameter

Import/Export files and SQL*Loader files

   Unlimited

Control files

192000 database blocks


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

需要修改控制檔案中的值,重建控制檔案解決

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 "PROD3" NORESETLOGS  NOARCHIVELOG
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXDATAFILES 100
    MAXINSTANCES 1
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 (
    '/u01/app/oracle/oradata/PROD3/redo01a.log',
    '/u01/app/oracle/oradata/PROD3/redo01b.log'
  ) SIZE 100M BLOCKSIZE 512,
  GROUP 2 (
    '/u01/app/oracle/oradata/PROD3/redo02a.log',
    '/u01/app/oracle/oradata/PROD3/redo02b.log'
  ) SIZE 100M BLOCKSIZE 512,
  GROUP 3 (
    '/u01/app/oracle/oradata/PROD3/redo03a.log',
    '/u01/app/oracle/oradata/PROD3/redo03b.log'
  ) SIZE 100M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  '/u01/app/oracle/oradata/PROD3/system01.dbf',
  '/u01/app/oracle/oradata/PROD3/sysaux01.dbf',
  '/u01/app/oracle/oradata/PROD3/undotbs01.dbf',
  '/u01/app/oracle/oradata/PROD3/users01.dbf'
CHARACTER SET US7ASCII;


RECOVER DATABASE
ALTER DATABASE OPEN;
ALTER TABLESPACE TEMPTS1 ADD TEMPFILE '/u01/app/oracle/oradata/PROD3/temp01.dbf' SIZE 20971520  REUSE AUTOEXTEND OFF;


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

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29519108/viewspace-2143803/,如需轉載,請註明出處,否則將追究法律責任。

相關文章