Activate MAX_STRING_SIZE in Oracle 12c RAC

From version 12c it is possible to increase the maximum size of the VARCHAR2, NVARCHAR2 and RAW fields from 4000 bytes to 32767 bytes.

To enable this feature it is necessary to perform the following steps (attention is necessary to restart the database, a substantial backup is recommended before activating the functionality)

The COMPATIBLE parameter must be at least 12.0.0.0

CHECK
=============
SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      12.1.0.2.0
noncdb_compatible                    boolean     FALSE

UPDATE
=============
sqlplus / as sysdba
alter system set cluster_database=FALSE scope=spfile sid='*';
srvctl stop database -d ORCL
sqlplus / as sysdba
STARTUP UPGRADE;
ALTER SYSTEM SET max_string_size=extended scope=BOTH SID='*';
PURGE DBA_RECYCLEBIN;
@?/rdbms/admin/utl32k.sql
alter system set cluster_database=TRUE scope=spfile sid='*';
SHUTDOWN IMMEDIATE;
exit;
srvctl start database -d ORCL
sqlplus / as sysdba
@?/rdbms/admin/utlrp.sql

 

2 thoughts on “Activate MAX_STRING_SIZE in Oracle 12c RAC”

Leave a Comment