# db_files

> Maximum number of data files the database can hold, counted database-wide rather than per instance.

Source: https://sqlly.app/sql-configuration/oracle/db-files
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).

**Default**

`200`

**Range**

1 to an OS-dependent maximum

**Restart needed**

Yes

**Default checked on**

Oracle AI Database 26ai / 23ai

## What it does

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.

## Default value

`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](https://sqlly.app/sql-configuration/oracle), or check the [Oracle manual](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/initialization-parameters.html) for every option.

## Related Oracle settings

- [`db_block_size` Size of a database block in bytes, fixed when the database is created.](https://sqlly.app/sql-configuration/oracle/db-block-size)
