MAX_STRING_SIZE parameter in oracle 12c new feature DBACLASS
MAX_STRING_SIZE is a new feature in oracle 12c. With this we can increase limit for maximum size of the string from 4000 to 32765.
oracle clusteringintermediate
by OracleDba
13 views
MAX_STRING_SIZE is a new feature in oracle 12c. With this we can increase limit for maximum size of the string from 4000 to 32765.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>STARTUP UPGRADE
ORACLE instance started.
Total System Global Area 1.4663E+10 bytes
Fixed Size 15697000 bytes
Variable Size 1.1878E+10 bytes
Database Buffers 2717908992 bytes
Redo Buffers 51404800 bytes
Database mounted.
Database opened.
SQL> alter system set MAX_STRING_SIZE='EXTENDED' SCOPE=BOTH;
System altered.
SQL> show parameter MAX_STRING_SIZE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_string_size string EXTENDED
SQL> @?/rdbms/admin/utl32k.sql
Session altered.
DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the database has not been opened for UPGRADE.
DOC>
DOC> Perform a "SHUTDOWN ABORT" and
DOC> restart using UPGRADE.
DOC>#######################################################################
DOC>#######################################################################
DOC>#
no rows selected
DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the database does not have compatible >= 12.0.0
DOC>
DOC> Set compatible >= 12.0.0 and retry.
DOC>#######################################################################
DOC>#######################################################################
DOC>#
PL/SQL procedure successfully completed.
Session altered.
1524 rows updated.
Commit complete.
System altered.
PL/SQL procedure successfully completed.
Commit complete.
System altered.
Session altered.
Session altered.
Table created.
Table created.
Table created.
Table truncated.
0 rows created.
PL/SQL procedure successfully completed.
no rows selected
DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if we encountered an error while modifying a column to
DOC> account for data type length change as a result of enabling or
DOC> disabling 32k types.
DOC>
DOC> Contact Oracle support for assistance.
DOC>#######################################################################
DOC>#######################################################################
DOC>#
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Commit complete.
shutdown immediate;
startup
SQL> show parameter max_string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
max_string_size string EXTENDED
SQL> create table UNIVERSITY ( COLLEGE_NAME VARCHAR2(8000));
Table created.12345678910111213141516171819202122
Database dismounted.
ORACLE instance shut down.
SQL> ORACLE instance started.
Total System Global Area 1.4663E+10 bytes
Fixed Size 15697000 bytes
Variable Size 1.1878E+10 bytes
Database Buffers 2717908992 bytes
Redo Buffers 51404800 bytes
Database mounted.
ORA-00603: ORACLE server session terminated by fatal error
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-14695: MAX_STRING_SIZE migration is incomplete
Process ID: 18669
Session ID: 401 Serial number: 16419
SQL> alter system set MAX_STRING_SIZE=EXTENDED;
alter system set MAX_STRING_SIZE=EXTENDED
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-14694: database must in UPGRADE mode to begin MAX_STRING_SIZE migrationPlease to add comments
No comments yet. Be the first to comment!