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.
- Db2 registry variables
are updated:
Db2 Db2 Warehouse DB2_WORKLOAD=ANALYTICS_ACCELERATORDB2_SELECTIVITY=ALL,AJSEL,UNIQUE_COL_FF ONDB2_APPENDERS_PER_PAGE=1DB2LOCK_TO_RB=STATEMENTDB2MAXFSCRSEARCH=1DB2_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_ACCELERATORDB2CODEPAGE=1208DB2_CDE_REDUCED_LOGGING=TRANSITION_THRESHOLD:320DB2_RUNTIME_DEBUG_FLAGS=SECTION_LEVEL_LOBDB2_SECTION_SCRATCH_BUFFER_SIZE=512KDB2LOCK_TO_RB=STATEMENTDB2_SELECTIVITY=ALL,AJSELDB2COMPOPT=CDE_NEQN_ENABLEDB2_ATM_CMD_LINE_ARGS="-include-manual-tables -low-priority-update-systables"DB2_OBJECT_TABLE_ENTRIES=65532DB2_EXT_TABLE_SETTINGS=COMM_BUFFER_SIZE:1113840DB2_CDE_DICTIONARY_CACHE_CLEANUP_SCAN_LIST_INTERVAL=30DB2_CDE_DICTIONARY_CACHE_CLEANUP_INTERVAL=60DB2_APPENDERS_PER_PAGE=1DB2_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:YESDB2_WLM_SETTINGS=DB2_CDE_AUTO_REORG_RECOMPRESS=DB2_CDE_COMPRESSION_SETTINGS="HISTOGRAM_MAX_VARSTRING_SZ:1000"DB2_CDE_DCC=noDB2_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=16384DB2_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
- For Db2 Warehouse, the
following Database Manager configuration parameters are set or changed:
DIAGSIZE 500START_STOP_TIME 5MAX_QUERYDEGREE 6
- For the target databases, the configuration changes as follows:
LOGARCHMETH1is set toOFF. 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 theDb2uClusterorDb2uInstancecustom resource (CR) by completing these steps before the upgrade:- Determine the Db2 CR
name of your target database instance, either
Db2uclusterorDb2uInstance, 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} - 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 theLOGARCHMETH1value as shown in the following example:spec: environment: databases: - name: BLUDB dbConfig: LOGARCHMETH1: "OFF" - Save and exit the YAML file. Then exit the container.
- The dbConfig changes of the Db2 CR, either
Db2uClusterorDb2uInstance, 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: TheDb2uClustercustom resource is deprecated and will be removed in a future release. The following example illustrates the configuration flow for theDb2uInstanceCR. 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.- 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.
- Other changes are specific to the type of the target database that you
use:
Db2 Db2 Warehouse PAGE_AGE_TRGT_MCR 30AUTO_SAMPLING ONAUTO_CG_STATS ONAUTHN_CACHE_USERS 20AUTHN_CACHE_DURATION 60
MAXLOCKS 10PCKCACHESZ 65536LOGARCHMETH2 OFFSECTION_ACTUALS NONEAUTO_MAINT ONAUTO_TBL_MAINT ONAUTO_REORG ONAUTO_STMT_STATS ONAUTO_RUNSTATS ONEXTBL_LOCATION /AUTO_SAMPLING ONMON_DEADLOCK HIST_AND_VALUESMON_LOCKTIMEOUT HIST_AND_VALUESMON_LOCKWAIT NONEAUTO_CG_STATS ONAUTO_DEL_REC_OBJ ONTRACKMOD YESMON_LCK_MSG_LVL 3WLM_AGENT_LOAD_TRGT 24AUTO_STATS_VIEWS ONDFT_EXTENT_SZ 4AUTHN_CACHE_USERS 20AUTHN_CACHE_DURATION 60
- The database instance is restarted so that the changes can take effect.
- A memory table function is installed by the following SQL
statement:
CALL SYSINSTALLOBJECTS('ANACC','C','','') - The following tag file is added:
/mnt/blumeta0/home/db2inst1/dg_config_done.XXXWhere
XXXis the instance ID of the target database.