Skip to Content
Author's profile photo Tom Flanagan

[SAP HANA Academy] Live3: Setup HCP Tunnel

[Update: April 5th, 2016 –  The Live3 on HCP tutorial series was created using the SAP HANA Cloud Platform free developer trial landscape in January 2015. The HCP landscape has significantly evolved over the past year. Therefore one may encounter many issues while following along with the series using the most recent version of the free developer trail edition of HCP.]

In this tutorial video Philip Mugglestone from the SAP HANA Academy shows how to configure a tunnel that enables the node.js application to communication directly with our SAP HANA Cloud Platform trial instance. Check out the tutorial video below.

Screen Shot 2015-03-04 at 3.36.59 PM.png

(0:15 – 1:05) Tunneling Overview

When using the SAP HANA Cloud Platform trial edition it is not possible for node.js to directly connect to the SAP HANA database. Therefore we need to setup a database tunnel using the previously installed SDK to connect directly to the SAP HANA database.

(1:05 – 5:20) How to Setup the HCP Tunnel

First open a command prompt on the tools folder of the SAP HANA SDK we previously installed and placed in the C drive. Type in open-db-tunnel –h – i dev – a – p123456789trial – u p123456789 and run the command.

h = Host name

i = Instance Name

a = Account Name (Your personal P number)

u = Username (P number without trial)

After entering your password the tunnel will successfully open.

Screen Shot 2015-03-04 at 3.41.33 PM.png

Now we have the information needed to connect from node.js. This includes the host name, instance number, JDBC port number, user name, password and schema name. Note the password will change each time you open and close the tunnel. The tunnel will automatically close after 24 hours.

Now copy the information from tunnel and paste it into the corresponding lines of app.js code.

Screen Shot 2015-03-04 at 3.42.34 PM.png

Follow along with the Live3 course here.

SAP HANA Academy over 900 free tutorial videos on using SAP HANA and SAP HANA Cloud Platform.

Follow @saphanaacademy

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      hi Tom !

      I have a question - quite complicated.

      I have my tunnel opened but whenever i try to see what's in my tables i can't.

      If i close the tunnel, i get the error "Unable to get data provider".

      I log off of my system - then log on a few times and then i can see what's in there.

      Any suggestions?


      Christoforos Verras

      Author's profile photo Tom Flanagan
      Tom Flanagan
      Blog Post Author

      Hi Christoforos,

      That's a very strange error. Philip nor myself has ever encountered it when using the tunnel.

      I would suggest, first, to recheck to ensure that you transcribed all of the correct information form the tunnel (JDBC port number, schema name, password etc.) and the Twitter keys and secrets to the app.js SQL code.

      Then make sure that you have the most up to date version of the HCP SDK installed.

      Also, there could be some compatibility issues with running Eclipse and the node.js tunnel at the same time. Close Eclipse, start the tunnel connection and then reopen Eclipse.

      Hope these suggestions are helpful in solving your error.

      Best Regards,


      Author's profile photo Former Member
      Former Member

      Hi Tom,

      thanks so much for your answer !

      Do you mean that while you are tracking - insterting tweets to HANA, you can open an SQL Command Line and write a select statement ?

      Everything is correct since it is working and inserting the tweets into the table - Username / Password etc.

      The HCP SDK - i don't get that..

      I will do the Close eclipse procedure but i don't think it will work either.


      Christoforos Verras

      Author's profile photo Former Member
      Former Member

      Good morning Tom !

      I tried to open the tunnel first and then the IDE, and it is not possible.

      It says that port 30015 is in use.

      Thats why i cannot see what in my table when the tunnel is up.


      Christoforos Verras

      Author's profile photo TAPAS SANTRA

      Hello Tom,

      I tried to open this video. It says, video is private. Is there any way I can access it>


      Author's profile photo Tom Flanagan
      Tom Flanagan
      Blog Post Author

      Hi Tapas,

      Unfortunately we removed the Live3 on HCP series from YouTube as the recent updates to the HCP user interface prevented the series from being completed by following along with our original videos. We would need to reshoot the entire series with most current version of HCP.

      Please check out the on-premise version of Live: Live3 - Advanced Real-Time Social Media Analytics - YouTube