Avatar of contr315
contr315
 asked on

How to get server name/cpu count/udb version via sql queries

I need to get the CPU count, database version, name (or I could settle for the IP if the name isn't avaiable) of server holding the UDB database.  We cannot use O/S utilities because we have no access to the O/S, we can just connect via jdbc to access the data.  Ideally we also can see the fixpack levels for the UDB database.
DB2

Avatar of undefined
Last Comment
contr315

8/22/2022 - Mon
Kent Olsen


Hi contr315,

I'm curious -- why do you need to know the underlying O/S and DB environments?


Kent
contr315

ASKER
We need to enforce licensing of the server.  The licenses are issued for a particular server with a set number of cpus.
Kent Olsen


License enforcement should be a function of the server.  It's too difficult (if not impossible) to manage from the client side.



Kent
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
db2inst1

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
sachinwadhwa

Or you should install System Inventory agents e.g Tivoli  on Server.
contr315

ASKER
It looks like this query would work, but it seems to only be supported in 8.2.2 and higher.

SELECT HOST_NAME, TOTAL_CPUS
   FROM TABLE(SYSPROC.ENV_GET_SYS_INFO()) AS SYSTEMINFO