ORACLE 12C : Extended Data Type

With the previous Oracle database release, long characters strings of more then 4000
bytes had to be handled using CLOB or LONG data types.
Starting from Oracle 12c was introduced a new system parameter:
MAX_STRING_SIZE. This parameter allows string data types to be much larger when
the parameter is changed from its default value STANDARD to EXTENDED.
New higher limits (in bytes) are available for following types:

  • VARCHAR2 – 32767 bytes
  • NVARCHAR – 32767 bytes
  • RAW – 32767 bytes

To use extended version you need to set new initialization parameter
MAX_STRING_SIZE and run sql script utl32k.sql.
Set the init.ora parameter COMPATIBLE to 12.0.0.0 and higher.
Important: you cannot change the value of MAX_STRING_SIZE from EXTENDED to
STANDARD.
For a Non CDB database the entire database has to be upgraded to support the
extended data types with the following procedure:
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP UPGRADE
SQL> ALTER SYSTEM SET max_string_size=extended;
SQL> @?/rdbms/admin/utl32k
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
For a PDB database:
SQL> ALTER SESSION SET CONTAINER = pdbnormal;
SQL> ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE;
SQL> ALTER PLUGGABLE DATABASE OPEN UPGRADE;
SQL> ALTER SYSTEM SET max_string_size=extended;
SQL> @?/rdbms/admin/utl32k
SQL> ALTER PLUGGABLE DATABASE CLOSE;
SQL> ALTER PLUGGABLE DATABASE OPEN;

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *