Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    1,636
    Provided Answers: 1

    Answered: How to indentifiy if database is using UTF-8 code page or not with select statement?

    Hi,
    I know I can use db cfg parameter:
    Code:
     db2 get db cfg for baza | grep "Database code"
     Database code page                                      = 1208
     Database code set                                       = UTF-8
    to get the info if database is using UTF-8 code page.

    What I need is to get this info using select statement.

    I have some workaround like testing what is the code page of system table sysibm.systables:
    Code:
    db2 "select codepage, case codepage when '1208' then 'UTF-8' else 'non UTF-8' end as utf8_yes_no from syscat.tables where TABSCHEMA = 'SYSIBM' AND tabname = 'TABLES'"
    CODEPAGE UTF8_YES_NO
    -------- -----------
        1208 UTF-8
    Is there any other maybe more official way to get this info?
    Regards

  2. Best Answer
    Posted by mark.bb

    "Hi,

    Try this:
    Code:
    select name, value from sysibmadm.dbcfg where name like 'code%'
    "


  3. #2
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    294
    Provided Answers: 45
    Hi,

    Try this:
    Code:
    select name, value from sysibmadm.dbcfg where name like 'code%'
    Regards,
    Mark.

  4. #3
    Join Date
    Jan 2003
    Posts
    1,636
    Provided Answers: 1
    Thanks, exactly what I need.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •