Test Case ‐ Revert an existing Db2 database product to a previous fix pack level (Linux and Unix) - fsmegale/Db2-luw GitHub Wiki
This is a quick and simple test case to revert the fix/mod pack level from a just upgraded Db2 to a previous fix/mod pack level.
This isn't IBM oficial documentation despite the official documentation is followed.
Environment:
Operation System: Linux Suse 15 SP7 Db2 v11.5.9.0 GA (upgrade and downgrade to/from) Db2 v11.5.9.0 CSB69673 instance name: db2inst4 database: updb host: sles-15-sp7-host1
Upgrading the instance:
sles-15-sp7-host1:/opt/ibm/db2/v11.5.9.CSB69673/instance # ./db2iupdt db2inst4
DBI1446I The db2iupdt command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)
Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end
Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end
Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end
Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end
The execution completed successfully.
For more information see the DB2 installation log at "/tmp/db2iupdt.log.82096".
DBI1070I Program db2iupdt completed successfully.
Upgrading the database
db2inst4@sles-15-sp7-host1:~> db2updv115 -d updb
_________________________________________________________________________
_____ DB2 Service Tools _____
I B M
db2updv115
This tool is a service utility designed to update a DB2 Version 11.5
database to the current fix pack level.
_________________________________________________________________________
DB2 Universal Database Version 11.5, 5622-044 (c) Copyright IBM Corp. 2019
Licensed Material - Program Property of IBM
IBM DATABASE 2 Database update to current fix pack tool
db2updv115 completed successfully for database 'updb'.
Rolling back the upgrade
Checking the status
db2inst4@sles-15-sp7-host1:~> db2 connect to updb
Database Connection Information
Database server = DB2/LINUXX8664 11.5.9.0
SQL authorization ID = DB2INST4
Local database alias = UPDB
db2inst4@sles-15-sp7-host1:~> db2 "select * from sysibm.sysversions"
VERSIONNUMBER VERSION_TIMESTAMP AUTHID
VERSIONBUILDLEVEL
------------- -------------------------- -------------------------------------------------------------------------------------------------------------------------------- ------------------------------
11050900 2026-03-30-09.05.55.404295 DB2INST4
special_69673
1 record(s) selected.
db2inst4@sles-15-sp7-host1:~> db2 terminate
db2sDB20000I The TERMINATE command completed successfully.
db2inst4@sles-15-sp7-host1:~> db2stop
03/30/2026 09:22:18 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
Downgrading
PS.: optionally it can be used the "-d" flag for debug mode (before -f).
sles-15-sp7-host1:/opt/ibm/db2/v11.5.9.GA/instance # ./db2iupdt -f level -u db2fenc4 db2inst4
DBI1446I The db2iupdt command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)
Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end
Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end
Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end
Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end
The execution completed successfully.
For more information see the DB2 installation log at "/tmp/db2iupdt.log.5996".
DBI1070I Program db2iupdt completed successfully.
db2updbv
The documentation doesn't mention but it is needed to run the db2updv in the instance where the database resides now, otherwise future problem can happen like SQL0444N and crashes as reported in this old technote:
75 ways to demystify DB2: #21: Techtip: Getting SQL0444N with Reason code: "6" https://web.archive.org/web/20200813005324/https://www.ibm.com/support/pages/node/1141168?lang=en
Running db2updv:
db2inst4@sles-15-sp7-host1:~> db2updv115 -d updb
_________________________________________________________________________
_____ DB2 Service Tools _____
I B M
db2updv115
This tool is a service utility designed to update a DB2 Version 11.5
database to the current fix pack level.
_________________________________________________________________________
DB2 Universal Database Version 11.5, 5622-044 (c) Copyright IBM Corp. 2019
Licensed Material - Program Property of IBM
IBM DATABASE 2 Database update to current fix pack tool
db2updv115 completed successfully for database 'updb'.
db2inst4@sles-15-sp7-host1:~> db2start
db2 connect ot u03/30/2026 09:33:38 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
db2inst4@sles-15-sp7-host1:~> db2 connect to updb
Database Connection Information
Database server = DB2/LINUXX8664 11.5.9.0
SQL authorization ID = DB2INST4
Local database alias = UPDB
db2inst4@sles-15-sp7-host1:~> db2 "select * from sysibm.sysversions"
VERSIONNUMBER VERSION_TIMESTAMP AUTHID
VERSIONBUILDLEVEL
------------- -------------------------- ----------------------------------------------------------
------------------ ------------------------------
11050900 2026-03-30-09.05.55.404295 DB2INST4
s2310270807
1 record(s) selected.
We can see that the VERSION_TIMESTAMP doesn't change but the VERSIONBUILDLEVEL.
The VERSIONBUILDLEVEL was special_69673 and after the revert it is s2310270807.
References
Revert an existing Db2 database product to a previous fix pack level (Linux and Unix) https://www.ibm.com/docs/en/db2/11.5.x?topic=ifplu-revert-existing-db2-database-product-previous-fix-pack-level
db2updv115 - Update database to version 11.5 mod pack or fix pack comman https://www.ibm.com/docs/en/db2/11.5.x?topic=sc-db2updv115-update-database-version-115-mod-pack-fix-pack-command
db2iupdt - Update instances command https://www.ibm.com/docs/en/db2/11.5.x?topic=commands-db2iupdt-update-instances