Changes to the target database

The service instance creation process makes changes to the configuration of the selected target database (Db2 or Db2 Warehouse). See what these changes are.

  1. Db2 registry variables are updated:
    Db2 Db2 Warehouse
    • DB2_WORKLOAD=ANALYTICS_ACCELERATOR
    • DB2_SELECTIVITY=ALL,AJSEL,UNIQUE_COL_FF ON
    • DB2_APPENDERS_PER_PAGE=1
    • DB2LOCK_TO_RB=STATEMENT
    • DB2MAXFSCRSEARCH=1
    • DB2_STATISTICS="USCC:0;DISCOVER:ON;CGS_SAMPLE_RATE_ADJUST:0;RAND_COLGROUPID:Y;LEN21_COLGROUPNAME:Y;AUTO_SAMPLING_IMPRV:ON"
    • DB2_WAITFORDATA_LIBNAME= /mnt/blumeta0/home/db2inst1/config_db2u/waitfordata/libs/libwaitForDataSharedLib.so
    • DB2_WORKLOAD=ANALYTICS_ACCELERATOR
    • DB2CODEPAGE=1208
    • DB2_CDE_REDUCED_LOGGING=TRANSITION_THRESHOLD:320
    • DB2_RUNTIME_DEBUG_FLAGS=SECTION_LEVEL_LOB
    • DB2_SECTION_SCRATCH_BUFFER_SIZE=512K
    • DB2LOCK_TO_RB=STATEMENT
    • DB2_SELECTIVITY=ALL,AJSEL
    • DB2COMPOPT=CDE_NEQN_ENABLE
    • DB2_ATM_CMD_LINE_ARGS="-include-manual-tables -low-priority-update-systables"
    • DB2_OBJECT_TABLE_ENTRIES=65532
    • DB2_EXT_TABLE_SETTINGS=COMM_BUFFER_SIZE:1113840
    • DB2_CDE_DICTIONARY_CACHE_CLEANUP_SCAN_LIST_INTERVAL=30
    • DB2_CDE_DICTIONARY_CACHE_CLEANUP_INTERVAL=60
    • DB2_APPENDERS_PER_PAGE=1
    • DB2_EXTENDED_OPTIMIZATION="COL_RTABLE_UD_THR 0,XGBPART ON FULL NONHDIR,ENABLE_OLAP2AGG ON,NI2NE_WITH_NULLS OUTER,COLJOIN 1,NEQN_DECORR ON"
    • DB2_REDUCED_OPTIMIZATION="COL_RTS OFF,EGAD 0"
    • DB2_CDE_DATA_SETTINGS=VECTORIZED_INSERT:YES
    • DB2_WLM_SETTINGS=
    • DB2_CDE_AUTO_REORG_RECOMPRESS=
    • DB2_CDE_COMPRESSION_SETTINGS="HISTOGRAM_MAX_VARSTRING_SZ:1000"
    • DB2_CDE_DCC=no
    • DB2_STATISTICS="USCC:0;DISCOVER:ON;CGS_SAMPLE_RATE_ADJUST:0;RAND_COLGROUPID:Y;LEN21_COLGROUPNAME:Y;AUTO_SAMPLING_IMPRV:ON"
    • DB2_TCG_DEFAULT_OPTIONS="set percentile_cont_spill on"
    • DB2_CORRELATED_PREDICATES="CGS_CARD_BOUND ON"
    • DB2_SQB_EXTENTMOVEMENT_BUFFER_SIZE=16384
    • DB2_COL_RUNPROF_HSJOIN="DUPPAYLOADSZ_LIMIT ON"
    • DB2_ADVIS_OPTIONS="COL_PART ON"
    • DB2_WAITFORDATA_LIBNAME= /mnt/blumeta0/home/db2inst1/config_db2u/waitfordata/libs/libwaitForDataSharedLib.so
  2. For Db2 Warehouse, the following Database Manager configuration parameters are set or changed:
    • DIAGSIZE 500
    • START_STOP_TIME 5
    • MAX_QUERYDEGREE 6
  3. For the target databases, the configuration changes as follows:
    • LOGARCHMETH1 is set to OFF. This disables archive logging for a Db2 or Db2 Warehouse instance so that the database runs in circular logging mode. This can improve the synchronization performance, but in some cases you might have to re-enable archive logging. Consider:
      • Your target database also contains tables that are not managed by Data Gate. You can only recover these by using the backup and archive logs.

        In contrast, Data Gate tables can be recovered from Db2 for z/OS by simply reloading these.

      • Other replication tools might use the target database as a source, and replicate changes to a new target as in a replication chain. Such tools require that archive logging is enabled.
      Tip: To avoid a BACKUP PENDING state of the Db2 target database after an upgrade, adjust the target Db2 configuration in the Db2uCluster or Db2uInstance custom resource (CR) by completing these steps before the upgrade:
      1. Determine the Db2 CR name of your target database instance, either Db2ucluster or Db2uInstance, and edit it. To this end, replace ${PROJECT_CPD_INST_OPERANDS} with your project name in the following sample command. Then run the command.
        #(current): Db2uInstance
        oc get db2uinstance -n ${PROJECT_CPD_INST_OPERANDS}
        DB2UINSTANCE_ID=<db2uinstance_cr_name>
        oc edit db2uinstance ${DB2UINSTANCE_ID} -n ${PROJECT_CPD_INST_OPERANDS}
      2. The database configuration (YAML file) is now in edit mode. Database configuration parameters are added under spec.environment.databases.dbConfig. Navigate to this section and add or change the LOGARCHMETH1 value as shown in the following example:
        spec:
          environment:
            databases:
              - name: BLUDB
                dbConfig:
                  LOGARCHMETH1: "OFF"
      3. Save and exit the YAML file. Then exit the container.
      4. The dbConfig changes of the Db2 CR, either Db2uCluster or Db2uInstance, will be detected and applied automatically. You can monitor pod logs to verify that the configurations are applied successfully. Run the command:
        oc logs c-${DB2UINSTANCE_ID}-db2u-0 -n ${PROJECT_CPD_INST_OPERANDS}
      Important: The Db2uCluster custom resource is deprecated and will be removed in a future release. The following example illustrates the configuration flow for the Db2uInstance CR. For further information about changing Db2 target database configurations, see Deploying Db2 using a custom resource for Db2 and Changing Db2 Warehouse configuration settings for Db2 Warehouse.
    • Other changes are specific to the type of the target database that you use:
      Db2 Db2 Warehouse
      • PAGE_AGE_TRGT_MCR 30
      • AUTO_SAMPLING ON
      • AUTO_CG_STATS ON
      • AUTHN_CACHE_USERS 20
      • AUTHN_CACHE_DURATION 60
      • MAXLOCKS 10
      • PCKCACHESZ 65536
      • LOGARCHMETH2 OFF
      • SECTION_ACTUALS NONE
      • AUTO_MAINT ON
      • AUTO_TBL_MAINT ON
      • AUTO_REORG ON
      • AUTO_STMT_STATS ON
      • AUTO_RUNSTATS ON
      • EXTBL_LOCATION /
      • AUTO_SAMPLING ON
      • MON_DEADLOCK HIST_AND_VALUES
      • MON_LOCKTIMEOUT HIST_AND_VALUES
      • MON_LOCKWAIT NONE
      • AUTO_CG_STATS ON
      • AUTO_DEL_REC_OBJ ON
      • TRACKMOD YES
      • MON_LCK_MSG_LVL 3
      • WLM_AGENT_LOAD_TRGT 24
      • AUTO_STATS_VIEWS ON
      • DFT_EXTENT_SZ 4
      • AUTHN_CACHE_USERS 20
      • AUTHN_CACHE_DURATION 60
  4. The database instance is restarted so that the changes can take effect.
  5. A memory table function is installed by the following SQL statement:
    CALL SYSINSTALLOBJECTS('ANACC','C','','')
  6. The following tag file is added:
    /mnt/blumeta0/home/db2inst1/dg_config_done.XXX

    Where XXX is the instance ID of the target database.