Verifying the database before the upgrade
Before you upgrade the database engine on Db2® Warehouse, it is important to use the db2ckupgrade command to verify that your databases are ready for upgrade.
About this task
The db2ckupgrade command verifies that a list of conditions is true to succeed at the database upgrade. Also, this command writes to the log file, which is specified with the -l parameter, a warning message for a list of conditions that affect database upgrades.
Note that in the Db2 Warehouse environment you must use the containerized version of the command. You can download it from IBM Hybrid Data Management Community. The executable file is in the zip package.
If you are upgrading Db2 Warehouse Version 3.8 or later to Version 11.5, which involves the Db2 engine upgrade, you must run the db2ckupgrade utility prior to upgrading to make sure that the database is ready for the upgrade.
You must run the command from the DB2DIR/bin directory, where DB2DIR is the location where the Db2 copy is installed. In the Db2 Warehouse environment, it is /mnt/blumeta0/home/db2inst1/sqllib/bin.
Following is the command syntax:db2ckupgrade dbname -container [-allchecks] -l logfile- <dbname>
- Specifies an alias name of a local database to be scanned.
- -allChecks
- Optional. Specifies that all the checks are to be run. This requires exclusive database connection.
- -l filename
- Specifies a log file to keep a list of errors and warnings generated for the scanned database.
db2ckupgrade bludb -container -l /tmp/db2ckupgrade.logTo learn more details about the db2ckupgrade command and how it works, see the following topic in the Db2 Knowledge Center db2ckupgrade - Check database for upgrade command. Note that in the containerized version that you use for Db2 Warehouse the list of parameters that you can use is limited, as described above.
Procedure
Results
Troubleshooting:
[db2inst1@node0101-fab - Db2wh bin]$ su - bluadmin -c "sudo -E /bin/db_stopsrc -all"
Password:
HA is already Disabled.
Failed to disable DSM connections.
Traceback (most recent call last):
File "/usr/bin/db_stopsrc", line 10, in module
sys.exit(main())
File "/usr/lib/python2.7/site-packages/bnr/cli/db_stopsrc.py", line 231, in main
disable.main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/bnr/cli/db_stopsrc.py", line 210, in main
self.process_arguments(parsed_args)
File "/usr/lib/python2.7/site-packages/bnr/cli/db_stopsrc.py", line 202, in process_arguments
self.disable_DSM_connections()
File "/usr/lib/python2.7/site-packages/bnr/cli/db_stopsrc.py", line 128, in disable_DSM_connections
raise err
bnr.modules.cmd_runner_error.CmdRunnerError: it
usually indicates that the web console was not enabled at the time the connections were disabled.
This error can be ignored and you should continue with the steps to resolve the exclusive database
access, and then proceed to run db2ckupgrade.