{"id":1527,"date":"2015-05-25T20:00:53","date_gmt":"2015-05-26T01:00:53","guid":{"rendered":"https:\/\/bijoos.com\/oraclenotes\/?p=1527"},"modified":"2026-02-07T15:34:43","modified_gmt":"2026-02-07T21:34:43","slug":"oracle-db12c-new-max_string_size","status":"publish","type":"post","link":"https:\/\/bijoos.com\/oraclenotes\/2015\/1527\/","title":{"rendered":"Oracle #DB12c New &#8211; MAX_STRING_SIZE"},"content":{"rendered":"<p>In pre-12c database releases, VARCHAR2, NVARCHAR2 data types were limited to 4000 bytes and RAW data type was limited to 2000 bytes. If there is a need to store more data in VARCHAR2 column, you can in 12c after setting the parameter MAX_STRING_SIZE to EXTENDED. With setting MAX_STRING_SIZE to EXTENDED, you can store up to 32KB (32767 bytes) in VARCHAR2, NVARCHAR2 and RAW columns. Though it is an initialization parameter, there are few restrictions and requirements around the parameter setting.<\/p>\n<p>The default for MAX_STRING_SIZE is STANDARD in Oracle Database 12c, where the maximum size for VARCHAR2, NVARCHAR2 and RAW are same as previous Oracle releases. To change value of this parameter to extended, you have to follow certain steps, and once you set to EXTENDED, there is no going back to STANDARD. To increase the maximum size, do:<\/p>\n<ul>\n<li>Shutdown the database<\/li>\n<li>Start database in UPGRADE mode<\/li>\n<li>Use ALTER SYSTEM to change MAX_STRING_SIZE to EXTENDED<\/li>\n<li>Run script $ORACLE_HOME\/rdbms\/admin\/utl32k.sql connected as SYSDBA<\/li>\n<li>Shutdown database<\/li>\n<li>Start database in NORMAL mode<\/li>\n<li>Recompile invalid objects using $ORACLE_HOME\/rdbms\/admin\/utlrp.sql connected as SYSDBA<\/li>\n<\/ul>\n<p>There are several overheads associated with enabling increased maximum size for columns, including how such columns are stored. So, make this change only if absolutely necessary, after careful testing. The feature is introduced to help migrating data from non-Oracle databases to Oracle, where the non-Oracle databases have varchar maximum size well over 4K.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In pre-12c database releases, VARCHAR2, NVARCHAR2 data types were limited to 4000 bytes and RAW data type was limited to 2000 bytes. If there is a need to store more data in VARCHAR2 column, you can in 12c after setting the parameter MAX_STRING_SIZE to EXTENDED. With setting MAX_STRING_SIZE to EXTENDED, you can store up to &#8230; <a title=\"Oracle #DB12c New &#8211; MAX_STRING_SIZE\" class=\"read-more\" href=\"https:\/\/bijoos.com\/oraclenotes\/2015\/1527\/\" aria-label=\"Read more about Oracle #DB12c New &#8211; MAX_STRING_SIZE\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[133],"tags":[],"class_list":["post-1527","post","type-post","status-publish","format-standard","hentry","category-oracledb"],"acf":[],"jetpack-related-posts":[{"id":79,"url":"https:\/\/bijoos.com\/oraclenotes\/2013\/79\/","url_meta":{"origin":1527,"position":0},"title":"OracleDB12c New Feature: Store More in VARCHAR2","author":"Biju","date":"June 28, 2013","format":false,"excerpt":"Starting Oracle Database version 12.1, you can have your VARCHAR2 [and NVARCHAR2, RAW] column width up to 32767 bytes or characters. To be able to use VARCHAR2 columns with more that 4000 bytes or characters [pre-12c maximum], you will need to set the initialization parameter\u00a0MAX_STRING_SIZE = EXTENDED. By default the\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2174,"url":"https:\/\/bijoos.com\/oraclenotes\/2018\/2174\/","url_meta":{"origin":1527,"position":1},"title":"Oracle Tidbits &#8211; April 2018 #oratidbit","author":"biju.thomas","date":"April 30, 2018","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d (#oratidbit) published on Facebook, Twitter, and Google+\u00a0during weekdays\u00a0in April 2018. Hope you find these helpful to learn something new or to remind you of its existence and use. #oratidbit #db18c #Dataguard Broker 18c VALIDATE DATABASE SPFILE performs a comparison of server parameter file (SPFILE) entries between the\u2026","rel":"","context":"In &quot;TidBits &amp; Quick Tips&quot;","block_context":{"text":"TidBits &amp; Quick Tips","link":"https:\/\/bijoos.com\/oraclenotes\/category\/tidbits\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bijoos.com\/oraclenotes\/wp-content\/uploads\/2018\/04\/oratidbit.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":123,"url":"https:\/\/bijoos.com\/oraclenotes\/2013\/123\/","url_meta":{"origin":1527,"position":2},"title":"OracleDB12c New Feature: RMAN Describe","author":"Biju","date":"June 30, 2013","format":false,"excerpt":"Similar to SQL*Plus DESCRIBE command, RMAN now supports DESCRIBE. RMAN> desc hr.jobs using target database control file instead of recovery catalog Name Null? Type ----------------------------------------- -------- ---------------------------- JOB_ID NOT NULL VARCHAR2(10) JOB_TITLE NOT NULL VARCHAR2(35) MIN_SALARY NUMBER(6) MAX_SALARY NUMBER(6) RMAN> If you are connected using the SYSDBA privilege, you can\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":393,"url":"https:\/\/bijoos.com\/oraclenotes\/2014\/393\/","url_meta":{"origin":1527,"position":3},"title":"OracleNotes TidBits &#8211; May 2014","author":"Biju","date":"May 31, 2014","format":false,"excerpt":"According to the dictionary, meaning of \"tidbit\" is \"a small and particularly interesting item of gossip or information\"... hope you find the \"Oracle TidBits\" published at https:\/\/www.facebook.com\/oraclenotes\u00a0interesting... Here is a compilation of the tidbits published in May 2014. You will also see these tidbits, one tidbit at a time, for\u2026","rel":"","context":"In &quot;TidBits &amp; Quick Tips&quot;","block_context":{"text":"TidBits &amp; Quick Tips","link":"https:\/\/bijoos.com\/oraclenotes\/category\/tidbits\/"},"img":{"alt_text":"Oracle TidBit","src":"https:\/\/i0.wp.com\/bijoos.com\/oraclenotes\/wp-content\/uploads\/2014\/05\/TidBit-300x123.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1720,"url":"https:\/\/bijoos.com\/oraclenotes\/2016\/1720\/","url_meta":{"origin":1527,"position":4},"title":"Oracle Tidbits &#8211; May 2016","author":"Biju","date":"June 1, 2016","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d (#oratidbit) published at\u00a0https:\/\/www.facebook.com\/oraclenotes\u00a0on weekdays\u00a0in May\u00a02016. You will also see these tidbits, one tidbit at a time, for each page refresh on the right side of this blog as well\u2026 Hope you find these helpful to learn something new or to remind you of its existence and use\u2026\u2026","rel":"","context":"In &quot;TidBits &amp; Quick Tips&quot;","block_context":{"text":"TidBits &amp; Quick Tips","link":"https:\/\/bijoos.com\/oraclenotes\/category\/tidbits\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2080,"url":"https:\/\/bijoos.com\/oraclenotes\/2017\/2080\/","url_meta":{"origin":1527,"position":5},"title":"Oracle Tidbits &#8211; July 2017 #oratidbit","author":"Biju","date":"August 8, 2017","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d (#oratidbit) published on Facebook, Twitter, and Google+\u00a0during weekdays\u00a0in July 2017. You will also see these tidbits, one tidbit at a time, for each page refresh on the right side of this blog as well\u2026 Hope you find these helpful to learn something new or to remind you\u2026","rel":"","context":"In &quot;TidBits &amp; Quick Tips&quot;","block_context":{"text":"TidBits &amp; Quick Tips","link":"https:\/\/bijoos.com\/oraclenotes\/category\/tidbits\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bijoos.com\/oraclenotes\/wp-content\/uploads\/2017\/02\/oratidbit.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/1527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/comments?post=1527"}],"version-history":[{"count":1,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/1527\/revisions"}],"predecessor-version":[{"id":3018,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/1527\/revisions\/3018"}],"wp:attachment":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/media?parent=1527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/categories?post=1527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/tags?post=1527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}