Skip to Content

How to get the list of Hana instances on a machine

Aug 01, 2017 at 02:40 PM


avatar image
Former Member

I am writing a discovery script which fetches the details of the HANA setup on a machine. Essentially I need the list of all HANA instances, and the list of DBs in each instance. I got the list of of DBs by running "select * from M_DATABASE" in hdbsql.

Can you help with how can I get the list of all instances from command line.

10 |10000 characters needed characters left characters exceeded
Former Member

can anyone please help me with this?

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Miguel González Aug 01, 2017 at 03:47 PM


As you said for getting a list of the tenant databases running on a HANA database you can use the following query, just remember to execute it on the SYSTEMDB database:

select * from "SYS"."M_DATABASES"

If you want to see how many HANA instances you have running on the operating system you can use the following command with the hdbadm user or the sidadm user depending on your installation:

HDB info 

On the output you will see a hdbindexserver for each tenant database running on the database engine. You can also execute the following command so you will see all the hana databases running on the server (in case you have several databases engine running on the same server):

ps -ef|grep hdbindexserver


10 |10000 characters needed characters left characters exceeded