Db2

Db2

Where DBAs and data experts come together to stop operating and start innovating. Connect, share, and shape the AI era with us.


#Data


#Data
#Databases
#Operatingsystems
#Db2
#Databasesolutions
 View Only
  • 1.  Set territory and collation on docker db2

    Posted 11/03/22 09:37 AM

    I am running ibmcom/db2 image from dockerhub and am unable to determine how to set territory and collation for newly created database in container. 


    any advice?



    ------------------------------
    Tvrtko Mrkonjić
    ------------------------------

    #Db2


  • 2.  RE: Set territory and collation on docker db2

    Posted 11/07/22 03:31 AM
    Hi,
    if you login to your docker container with the instance owner
    docker exec -ti mydb2 bash -c "su - db2inst1"
    you can create any database with the parameters you prefer

    --CREATE DATABASE MYDB ... USING CODESET 1252 TERRITORY XX

    ------------------------------
    Jürgen Jost
    DB2 DBA (LUW / zOS)
    ------------------------------



  • 3.  RE: Set territory and collation on docker db2

    Posted 11/08/22 03:16 AM
    thanks,

    so there is no way that initial database created by docker run... -e DBNAME=testdb ... can get custom territory/codeset?

    ------------------------------
    Tvrtko Mrkonjić
    ------------------------------



  • 4.  RE: Set territory and collation on docker db2

    Posted 11/08/22 06:18 AM
    I think there is no way implemented by the docker people for custom territory/codeset.

    Maybe the sample Database - provided by IBM -- is better for your needs??
    https://www.ibm.com/docs/en/db2/11.5?topic=commands-db2sampl-create-sample-database
    on my docker / macOS the sample DB has the following:

    db2 get db cfg for sample | grep -i terr

     Database territory                                     = US

     db2 get db cfg for sample | grep -i code

     Database code page                                      = 1208

     Database code set                                       = UTF-8

     Database country/region code                            = 1

    Best 
    regards



    ------------------------------
    Jürgen Jost
    DB2 DBA (LUW / zOS)
    ------------------------------