Search code examples
dashdb

DB2 on Cloud. Change the configuration STRING_UNITS to CODEUNITS32


I need some help with my DB2 instance on Cloud. I need execute a command for change system property, for example I need change the configuration STRING_UNITS to CODEUNITS32, but I cant do it using IBM DATA SERVER DRIVER( IBM console). I will to thank some help. Thank you very much.


Solution

  • string_units is configurable on-line

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

    so if you have SYSADM, SYSCTRL or SYSMAINT authority on the instance you could run

    call admin_cmd('UPDATE DB CFG USING STRING_UNITS CODEUNITS32 IMMEDIATE')
    

    https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ibm.db2.luw.sql.rtn.doc/doc/r0023593.html

    The change will only take effect on new connections, existing connections would need to re-connect to pick up the new default.

    If you don't have one of those authorities, then you can change the NLS_STRING_UNITS global variable at a session level https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0060917.html