Access SAP HANA records from VS (Visual Studio) Code
Hi Everyone. Hope everyone doing well. This Blogs will helps you to view and access SAP HANA records from VS (Visual Studio) Code using in Visual Studio Code Extensions.
If you are new to Visual Studio (VS) Code. You can follow my below my blogs and set up and configuration.
Installing Visual Studio Code and Configuring SAP Extensions in Visual Studio Code
Developing SAP Fiori App using SAP Fiori Tools in Visual Studio Code
Develop SAP UI5 Apps using Visual Studio Code
So let us begin……
Step 1: Install VS Code extension SAP HANA Driver for SQLTools by navigating to the extensions window and search for publisher:”SAP”. We can see our required extension. Click on the install. Internally it has a dependency extension (SQLTools) which will be installed automatically.
Can also install directly from Market place
Step 2: Once extension has installed successfully, click on the SQL Tools on the left side.
Step 3 : Now new window will be prompt on the right side where you can see available database drivers. Click on SAPHANA.
Step 4: Here we need to provide the SAP HANA system details like
- Connection name – local name to identify
- Connection Group – can be blank
- HANA Server – host (Refer below screenshot)
- Server Port – port (Refer below screenshot)
- Schema – schema (Refer below screenshot)
- User name – user (Refer below screenshot)
- Password – password (Refer below screenshot)
- Encrypted Connection – Let it default. No changes required
- SSL Crypto Provider – Let it default. No changes required
- SSL Trust Store – Let it default. No changes required
- Validate Server Certificate – Let it default. No changes required
- Connection Timeout – Let it default. No changes required
- Show records default limit – Let it default. No changes required
Step 5 : Once you enter required SAP HANA System Details click on the SAVE Connection.
Step 6 : Click on the connect then it automatically asks to install the SAP HANA driver (@sap/sap-client). Choose to install.
Step 7: Once SAP HANA driver (@sap/sap-client) installed successfully then it will be connected to the SAP HANA system and Tables and Views will be loaded.
Step 8 : Click on the Magnifier icon to view table data and + icon to insert a query.
Step 9: Now we can perform CRUD operation from the console.
In the same procedure, we can also perform other operations as well.
Yeahhhh!!! Now you have successfully connected to SAP HANA system and can able to the data 🙂
Hope you guys like this blog post.
Feel free to comment 🙂
Hey SaiNithesh Gajula ,
thank you for this great post. It helped me last year connecting to databases hosted on the shared clusters behind zeus.hana.ondemand.com.
As you maybe know, this HANA service is deprecated and was 'moved' to the Cloud-Foundry-Space area, let's say ... 'as default'.
However, since this transformation, the database is not running at these kind of clusters... it's now structured a little bit else. The host is now unique, like:
Since that, the way you described isn't working anymore ... Do you have any idea how to proceed? VS is telling me, that this is the wrong provider for this platform. I know sap is now using 'jdbc drivers'. In my projects, the module '@sap/hana-client' is still working with the 'new' databases .. so this couldn't be the reason ... any ideas 🙂 ?
Thank you and regards,