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

The question:

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?

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

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

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 Comment