Find Active HANA Ports via SQL Queries

If you want to list “Active HANA Ports” on OS or HANA Admin Tool via SQL, then you can try to use below SQL queries to do it easily ;

Architecture of HANA Ports ;

Find Active HANA Ports via SQL Queries

- We can list active “SQL Port” which is belongs to “SYSTEMDB” , to do this; Go on SYSTEMDB and execute following SQL query;

SELECT DATABASE_NAME, SQL_PORT FROM SYS_DATABASES.M_SERVICES WHERE DATABASE_NAME=’SYSTEMDB’
and SERVICE_NAME=’nameserver’  and COORDINATOR_TYPE= ‘MASTER’;

Find Active HANA Ports via SQL Queries

- We can list all the ports from SYS_DATABASES.M_SERVICES ,  to do this; Go on SYSTEMDB and execute following SQL query;

SELECT * FROM SYS_DATABASES.M_SERVICES;

Find Active HANA Ports via SQL Queries

Tenant DB Port number rule is ;

Find Active HANA Ports via SQL Queries

Example for an instance 02

Find Active HANA Ports via SQL Queries

- On Tenant DB , we can get “IndexServer” and “XSengine” Ports ;

SELECT SERVICE_NAME, PORT, SQL_PORT, (PORT + 2) HTTP_PORT FROM SYS.M_SERVICES WHERE ((SERVICE_NAME=’indexserver’ and COORDINATOR_TYPE= ‘MASTER’) or (SERVICE_NAME=’xsengine’));

 Check Memory Usage and DB Size on HANA via SQL

- Checks all ports for a specific Tenant DB (example DB name is : H3) ;

SELECT DATABASE_NAME, SERVICE_NAME, PORT, SQL_PORT, (PORT + 2) HTTP_PORT FROM SYS_DATABASES.M_SERVICES WHERE DATABASE_NAME=’H3′and ((SERVICE_NAME=’indexserver’ and COORDINATOR_TYPE= ‘MASTER’) or (SERVICE_NAME=’xsengine’));

Check Memory Usage and DB Size on HANA via SQL

- Shows all Tenant DB’s all Port Numbers ;

SELECT DATABASE_NAME, SERVICE_NAME, PORT, SQL_PORT, (PORT + 2) HTTP_PORT FROM SYS_DATABASES.M_SERVICES WHERE ((SERVICE_NAME=’indexserver’ and COORDINATOR_TYPE= ‘MASTER’)or (SERVICE_NAME=’xsengine’));

Find Active HANA Ports via SQL Queries

 

 

 

 

 

 

 

Leave a Reply


8 × = sixteen

Blogroll