Upgrading Db2 servers in a test environment
Upgrading Db2 servers in a test environment before you upgrade them in your production environment allows you to address any problems during the upgrade process more effectively and to evaluate the impact of changes introduced in Db2 version 11.5.
You can also verify that applications, scripts, tools and maintenance procedures work properly before upgrading your production environment. In addition, you can assess the disk requirements and the time that it takes to upgrade the database, to solidify your upgrade plan.
Before you begin
You must have root user authority on Linux® and UNIX operating systems or Local Administrator authority on Windows. You must also have SYSADM authority.
To duplicate your production environment in a test environment, perform the following tasks:
Install a Db2 instance that matches your production environment (version 10.5 or
If you already have a Db2 copy, you do not have to create a new one.Note: If your production environment is running on a version of Db2 that is older than version 10.5, upgrade your database to version version 10.5 before proceeding to step 2. See Upgrade to DB2 Version 10.5 for more information.
- Create your instance duplicates as test instances.
- Perform the steps in Creating database duplicates in
the testing instances. You can duplicate your databases without data to test only database upgrade or using a data subset to test all your application functionality. Database upgrade converts only system catalog objects. Therefore, the volume of data in the tables does not impact the disk requirements or the time that it takes to upgrade the database.
- Perform the pre-upgrade tasks that apply to your Db2 server.
- Install Db2 version 11.5.
- Perform the steps in Upgrading Db2 11.1 or Db2 10.5 instances.
- Perform the steps in Upgrading databases.
Keep a record of the time it takes to upgrade each database and the size of the system catalog table space, system temporary table space, and log space. The following example shows how to do this on an AIX® operating system:
Use this information in your upgrade plan.
time db2 UPGRADE DATABASE nsample | tee upgrade_time.log db2 connect to nsample db2 "SELECT SUBSTR(TBSP_NAME,1,15) NAME, MEMBER, TBSP_TYPE TYPE, TBSP_AUTO_RESIZE_ENABLED AUTO_RESIZE, TBSP_TOTAL_PAGES TOTAL_PGS, TBSP_USED_PAGES USED_PGS, TBSP_FREE_PAGES FREE_PGS, TBSP_PAGE_SIZE PG_SZ, TBSP_EXTENT_SIZE EXTENT_SZ, TBSP_PREFETCH_SIZE PREFETCH_SZ, TBSP_NUM_CONTAINERS CONTAINERS FROM TABLE(MON_GET_TABLESPACE(NULL,-2)) AS T WHERE TBSP_CONTENT_TYPE IN ('ANY','SYSTEMP')" | tee tbs_details.log db2 GET DB CFG FOR nsample | grep '(LOG[FPS]' | tee log_size.log
- If you found any issues upgrading your test databases, find a resolution to these issues before upgrading your production environment. Add the tasks to resolve these issues to your upgrade plan.
- Perform the steps in Post-upgrade tasks for Db2 servers that apply to your Db2 server.
- Perform the steps in Verifying upgrade of Db2 servers to ensure the upgrade was successful.
- Test your applications, scripts, tools and maintenance procedures by connecting to the test databases that you upgraded to the Db2 version 11.5 copy if your test databases are populated with data.