I've recently installed a 12.2.0.1 DB enabling the EXTENDED datatype feature. Now I get an ORA-01450 error when trying to create a PK on a simple VARCHAR2(2000 CHAR) column. It's probably a bug as the same thing works on a 12.1.0.2 and 12.2.0.1 versions without the EXTENDED option.
select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
CORE 12.2.0.1.0 Production
TNS for Linux: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production
show parameter max_string_size;
NAME TYPE VALUE
--------------- ------ --------
max_string_size string EXTENDED
show parameter db_block_size;
NAME TYPE VALUE
------------- ------- -----
db_block_size integer 8192
select value from nls_database_parameters where parameter = 'NLS_CHARACTERSET';
VALUE
----------------------------------------------------------------
AL32UTF8
create table t(col1 varchar2(2000 char));
Table T created.
alter table t add constraint t_pk primary key (col1);
Error starting at line : 8 in command -
alter table t add constraint t_pk primary key (col1)
Error report -
SQL Error: ORA-01450: maximum key length (6398) exceeded
01450. 00000 - "maximum key length (%s) exceeded"
*Cause:
*Action:
The same thing works fine in 11.2.x, and in 12.1 and 12.2 without EXTENDED enabled.
I've looked for notes on MOS for this problem but no luck.