Skip to Content
0

Determining SAP HANA port number automatically

Dec 11, 2017 at 04:47 PM

99

avatar image
Former Member

SAP HANA single container SYSTEM uses the port 3xx15 to connect to SAP HANA SYSTEM.

Multi-container DB uses the port 3xx13 to connect.

I have a code which uses dbapi to connect to HANA SYSTEM.

conn = dbapi.connect(node,int(port),user,password)

Is there a way to find the port number automatically without connecting to SAP HANA DB?

i,e before connecting to HANA DB, i would want to find out the port number (3xx13 or 3xx15) and then use the port number to connect to DB.

(Determining if it is SAP HANA Single container or multi container might be enough as port numbers are fixed for HANA single container and multi container SYSTEM).

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Lars Breddemann
Dec 12, 2017 at 04:42 AM
0

When you connect to a HANA DB you have to know whether or not it is an MDC instance or not. There is no interface available to query this.

You could, of course, go and develop your own heuristic "connection" scanner. Just take the information you absolutely need (hostname, and instance number) and check whether a HANA answers on either 3<instance no>15 or 3<instance no>13.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi,

Also you need to remember now in MDC port 30013 is used for SYSTEMDB and not for tenants, so if you want to connecto to particular tenant DB you need to identify SQL port.

Regards

Luis de la Cruz.

0
avatar image
Former Member Dec 12, 2017 at 08:51 PM
0

Hi,

Also you need to remember now in MDC port 30013 is used for SYSTEMDB and not for tenants, so if you want to connecto to particular tenant DB you need to identify SQL port.

Regards

Luis de la Cruz.

Share
10 |10000 characters needed characters left characters exceeded