ORA-00059: maximum number of DB_FILES exceeded 處理
今天新增資料檔案,結果報錯,ORA-00059: maximum number of DB_FILES exceeded 。
---------------
Cause: An unavailable resource was requested.
The maximum number of datafiles is specified by the DB_FILES parameter in the initialization parameter file.
When this maximum is reached, no more requests are processed.
Action: Try again when the resource is freed.
If this message occurs often, Oracle must be shut down and restarted after increasing the DB_FILES parameter in the initialization parameter file.
If the DB_FILES parameter cannot be changed because it is already set to the MAXDATAFILES parameter value, set at database creation, you must create a new control file.
------------------
資料庫引數顯示,db_files 設定為 200, 而 select count(*) from v$datafile; 之後得到的資料也是 200 , 說明已經達到了設定的最大值。
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 200
SQL>
不過透過 SQL> alter database backup controlfile to trace ; 在udump下面找到控制檔案文字,檢視發現 MAXDATAFILES 1024 , 如下面:
# be invalidated. Use this only if online logs are damaged.
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG
-- SET STANDBY TO MAXIMIZE PERFORMANCE
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 3857
LOGFILE
GROUP 1 (
'/ocfs_ctrl_redo/orcl/redo01.log',
'/ocfs_data/orcl/redo01b.log'
) SIZE 100M,
由於db_files 引數值 200沒有超過 maxdatafiles 1024 的大小,所以可以透過直接加大引數db_files 值來防止此錯誤出現,以便正確加入資料檔案。 但是如果 db_files 已經設定和maxdatafiles 一樣大小了, 報錯ORA-00059, 那麼就只有修改控制檔案中的值了,需要重新生成控制檔案。使用 alter database backup controlfile to trace , 到你的udump 目錄下找到這個剛剛生成的trc檔案,去掉其中的解釋部分,保留Create controlfile 部分,編輯此檔案,增加MAXDATAFILES 的值,然後關閉資料庫shutdown immediate , 全備份一次資料庫, 將現有的控制檔案備份到其他地方, 然後從控制檔案目錄刪除,假設將編輯好的trc檔案命名為 recreate_control.sql ; 那麼我們現在可以執行重新建立控制檔案了。 注意修改的trc 檔案開頭都會有 STARTUP NOMOUNT 。
SQL> @recreate_control.sql
SQL> alter database open noresetlogs;
如果你收到了 Statement processed 的反饋資訊,那麼生效 。
=================================
Metalink 上的建議解決方法:
==================================
Cause: An unavailable resource was requested.
The maximum number of datafiles is specified by the DB_FILES parameter in the initialization parameter file.
When this maximum is reached, no more requests are processed.
Action: Try again when the resource is freed.
If this message occurs often, Oracle must be shut down and restarted after increasing the DB_FILES parameter in the initialization parameter file.
If the DB_FILES parameter cannot be changed because it is already set to the MAXDATAFILES parameter value, set at database creation, you must create a new control file.
RECREATING THE CONTROL FILE:
----------------------------
In Oracle7 or higher, you can create the control file. In addition, you can get
Oracle to create the script for you. To do this, perform the following steps:
1. With the database mounted or open, issue the following commands:
SQL> alter database backup controlfile to trace;
SQL> exit
2. A trace file will have been generated in your 'user_dump_dest'.
User_dump_dest is an init.ora parameter, and can be found by issuing:
SQL> show parameter user_dump_dest
The easiest way to locate the correct trace is to look at its date. A
file will exist with the current date and time. The naming convention
for these files is operating system specific.
3. Once the file is located, search through the file for the word "CONTROL"
You should find:
# The following commands will create a new control file and use it
# to open the database.
# No data other than log history will be lost. Additional logs may ETC.ETC.
4. Copy this trace file to some location and rename it to end it ".sql",
for this example, it is called "recr_con.sql".
5. Edit the "recr_con.sql" deleting the trace header information. Then
increase the value that you find next to the word "MAXDATAFILES".
6. Shutdown the database (NORMAL or IMMEDIATE, but not ABORT).
7. Take a full database backup at this time.
8. Remove the current control files. It is essential to remove all control
files, otherwise, you will receive an error. In addition, you CANNOT
REUSE the control file, since the size of the control file will increase
when you increase MAXDATAFILES.
9. Create the controlfile within SQLDBA:
SQL> connect internal
SQL> @recr_con.sql
SQL> alter database open noresetlogs;
If you receive a "Statement processed" message, then your database is
now back up and running with a higher datafile limit. It is recommended
to shutdown at this time and take a full backup.
CREATE CONTROLFILE SYNTAX:
-------------------------
The following is information on the create control file syntax, this information is fully documented in the Oracle SQL Reference Manual. The syntax of this command is similar to CREATE DATABASE. The defaults for any missing clauses are the same as the DATABASE defaults for CREATE DATABASE.
CREATE CONTROLFILE [REUSE]
SET DATABASE name
[LOGFILE filespec [, filespec] ...]
RESETLOGS | NORESETLOGS
[MAXLOGFILES integer]
[DATAFILE filespec [, filespec] ...]
[MAXDATAFILES integer]
[MAXINSTANCES integer]
[ARCHIVELOG | NOARCHIVELOG]
[SHARED | EXCLUSIVE]
Parameters:
REUSE: If present the control files may already exist. The
new control files will overwrite the existing files. If
this option is missing, the new control files must not
yet exist. As in CREATE DATABASE, the names of the
control files are determined by the init.ora parameter
control_files.
DATABASE: Must match the database names in the data and log
files.
LOGFILE: This clause lists all the online logs that will be
used for this database. If not specified the port
dependant defaults will be assumed. The interpretation
of the filespecs depends on the next parameter.
RESETLOGS: If this flag is present the current contents of
the online logs are ignored. The new control files will
contain flags requiring ALTER DATABASE OPEN RESETLOGS,
which initializes the logs. Media recovery may be
applied as needed before the open. Note that either
RESETLOGS or NORESETLOGS must be specified. It is safest
to choose RESETLOGS and follow it with normal media
recovery.
NORESETLOGS: If specified, the log files must be the current
online logs. They must not be restored backups, and all
log files must be listed. Their headers are read to
construct the control file entries. They are used for
recovery. If archiving is enabled all the online logs
must be archived, even if they were already archived.
The SIZE option in the filespecs, if present, will be
used to validate the size of the file named.
MAXLOGFILES: Same as for CREATE DATABASE. May be different
than the value in the original control file, but it may
not be smaller the maximum number of log files the
database ever contained - including ones that have been
dropped. Set it greater than or equal to the value used
at CREATE DATABASE time.
DATAFILE: To ensure proper behavior, all datafiles for the
database must be listed. It is possible to omit a non
system tablespace file only if media recovery is enabled
and you will not be doing an open reset logs on the first
open after the create controlfile. If the omitted
file(s) contain(s) active rollback segments, the open
will most likely fail, in which case the missing
datafile(s) must be found, and the controlfile recreated.
All datafiles listed must be accessible since they are
assumed to be online. They MAY be backup copies needing
recovery. Their headers are read to construct the
control file records. The SIZE option in the filespecs,
if present, is used to validate the size of the file
named. The reuse option is ignored. The next database
open validates that all the files are specified and that
the sizes match.
MAXDATAFILES: Same as for CREATE DATABASE. May be different
than the value in the original control file, but it may
not be smaller the maximum number of data files the
database ever contained - including ones that have been dropped.
MAXINSTANCES: Same as for CREATE DATABASE. May be different
than the value in the original control file.
[NO]ARCHIVELOG: Same as for CREATE DATABASE. May be different
than the value in the original control file.
If you wish to archive logs, it is recommended that the
ARCHIVELOG option be used with CREATE CONTROLFILE even
though the option can later be enabled with an
ALTER DATABASE command. NOARCHIVELOG is the default.
SHARED: Same as for CREATE DATABASE.
EXCLUSIVE: Same as for CREATE DATABASE.
EXAMPLE:
---------------------------------------------------------------
CREATE CONTROLFILE
SET DATABASE ORACLE
LOGFILE '/releases1/6036p/dbs/log2ORACLE.dbf '
'/releases1/6036p/dbs/log3ORACLE.dbf '
DATAFILE '/releases1/oracle/dbs/data_space.dbf',
'/releases1/6036p/dbs/usrORACLE.dbf'
MAXDATAFILES 121
NORESETLOGS;
---------------------------------------------------------------
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2153322/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-00059: maximum number of DB_FILES exceeded 情況分析及實驗處理
- ORA-00059:maximum number of DB_FILES exceed 解決
- 更改oracle 預設db_files 200(ORA-00059: maximum number of DB_FILESOracle
- [LeetCode] Third Maximum NumberLeetCode
- [20181220]ORA-1000 "maximum open cursors exceeded".txt
- ProTable 報錯Uncaught RangeError: Maximum call stack size exceededError
- AST is too big. Maximum: 500000 處理AST
- [LeetCode] 2684. Maximum Number of Moves in a GridLeetCode
- skipped: maximum number of running instances reached (1)
- ORA-00018:maximum number of sessions exceedeSession
- js中Uncaught RangeError: Maximum call stack size exceeded錯誤JSError
- 關於錯誤訊息 RangeError - Maximum call stack size exceeded at XXXError
- [LeetCode] 1953. Maximum Number of Weeks for Which You Can WorkLeetCode
- Vue專案中出現:Maximum call stack size exceeded(堆疊溢位)Vue
- LeetCode(1297):子串的最大出現次數 Maximum Number of Occurrences of a Substring(Java)LeetCodeJava
- DB_FILES引數
- RAC 修改引數DB_FILES
- 多對一處理 和一對多處理的處理
- JSP 異常處理如何處理?JS
- E - Maximum Glutton
- Lock wait timeout exceeded; try restarting transactionAIREST
- 字串處理字串
- 平滑處理
- 事件處理事件
- 模板處理
- Python影像處理丨5種影像處理特效Python特效
- webgl 影像處理2---影像畫素處理Web
- APM RUEI processor處理程式hang死處理方法
- 【故障處理】ORA-600:[13013],[5001]故障處理
- Apache Beam,批處理和流式處理的融合!Apache
- Python錯誤處理和異常處理(二)Python
- Python資料處理(二):處理 Excel 資料PythonExcel
- C#基礎之前處理器,異常處理C#
- rust學習十、異常處理(錯誤處理)Rust
- Python 影像處理 OpenCV (6):影像的閾值處理PythonOpenCV
- Python 影像處理 OpenCV (7):影像平滑(濾波)處理PythonOpenCV
- 一次OutOfMemoryError: GC overhead limit exceededErrorGCMIT
- [20210305]Oracle Rolling Invalidate Window Exceeded(3).txtOracle