Skip to main content
Support

KB Article #155561

DB2 schema change, How To

PROBLEM

--DB2 Database

--Schema change

                             

RESOLUTION

*DB2 creates scheme by default with same name as user

*DB2 uses the host Operating System user management capabilities

 

To change this:

 

  1. Create new Operating System user with desired credentials (for example, CYCLONE/Secret1)
  2. In DB2, create a database with *16K page size* and the name of your choosing (my example: GI510) Sample SQL:
    CREATE DATABASE GI510 AUTOMATIC STORAGE YES ON 'E:\' DBPATH ON 'E:\' USING CODESET IBM-1252 TERRITORY US COLLATE USING SYSTEM PAGESIZE 16384
  3. In DB2, add (grant permission to) the CYCLONE user to the newly created database.  Sample SQL:
    CONNECT TO GI510;
    GRANT DBADM,CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEMA,LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT,SECADM ON DATABASE TO USER CYCLONE;
  4. In Interchange's datastoreconfig.xml set the value for kodo.jdbc.Schemas to CYCLONE; also, modify the ConnectionUrl string from this

    jdbc:db2://{Host}:{Port}/{DatabaseName}

    to this:

    jdbc:db2://{Host}:{Port}/{DatabaseName}:currentSchema=CYCLONE;

5. Start Interchange