IBM Support

[Db2] How to backup instance configuration information and apply it to recreated instance

Question & Answer


Question

How can I migrate instance configuration information from previous one when instance was recreated.

Answer

You can use db2cfexp / db2cfimp command to migrate instance information when recreating instance with same name, on the same server. db2cfexp command will export instance information into file. The instance information in the file can be imported by db2cfimp command after recreating instance.

example:
 $ db2cfexp [file name] backup  $ db2cfimp [file name]


db2cfexp command exports following information to output file.

  • Database information (including DCS and ODBC information)
  • Node information
  • Protocol information
  • database manager configuration settings
  • registry settings
  • Common ODBC/CLI settings.

If you want to recreate instance in different server, you should take backup of database(s) before recreating instance. After recreating instance, restore the backup of database(s), then copy executable module of user defined function, stored procedure, or user exit routine, from original server to new machine. In this case execute db2cfexp command with "template" option instead of "backup" option.

Operational consideration
It is strongly recommended to take system backup or database backup before recreating instance.

Please note following known problems are reported. You may need to modify the parameter setting manually, after executing db2cfimp command.

IC78624: AUTOMATIC IS REMOVED WHEN DB2CFEXP EXPORTS DATA (fixed in V9.7 FP6 or later)
IZ49328: DB2CFEXP UTILITY EXPORTS AUTOMATIC VALUES AS ABSOLUTE VALUES. SHOULD EXPORT
AUTOMATIC
(fixed in V9.5 FP5 or later)
For example original value was defined as "AUTOMATIC(90)", the parameter may be set simply "90" by db2cfexp/db2cfimp. Correct the value using UPDATE DBM CFG command.

example:
$ db2 UPDATE DBM CFG USING [parameter] 90 AUTOMATIC


IC78789: DB2CFEXP DOES NOT EXPORT SOME DATABASE MANAGER PARAMETERS. (fixed in V9.7 FP6 or later)
Some database manager configuration parameters such as FCM_NUM_CHANNELS, START_STOP_TIME, etc. may not be migrated correctly. Record the database manager parameter value before recreating instance. After recreating instance, correct the value(s) manually if necessary.

example:
$ db2 GET DBM CFG
displays the database manager configuration parameter value. If necessary, you can correct the value after recreating instance by following command.
$ db2 UPDATE DBM CFG USING [parameter] [value]

IC76615: DB2CFIMP <FILENAME> UPDATES DBM CFG PARAMETERS INCORRECTLY WHEN VALUES SET TO AUTOMATIC; CLIENT CONNECTIONS WILL HANG (fixed in V9.5 FP9 or later)
For example original value was defined as "AUTOMATIC(100)", the parameter may be set incorrectly such as "AUTOMATIC(0)" by db2cfexp/db2cfimp. Record the database manager parameter value before recreating instance. After recreating instance, correct the value(s) manually if necessary.

example:
$ db2 GET DBM CFG
displays the database manager configuration parameter value. If necessary, you can correct the value after recreating instance by following command.
$ db2 UPDATE DBM CFG USING [parameter] 100 AUTOMATIC

LI75950,IC89165 SQL5060N RESULTS FROM DB2CFIMP FOR SETTING DFT_MON_UOW TO ON (fixed in V9.5 FP8 or later, V9.7 FP8 or later)
Importing some of database manager configuration parameter may fail with SQL5060N and SQL5130N. Modify the failing parameter manually by UPDATE DBM CFG command.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"OTHER - Uncategorised","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;9.1;10.1;10.5;11.1;11.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 October 2019

UID

ibm11075185