| Author |
Message |
mafujosh
Joined: 11 Mar 2010 Posts: 7
|
Posted: Thu Mar 11, 2010 4:49 pm Post subject: 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. |
|
| Back to top |
|
 |
Simon C
Joined: 26 Feb 2008 Posts: 140 Location: Red Gate Software
|
Posted: Thu Mar 11, 2010 6:01 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
mafujosh
Joined: 11 Mar 2010 Posts: 7
|
Posted: Thu Mar 11, 2010 6:45 pm Post subject: bug - varchar2 character count is triple its correct value |
|
|
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 |
|
 |
mafujosh
Joined: 11 Mar 2010 Posts: 7
|
Posted: Thu Mar 11, 2010 6:54 pm Post subject: bug - varchar2 character count is triple its correct value |
|
|
| FYI, I'm using v1.0.0.667, and only scored 1120 on Oracleoids, but still trying... |
|
| Back to top |
|
 |
mafujosh
Joined: 11 Mar 2010 Posts: 7
|
Posted: Thu Mar 11, 2010 11:38 pm Post subject: bug - varchar2 character count is triple its correct value |
|
|
| actually it is happening with my char fields also |
|
| Back to top |
|
 |
|