Forums | Aggregator | Books | Industry News | Firefox Plugins | Social | Links

Comments

Character Semantics And Globalization in Oracle - Prevent storage problems associated with mutlibyte character sets by using character semantics when defining table columns.



Sven said...

when we did
alter system set nls_length_semantics=char;
we had to restart the engine, the next session had nls_length_semantics=byte again and the %char% ddl were 1 byte per character.
So we decided to do:
1. explicitly assign char to %char% ddl columns
2. or alter session set nls_length_semantics = 'CHAR'
------------
Greetings

george said...

thanks for the explanation.

Samir Waghu said...

Our DB NLS Params are as below

NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET UTF8
NLS_RDBMS_VERSION 9.2.0.4.0


Created a table as below
CREATE TABLE SAMIR_UTF8_TEST(
ID_TEST VARCHAR2(100 CHAR),
TEST_DESC VARCHAR2(4000 CHAR)

);
But when we try to add a MS-Word text (3916 chars) with MS-Word smart quotes it fails insetion/updation.

Anything I am doing wrong???

Vadim said...

I've tried:

CREATE TABLE tab3 (
id NUMBER(10),
description VARCHAR2(20 CHAR)
);

NLS_LENGTH_SEMANTICS = BYTE

Table is created, but column is created with VARCHAR2(80), not with VARCHAR2(20 CHAR).
What's wrong?


Vadim said...

Sorry, the table was created by SYS user.
When I logged in by another user, all is OK.
Prepared Statement Error: Table './oraclebasecms/cms_page_comment_uuids' is marked as crashed and should be repaired