db2 – What is purpose of db2ln and its file system symbolic links?

All we need is an easy explanation of the problem, so here it is.

On Linux/x86-64 I have Db2 v11.1 installed. When I tried to install Db2 v11.5 alongside existing Db2 installation I got error "DBI1004W /usr/lib/libdb2.so detected".

I checked and I see symbolic links on paths:

ls -l /usr/lib | grep "/opt/ibm/db2/"
ls -l /usr/include | grep "/opt/ibm/db2"

In error description is suggestion to delete those links. After using db2rmln command those links are removed.

Installation of Db2 v11.5 was now successful. But I have checked and those symbolic links are not recreated. According to https://www.ibm.com/docs/en/db2/11.5?topic=servers-multiple-db2-copies-one-system-linux-unix this works as intended. Info: "Links must not be created when multiple Db2 copies are intended to coexist."

It is so fine those symbolic links do not exist if multiple copies of Db2 resist on the same Linux.

My question is, what is purpose of those symbolic links and can I expect some problems not having them any more?

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

There is a relate link for the older Db2 9.7 version: Creating links for DB2 files.

This task is not required for normal DB2 database operation.
Consider creating links for the DB2 database system files only if both of the
following conditions are met:

  • You have only one copy of DB2 database on the current computer.
  • You are developing or running applications and want to avoid having to specify the full path to the product libraries and include
    files.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply