# max_string_size

> Cap on VARCHAR2, NVARCHAR2 and RAW column sizes: 4000 bytes STANDARD or 32767 bytes EXTENDED.

Source: https://sqlly.app/sql-configuration/oracle/max-string-size
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**

`STANDARD`

**Range**

STANDARD, EXTENDED

**Restart needed**

Yes

**Default checked on**

Oracle AI Database 26ai / 23ai

## What it does

EXTENDED requires compatible 12.0.0 or higher and a one-way procedure: restart with the new value, run utl32k.sql, restart again. Inside a PDB it can be raised for that PDB alone. Index key limits still follow the block size, so indexing an extended column beyond the key limit fails with ORA-01450.

## Default value

`STANDARD`. STANDARD (Oracle 23ai/26ai).

## Check the current value

```
SHOW PARAMETER max_string_size

SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable
FROM v$parameter
WHERE name = 'max_string_size';

-- What the SPFILE holds, which is what applies at the next startup:
SELECT value FROM v$sppparameter WHERE name = 'max_string_size';
```

## Change it

```
ALTER SYSTEM SET max_string_size = EXTENDED 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 can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

## When to change it

When applications must store more than 4000 bytes per column and a CLOB does not fit the data model or the tooling.

## What can go wrong

Going back to STANDARD means shrinking every extended column first, and clients or drivers that assume 4000 bytes can truncate or reject longer values.

## Questions about max_string_size

### What is the default value of max_string_size in Oracle?

STANDARD. STANDARD (Oracle 23ai/26ai).

### Does changing max_string_size 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 can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

### When should I change max_string_size?

When applications must store more than 4000 bytes per column and a CLOB does not fit the data model or the tooling.

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)
