In focus

How To Resolve DB2 Error: DB29501E

In this article you will learn how to resolve DB2 error DB29501E. This error message occurs when you open DB2 control center, because of DB2INSTANCE environment variable is not set.

Anmol Garg Apr 08, 2016

Introduction

DB2 is a database product from IBM. It (DB2 Express-C) is a Relational Database Management System (RDBMS). DB2 is designed to store, analyze and retrieve the data efficiently. The 'C' in DB2 express-C stands for the community. A community of DB2 Express-C is a community of all sorts people and companies who design, develop, deploy or utilize database solutions.

An error message occurs, when opening the DB2 Control Center even after a successful installation of DB2 Database Server :
DB29501E DB2 has detected an inconsistent environment. Please investigate the following : "DB2INSTANCE -2029059916".

What's the reason

Such an error message occurs if DB2INSTANCE environment variable is not set.

Solution

You need to set the DB2INSTANCE environment variable, as shown below step by step.
(* Windows 8 is used here in this example)

Step 1 - Right click on Computer & select Properties.


Step 2 - Click on Advanced system settings.


Step 3
- Click on Environment Variables button.


Step 4
- Under System Variables, Select New.


Step 5
- Set the Variable name “DB2INSTANCE” and Variable value "<instance_name>" For eg. myinst.


Press OK Button to finish. Now you can see that DB2INSTANCE variable has been added successfully.


Here's a free e-book on DB2: Getting Started With DB2 Express-C

db2

COMMENT USING