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, complete these steps before the upgrade:- Determine the
Db2ucluster CRname of your target database instance and edit it. To this end, replace${PROJECT_CPD_INST_OPERANDS}with your project name in the following sample command. Then run the command.oc get db2ucluster -n ${PROJECT_CPD_INST_OPERANDS} DB2UCLUSTER_ID=<db2ucluster_cr_name> oc edit db2ucluster ${DB2UCLUSTER_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: database: name: BLUDB dbConfig: LOGARCHMETH1: "OFF" - Save and exit the YAML file. Then exit the container.
- The dbConfig changes of Db2ucluster CR will be detected, then applied automatically. You can
monitor pod logs to verify the configurations are applied successfully. Run the
command:
oc logs c-${DB2UCLUSTER_ID}-db2u-0 -n ${PROJECT_CPD_INST_OPERANDS}The output looks like:{"level":"info","result":"stdout: Waiting for up to 180 sec until a change is detected in the relevant configmaps... change detected\n(*) Applying DB cfg settings\nParameters that require updating: EXTBL_LOCATION LOCKLIST LOGARCHMETH1 LOGBUFSZ LOGFILSIZ LOGPRIMARY MAXLOCKS\nParameters that support online updating: LOGSECOND\nDB20000I The TERMINATE command completed successfully.\n(*) Applying Db2 db cfg parameters for BLUDB\nupdate db cfg for BLUDB using AUTO_DEL_REC_OBJ ON DFT_SCHEMAS_DCC NO EXTBL_LOCATION /mnt/blumeta0/db2/load;/mnt/blumeta0/home;/mnt/bludata0/scratch;/mnt/external;/mnt/blumeta0/db2/backup EXTBL_STRICT_IO NO LOCKLIST 500000 LOGARCHMETH1 OFF LOGBUFSZ 131070 LOGFILSIZ 250000 LOGPRIMARY 10 LOGSECOND 20 LOG_APPL_INFO NO LOG_DDL_STMTS NO MAXLOCKS 13 NUM_DB_BACKUPS 2 REC_HIS_RETENTN 7\nDB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.\nSQL1363W One or more of the parameters submitted for immediate modification \nwere not changed dynamically. For these configuration parameters, the database \nmust be shutdown and reactivated before the configuration parameter changes \nbecome effective.\n\nforce application all\nDB20000I The FORCE APPLICATION command completed successfully.\nDB21024I This command is asynchronous and may not be effective immediately.\n\n\ndeactivate db BLUDB\nDB20000I The DEACTIVATE DATABASE command completed successfully.\n\ndeactivate db BLUDB\nSQL1495W Deactivate database is successful, however, there is still a \nconnection to the database.\n\nactivate db BLUDB\nDB20000I The ACTIVATE DATABASE command completed successfully.\n\nDatabase was activated successfully\n hostname: c-db2oltp-1717040404643209-db2u-0","caller":"[13]:db2.go:346:ApplyCfg()","timestamp":"2024-05-30T16:31:39Z", "message":"executed apply Db2 configuration cmd for setting db"}
- 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.