Oracle DBMS_MAX_STRING_SIZE
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Assumed to allow dynamically resetting the database maximum string size: To be validated.
AUTHID DEFINER
Data Types /* 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 no privileges granted.
Source {ORACLE_HOME}/rdbms/admin/dbmsmss.sql
Subprograms
 
CHECK_MAX_STRING_SIZE (new 20c)
Determines if the MAX_STRING_SIZE can be changed to the "new" value

Only supported value is "STANDARD"
dbms_max_string_size.check_max_string_size(newValue IN VARCHAR2)
RETURN dbms_max_string_size_tbl;
DECLARE
 outVal sys.dbms_max_string_size_tbl;
BEGIN
  outVal := dbms_max_string_size.check_max_string_size('STANDARD');
END;
/
PL/SQL procedure successfully completed.
 
MODIFY_MAX_STRING_SIZE (new 20c)
Updates MAX_STRING_SIZE to the "new" value dbms_max_string_size.modify_max_string_size(newValue IN VARCHAR2);
exec dbms_max_string_size.modify_max_string_size('STANDARD');
BEGIN dbms_max_string_size.modify_max_string_size('STANDARD'); END;
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "SYS.DBMS_MAX_STRING_SIZE", line 9
ORA-06512: at "SYS.DBMS_MAX_STRING_SIZE", line 284
ORA-06512: at line 1
 
MODIFY_MAX_STRING_SIZE_POST (new 20c)
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 19c
What's New In 20c-21c

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