Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug in Batch DataSource Generator for certain Oracle columns?

    Hi Isomorphic,

    I have Oracle 11 R2 Express and use column of the format "TITLE VARCHAR2 (50 CHAR)". The character set of the instance is "AL32UTF8", which is the default and strongly suggested by Oracle for i16n support.

    When I import a table with a column defined like this (watch for "CHAR", normally it defaults to "BYTE"), the field definition I get is "<field name="TITLE" length="200" type="text"></field>", so 4 times too large.
    I suppose this is linked to using a different column of Oracle View USER_TAB_COLS (DATA_LENGTH instead of CHAR_LENGTH?).

    Also, do you plan to include further import options to the Batch DS Generator like FK detection, perhaps with generated fetch-operation-binding using the correct join (inner/outer) and foreignKey attribute for the corresponding fields?

    Thank you,
    Blama

    #2
    Hi,

    I've tested it with Oracle XE 10.2.0.1.0 (10g) - (ubuntu 8.04).
    Data source fields were generated with length 10 for both fields "NCHAR" and
    "TCHAR" (script below):
    Code:
    CREATE TABLE  "ORACLE_TEST" 
       (    "PK" NUMBER(10,0), 
            "NCHAR" VARCHAR2(10), 
            "TCHAR" VARCHAR2(10 CHAR), 
             CONSTRAINT "ORACLE_TEST_PK" PRIMARY KEY ("PK") ENABLE
       )
    /
    
    
    CREATE OR REPLACE TRIGGER  "BI_ORACLE_TEST" 
      before insert on "ORACLE_TEST"               
      for each row  
    begin   
        select "ORACLE_TEST_SEQ".nextval into :NEW.PK from dual; 
    end; 
    
    /
    ALTER TRIGGER  "BI_ORACLE_TEST" ENABLE
    /
    Here are DB settings:
    Code:
    NLS_CALENDAR    GREGORIAN
    NLS_CHARACTERSET        AL32UTF8
    NLS_COMP        BINARY
    NLS_CURRENCY    $
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE       AMERICAN
    NLS_DUAL_CURRENCY       $
    NLS_ISO_CURRENCY        AMERICA
    NLS_LANGUAGE    AMERICAN
    NLS_LENGTH_SEMANTICS    BYTE
    NLS_NCHAR_CHARACTERSET  AL16UTF16
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NUMERIC_CHARACTERS  .,
    NLS_SORT        BINARY
    NLS_TERRITORY   AMERICA
    NLS_TIMESTAMP_FORMAT    DD-MON-RR HH.MI.SSXFF AM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT      HH.MI.SSXFF AM TZR
    What settings should I change to reproduce the issue?

    Regards,
    Alius

    Comment

    Working...
    X