0

To handle few special characters, we changed string_units db cfg parameter from default SYSTEM to CODEUNITS32.

Based on IBM KC documentation, there are three methods to achieve this. 1.Set NLS_STRING_UNITS global variable 2.Update the string_units database configuration parameter 3. Alter the column by defining new character set ( CODEUNITS16 or CODEUNITS32)

http://www.ibm.com/support/knowledgecenter/SS6NHC/com.ibm.swg.im.dashdb.sql.ref.doc/doc/r0008470.html

https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.config.doc/doc/r0060936.html

We have used the second option and restarted the instance. Still it's not working as expected. Have we missed any steps?

Is the reorg required on the table. What happens to the already existing data ?

db2level - 10.5 fp5
OS : Windows

0

ALTER TABLE . ALTER COLUMN SET DATA TYPE VARCHAR(20 CODEUNITS32);

The alter column set data type with CODEUNITS32 clause did the job. If string_units db cfg parameter is set to CODEUNITS32, any new table without specifying this clause in column definition still works.

We have to perform the above alter only to the columns of existing table which was defined when string_units was set to default SYSTEM.

Hope it helps to other users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.