Skip to Main Content

Oracle Database Discussions

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!

Is there a way to Oracle expdp not inherit char type nls semantics on DDL?

Luis Claudio SantosSep 6 2017 — edited Sep 6 2017

expdp, by default, generated internal DDL to create table observing current NLS_LENGTH_SEMANTICS of each column.

If a column as BYTE (the default and most used) NLS_LENGTH_SEMANTICS, the internal DDL would be like:

CREATE TABLE BDATA.Artikel(

    Key                   VARCHAR2(3 BYTE)  NOT NULL,

    Name                  VARCHAR2(60 BYTE) NOT NULL,

    Abkuerzung            VARCHAR2(5 BYTE)  NOT NULL

);

But I want an option to force expdp to not get/inherit the CHAR_USED value from DBA_TAB_COLUMNS, resulting into the following DDL:

CREATE TABLE BDATA.Artikel(

    Key                   VARCHAR2(3)   NOT NULL,

    Name                  VARCHAR2(60)  NOT NULL,

    Abkuerzung            VARCHAR2(5)   NOT NULL

);

The reason is because the target database has a AL32UTF8 charset and NLS_LENGTH_SEMANTICS set as CHAR. So I want the tables be converted from BYTE to CHAR (accordingly to NLS_LENGTH_SEMANTICS parameter value).

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2017
Added on Sep 6 2017
3 comments
1,289 views