[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.
(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 hanatrial.ondemand.com – 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.
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.
Follow along with the Live3 course here.
SAP HANA Academy over 900 free tutorial videos on using SAP HANA and SAP HANA Cloud Platform.