To handle few special characters, we changed string_units
database configuration parameter from default SYSTEM
to CODEUNITS32
.
Based on IBM DB2 Knowledge Center, there are three methods to achieve this.
1.Set the NLS_STRING_UNITS
global variable
2.Update the string_units
database configuration parameter
- Alter the column by defining new character set (
CODEUNITS16
orCODEUNITS32
)
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
Best Answer
The alter column set data type with
CODEUNITS32
clause did the job. If thestring_units
database configuration parameter is set toCODEUNITS32
, 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.