Oracle DBMS_MAX_STRING_SIZE
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai will be available on generic Linux platforms in January and soon on AIX and Windows
Purpose Assumed to allow dynamically resetting the database maximum string size: To be validated.
AUTHID DEFINER
Data Types

These types are independent objects owned by SYS: They are not defined inside the package (see Dependencies, below).
/* Record type returned by CHECK_MAX_STRING_SIZE API */
CREATE OR REPLACE TYPE dbms_max_string_size_rec force as object(
type         VARCHAR2(128),
object_owner dbms_id,
object_name  dbms_id,
column_name  dbms_id,
reason       VARCHAR2(4000))
NOT PERSISTABLE;
/

/* Table type returned by CHECK_MAX_STRING_SIZE API */
CREATE OR REPLACE TYPE dbms_max_string_size_tbl FORCE
AS TABLE OF (dbms_max_string_size_rec)
NOT PERSISTABLE;
/
Dependencies
DBA_REGISTRY DBMS_MAX_STRING_SIZE_TBL PLITBLM
DBA_TAB_COLS DBMS_SCHEDULER PROPS$
DBA_VIEWS DBMS_SQL V$PARAMETER
DBMS_ASSERT DBMS_STANDARD V$PDBS
DBMS_MAX_STRING_SIZE_REC    
Documented No
Exceptions
Error Code Reason
ORA-2000 An object exists that will prevent the string size modification
First Available 20c
Security Model Owned by SYS with EXECUTE granted to the EXECUTE_CATALOG_ROLE role.
Source {ORACLE_HOME}/rdbms/admin/dbmsmss.sql
{ORACLE_HOME}/rdbms/admin/prvtmss.plb
Subprograms
 
CHECK_MAX_STRING_SIZE
Determines if the MAX_STRING_SIZE can be changed to the "new" value

Only supported value is "STANDARD" and
dbms_max_string_size.check_max_string_size(newValue IN VARCHAR2)
RETURN dbms_max_string_size_tbl;
SELECT object_owner AS obj_own, object_name
FROM TABLE (dbms_max_string_size.check_max_string_size('STANDARD');

OBJ_OWN OBJECT_NAME        COLUMN_NAME                    REASON
------ ------------------- ------------------------------ -------------------------------------------------
VECSYS  VECTOR$INDEX       SYS_IME_OSON_1D9C844870E84F37B Physical column exceeds STANDARD length FB3BE75CB1B97FC limit

VECSYS VECTOR$INDEX        SYS_IME_OSON_745AACB0ECA34F2EB Physical column exceeds STANDARD length FB0EA98DBCD16C6 limit

VECSYS VECTOR$INDEX        SYS_IME_OSON_F0E868E34F6A4F16B Physical column exceeds STANDARD length F670BA95373CAF9 limit

VECSYS VECTOR$INDEX$BUILD$ SYS_IME_OSON_9AA39E2EC9EC4FE1B Physical column exceeds STANDARD length FCC2AE8266D39FD limit
 
MODIFY_MAX_STRING_SIZE
Updates MAX_STRING_SIZE to the "new" value

23ai bug file in 20c and refiled in
BugDB on Feb 1, 2023.
dbms_max_string_size.modify_max_string_size(newValue IN VARCHAR2);
exec dbms_max_string_size.modify_max_string_size('STANDARD');
     *
ORA-01422: exact fetch returns more than requested number of rows
 
MODIFY_MAX_STRING_SIZE_POST
Post-processing set for modify_max_string_size dbms_max_string_size.modify_max_string_size_post(newValue IN VARCHAR2);
exec dbms_max_string_size.modify_max_string_size_post('STANDARD');

PL/SQL procedure successfully completed.

Related Topics
Built-in Functions
Built-in Packages
Database Security
Data Types and Subtypes
What's New In 21c
What's New In 26ai

Morgan's Library Page Footer
This site is maintained by Daniel Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2026 Daniel A. Morgan All Rights Reserved