Search code examples
db2ibm-cloud

How define db2set DB2_COMPATIBILITY_VECTOR=ORA in DB2 on Cloud


I need some help with my instance of Db2 on Cloud. I need to execute a command for setting DB2_COMPATIBILITY_VECTOR. For example I need to define db2set DB2_COMPATIBILITY_VECTOR=ORA, but I can't do it using IBM DATA SERVER DRIVER or the IBM console.

How can I set it or check that it was already set?


Solution

  • The systems are managed. You can configure Oracle compatibility when you provision the database. There is a option switch in the provisioning form:

    enter image description here

    That option is not available on the Lite plan because that database is shared.

    When you already have provisioned your service instance, you could check some of the values using:

    select * from sysibmadm.dbcfg
    

    See DB2_COMPATIBILITY_VECTOR for some database configurations set, e.g., number_compat and varchar2_compat. The should be shown as set in the output.

    select * from sysibmadm.dbcfg where name like '%compat'
    

    You can also query environment variables using ENV_GET_REG_VARIABLES:

    select substr(reg_var_value,1,20) as VALUE,
       substr(reg_var_on_disk_value,1,20) as ON_DISK_VALUE
       from table(env_get_reg_variables(-1))
       where reg_var_name = 'DB2_COMPATIBILITY_VECTOR'