Red Gate forums :: View topic - bug - varchar2 character count is triple its correct value
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Schema Compare for Oracle Beta
Schema Compare for Oracle Beta forum

bug - varchar2 character count is triple its correct value

Search in Schema Compare for Oracle Beta forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
mafujosh



Joined: 11 Mar 2010
Posts: 7

PostPosted: Thu Mar 11, 2010 4:49 pm    Post subject: bug - varchar2 character count is triple its correct value Reply with quote

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.
Back to top
View user's profile Send private message
Simon C



Joined: 26 Feb 2008
Posts: 140
Location: Red Gate Software

PostPosted: Thu Mar 11, 2010 6:01 pm    Post subject: Reply with quote

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 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 Smile
Back to top
View user's profile Send private message Send e-mail
mafujosh



Joined: 11 Mar 2010
Posts: 7

PostPosted: Thu Mar 11, 2010 6:45 pm    Post subject: bug - varchar2 character count is triple its correct value Reply with quote

I retrieved the fields as in the following query:

Code:

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.
Back to top
View user's profile Send private message
mafujosh



Joined: 11 Mar 2010
Posts: 7

PostPosted: Thu Mar 11, 2010 6:54 pm    Post subject: bug - varchar2 character count is triple its correct value Reply with quote

FYI, I'm using v1.0.0.667, and only scored 1120 on Oracleoids, but still trying...
Back to top
View user's profile Send private message
mafujosh



Joined: 11 Mar 2010
Posts: 7

PostPosted: Thu Mar 11, 2010 11:38 pm    Post subject: bug - varchar2 character count is triple its correct value Reply with quote

actually it is happening with my char fields also
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group