bug - varchar2 character count is triple its correct value

Early Access Program for Schema Compare for Oracle

Moderators: David Atkinson, eddie davis, richardjm, alice.easey, Tom Harris

bug - varchar2 character count is triple its correct value

Postby mafujosh » Thu Mar 11, 2010 4:49 pm

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
 
Posts: 7
Joined: Thu Mar 11, 2010 4:42 pm

Postby Simon C » Thu Mar 11, 2010 6:01 pm

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?

Code: Select all
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
 
Posts: 140
Joined: Tue Feb 26, 2008 4:56 pm
Location: Red Gate Software

bug - varchar2 character count is triple its correct value

Postby mafujosh » Thu Mar 11, 2010 6:45 pm

I retrieved the fields as in the following query:

Code: Select all
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
 
Posts: 7
Joined: Thu Mar 11, 2010 4:42 pm

bug - varchar2 character count is triple its correct value

Postby mafujosh » Thu Mar 11, 2010 6:54 pm

FYI, I'm using v1.0.0.667, and only scored 1120 on Oracleoids, but still trying...
mafujosh
 
Posts: 7
Joined: Thu Mar 11, 2010 4:42 pm

bug - varchar2 character count is triple its correct value

Postby mafujosh » Thu Mar 11, 2010 11:38 pm

actually it is happening with my char fields also
mafujosh
 
Posts: 7
Joined: Thu Mar 11, 2010 4:42 pm


Return to Schema Compare for Oracle Beta

Who is online

Users browsing this forum: No registered users and 0 guests