Personal tools
You are here: Home DB2 DB2 UDB v9 Collation insensitive stores 2 bytes to accent letters
Navigation
Log in


Forgot your password?
 
Document Actions

Collation insensitive stores 2 bytes to accent letters

COLLATE UCA500R1_LEN_S1 - Ignore Accents, Upper and Lower cases COLLATE UCA500R1_LEN_S2 - Ignore Upper and Lower cases

On DB2 9.5 fp 1 you can use insensitive collations, there are 2 main insensitive collations to DB2 as show above:


Therefore when you use these collations you are using the UNICODE Pattern, and it make your datatabase stores 2
bytes to ASCII CODE major than 127, hence all acute letters stores 2 bytes.

In my suggestion  you will have to increase your varchar, clob and chars to store your texts, and you can choose the best rate.

The select below generates all statements to you increase the fields VARCHAR and CLOB, you can modify the select to adjust to your case.

db2 -x "select 'alter table ' || rtrim(tabschema)||'.'||rtrim(tabname) || ' alter column ' ||rtrim(colname) \
||' set data type ' || rtrim(typename) || '(' || trim(both '0' from char(int(length * 2))) || ');' \
from syscat.columns c  where typename in('VARCHAR','CLOB') and tabname in (select tabname from syscat.tables t \
where type='T' and tabschema='MCI' and c.tabname=t.tabname and c.tabschema=t.tabschema)"

Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls