db_files
Maximum number of data files the database can hold, counted database-wide rather than per instance.
- デフォルト
200- Range
- 1 to an OS-dependent maximum
- Restart needed
- はい
- Default checked on
- Oracle AI Database 26ai / 23ai
何ができるか
Raising it takes effect at the next startup and grows the control file to track the extra records. Every instance of a RAC database must run the same value. A smallfile data file also tops out at about four million blocks, so with 8KB blocks one file holds roughly 32GB and very large databases need many files or bigfile tablespaces.
デフォルト値
200. 200 (Oracle 23ai/26ai).
Check the current value
SHOW PARAMETER db_files SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'db_files'; -- What the SPFILE holds, which is what applies at the next startup: SELECT value FROM v$sppparameter WHERE name = 'db_files';
Change it
ALTER SYSTEM SET db_files = 2000 SCOPE=SPFILE; -- then SHUTDOWN IMMEDIATE and STARTUP
Restart required: the parameter is static (ISSYS_MODIFIABLE = FALSE), so only SCOPE=SPFILE is accepted and the value applies at the next startup. It is instance-wide: set it from CDB$ROOT, because a PDB gets ORA-65040.
When to change it
Before a migration, import or consolidation that would push the count in CDB_DATA_FILES close to the current limit.
What can go wrong
Creating one file too many fails with ORA-00059, and the fix, raising the parameter, needs a restart; OS open-file limits can bite below the setting too.
Questions about db_files
What is the default value of db_files in Oracle?
200. 200 (Oracle 23ai/26ai).
Does changing db_files require a restart?
Yes. Restart required: the parameter is static (ISSYS_MODIFIABLE = FALSE), so only SCOPE=SPFILE is accepted and the value applies at the next startup. It is instance-wide: set it from CDB$ROOT, because a PDB gets ORA-65040.
When should I change db_files?
Before a migration, import or consolidation that would push the count in CDB_DATA_FILES close to the current limit.
Back to all Oracle settings, or check the Oracle manual for every option.
Check db_files on your own server
SQLly runs the query above against Oracle and the other engines in this reference, from one desktop app on macOS, Windows and Linux.
このページのテキストとデータ: CC BY 4.0、出典は SQLly (sqlly.app) と明記してください。 コードと SQL スニペット: MIT. ライセンスの詳細