Extended data type for Oracle 12C new features (extended

Source: Internet
Author: User

Oracle 12C new Features-extended data type, in 12c, the size of data types such as VARCHAR2, NAVARCHAR2, and raw are extended from 4K and 2K bytes to 32K bytes, compared to earlier versions. As long as possible, the size of the extended character decreases the use of the LOB data type. In order to enable extended character size, you must set the initial database parameter of Max_string_size to extended.

Experimental process:
1. View parameter max_string_size default value
Sql> Show Parameter Max_string_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Max_string_size Stringstandard
Description: The 12C parameter max_string_size default value is standard, that is, does not change the size limit of VARCHAR2, NVARCHAR2, and raw data types, and 11g is consistent.
2. Close the database
sql> shutdown immediate;
3. Restart the database in upgrade mode
Sql> startup upgrade;
3. Change parameters: Altersystem SET max_string_size=extended;
Sql> alter system set max_string_size=extended Scope=spfile;
System altered.
4. Perform utl32k.sql as SYSDBA:
sql> @ $ORACLE _home/rdbms/admin/utl32k.sql
5. Check that there are no invalid objects
Sql> Select COUNT (*) from dba_objects where status<> ' VALID ';
COUNT (*)
----------
0
6. Close the database
sql> shutdown immediate;
7. Restart the database in read-write mode
Sql> startup;
8. Check the parameter max_string_size, with the failed object.
Sql> Show Parameter Max_string_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Max_string_size stringextended
Sql> Select COUNT (*) from dba_objects where status<> ' VALID ';
COUNT (*)
----------
0
9. Testing
Sql> CREATE TABLE t_32k (name VARCHAR2 (32000));
Table created.
sql> INSERT into t_32k values (' Andy ');
1 row created.
Sql> select * from t_32k;
NAME
--------------------------------------------------------------------------------
Andy

Compared to LOB data types, fields of the extended data type are stored as securefiles lobs in ASSM table space management, whereas in non-ASSM table space management They are stored as bascifiles lobs.

Note: Once changed, you can no longer change the settings back to standard.

Extended data type for Oracle 12C new features (extended

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.