Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MAX_STRING_SIZE - What Am I Missing?

DrystNov 23 2019 — edited Nov 23 2019

I am running Oracle 19.3 under Windows 10 for dev purposes.  This is my play database.

I followed all steps documented here: https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/MAX_STRING_SIZE.html

Everything executed successfully with no errors at all.  I still have log output showing this.  When I execute the following from my PDB, I see results below:

select name, type, value

from v$parameter

where name = 'max_string_size';

NAMETYPEVALUE
max_string_size2EXTENDED

Okay -- cool.

When I execute the following DDL, I get this output:

CREATE TABLE TEST(

    ID                  NUMBER GENERATED ALWAYS AS IDENTITY,

    TEXT_DATA           NVARCHAR2(16384) NULL,

    CREATE_TIMESTAMP    DATETIME DEFAULT CURRENT_TIMESTAMP AT TIME ZONE 'EST' NOT NULL,

    CHANGE_TIMESTAMP    DATETIME DEFAULT CURRENT_TIMESTAMP AT TIME ZONE 'EST' NOT NULL

);

Error starting at line : 1 in command -

CREATE TABLE TEST(

    ID                  NUMBER GENERATED ALWAYS AS IDENTITY,

    TEXT_DATA           NVARCHAR2(16384) NULL,

    CREATE_TIMESTAMP    DATETIME DEFAULT CURRENT_TIMESTAMP AT TIME ZONE 'EST' NOT NULL,

    CHANGE_TIMESTAMP    DATETIME DEFAULT CURRENT_TIMESTAMP AT TIME ZONE 'EST' NOT NULL

)

Error report -

ORA-00910: specified length too long for its datatype

00910. 00000 -  "specified length too long for its datatype"

*Cause:    for datatypes CHAR and RAW, the length specified was > 2000;

           otherwise, the length specified was > 4000.

*Action:   use a shorter length or switch to a datatype permitting a

           longer length such as a VARCHAR2, LONG CHAR, or LONG RAW

Is there another step not listed in the link I must also perform?

Thanks.

This post has been answered by Jonathan Lewis on Nov 23 2019
Jump to Answer
Comments
Post Details
Added on Nov 23 2019
9 comments
3,769 views