IBM Support

Using db2greg - Error message "Error encountered during the Delete record action: Failed to lock the registry".

Troubleshooting


Problem

Client is using the db2greg command with the -delinstrec switch, probably because they need to clear out a redundant service record in global.reg after an install of a newer version of DB2 in the same directory. Example command shown below. $ db2greg -delinstrec service=DB2,version=9.7.0.10,instancename=db2inst1,instancepath=/home/db2inst1/sqllib

Symptom

Error message "Error encountered during the Delete record action: Failed to lock the registry".

Cause

The db2greg command in this scenario needs to be run as root.

Environment

Only when advised by IBM use db2greg when a DB2 environment has not been cleaned up properly.

Diagnosing The Problem

When entering the command in the example above using a non-root account the error message will appear.

Resolving The Problem

Run db2greg as root from the bin folder where DB2 is installed (E.g. /opt/ibm/db2/V9.7/bin)

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

Document Information

Modified date:
16 June 2018

UID

swg21989281