How can we help you today? How can we help you today?

bug - varchar2 character count is triple its correct value

Thought I should share this with you in case you aren't aware of it yet:

I am comparing 2 Oracle10g databases. 1 in the U.S. with English settings / Windows 2003, and the other in Japan in Linux probably with some Japanese settings. When I compare, all of the tables from the Japan database with varchar2 datatypes have their char count tripled for some reason, I'm guessing related to unicode or something. When I view the table schema using Oracle SQL Developer, they are not tripled and look correct.
mafujosh
0

Comments

4 comments

  • Simon C
    Hmm, that is quite odd. Could you possibly send me (link at bottom of post) the results of running the following query (filling in the offending table & column names) on both databases, and whether these results match up with what is displayed and what you expect?
    SELECT column_name, data_type, data_length, character_set_name, char_used
    FROM all_tab_columns
    WHERE owner = '<owner>' AND table_name = '<table_name>' AND column_name = '<column_name>'
    

    Much appreciated :)
    Simon C
    0
  • mafujosh
    I retrieved the fields as in the following query:
    SELECT
      column_name
    , data_type
    , data_length
    , character_set_name
    , char_used
    , char_col_decl_length
    , char_length
    , nls_charset_decl_len(data_length, nls_charset_id(character_set_name)) decl_char_len
    FROM all_tab_columns
    WHERE ...
    

    The correct database returned the following results:
    ID VARCHAR2 50 CHAR_CS C 50 50 50

    The incorrect database returned the following results:
    ID VARCHAR2 150 CHAR_CS C 150 50 150

    In Oracle SQL Developer, and likely in the scripts used to create this table in both databases, both databases show this column as varchar2(50 char). The "50" seems to only match if the "char_length" value is used.

    Every varchar2 column in every table has this problem. The "char" fields seem to be ok.
    mafujosh
    0
  • mafujosh
    FYI, I'm using v1.0.0.667, and only scored 1120 on Oracleoids, but still trying...
    mafujosh
    0
  • mafujosh
    actually it is happening with my char fields also
    mafujosh
    0

Add comment

Please sign in to leave a comment.