Use SYSDUMMY1 in DB2 to obtain the actual server name

By using the auxiliar table sysdummy1 you can query information about a server with DB2 installed.

Next query shows how to obtain the DB2 server name where the session is connected:

SELECT CURRENT SERVER
 FROM SYSIBM.SYSDUMMY1