Create a HANA DB on SCP via HANA Workbench
This is the first part of my duology of blogs to create a HANA database and expose it via OData on SAP Cloud Platform using SAP HANA Workbench. This part deals with the creation of HANA database. If you already have a HANA DB created, you can scroll through the steps below to ensure that you haven’t missed anything. You can find the second part here.
When I first thought of creating a HANA DB in my SCP trial account, I found multiple blogs on this topic and I was spoilt for choice. Some of these blogs used the Workbench Editor, while some used the Workbench Catalog. I chose one of the blogs, but faced a few errors while following it. So I chose another blog, restarted the process and faced another set of challenges there.
After navigating through multiple blogs, spending close to 8 hours doing so and having worked with both, the Editor and the Catalog, I was still stuck with a fresh set of errors. That is when I came up with a hybrid approach of my own, trying to bypass these errors. When I reran the process with my approach, it took me less than 40 minutes from the start to the end. So I decided to write a blog with my hybrid approach to create and expose a HANA database. Hope it helps you, as well !
You need to have an SCP trial account in the Neo environment. You can check any of the many blogs on this topic, if you are unsure how to do that.
The contents of this blog is a one-time setup you would do in your SCP account, while you would need the contents of my next blog every time you create a new application.
It would take you around 30 minutes to finish the steps in this blog. Following the steps in the next blog would take another 15 minutes.
This blog consists of 12 steps. They cover:
- Creation of a HANA database : Steps 1 – 5
- Setting up the SYSTEM user : Steps 6 – 12
Let’s dive in:
- Log on to SCP Account in the Neo environment
- On the left pane, click on “Databases & Schemas”
- To create a new database, click on “New”.
- On the popup, enter a “Database ID” and choose the “Database System” as “HANA MDC (<trial>)”. Set and confirm a password. Set the “DP Server” parameter to “ON”.
Note: In a trial account, you can only have one Database. So, ensure that the name chosen by you here is generic (like your user id or your initials) and not specific to a single application.
Note: The password should have minimum 15 characters with upper- and lower-case characters, numbers and special symbols.
- Click on “Create”. The creation process would take approximately 25 minutes (out of the total 30 minutes needed for following this blog).
———————- Your HANA database is up and running now ———————–
—— Next, we set up a user to create tables and services in our HANA DB ——
- Click on “SAP HANA Cockpit”. On the next screen, enter the Username as “SYSTEM” and the password set in Step 4, and click on “Log On”.
- On the next popups, click “OK” and “Continue” respectively. The second popup might take a few seconds to load.
Here, we assigned roles to the SYSTEM user
- Go back to the screen in Step 5 and click on “SAP HANA Web-Based Development Workbench”. We will be doing all our next tasks in this workbench.
- Click on “Security”. Here we add the roles to our SYSTEM user to enable the access to “Editor” and “Catalog”. Without adding the roles, we face 403-Forbidden error.
- On the left pane, double click on “SYSTEM” under “Users”
- Now add the roles “sap.hana.ide.roles::EditorDeveloper” and “sap.hana.ide.roles::CatalogDeveloper” using the plus icon under “Granted Roles”. These roles are needed to access Editor and Catalog respectively in our workbench.
- The changes are unsaved and hence the tab header is colored yellow. Click on Save (Ctrl+S). You can view the success message in the console at the bottom of the screen.
We have now successfully created a HANA database and created a user to access it. Once the second part of my blog is ready, you can follow it to start adding your tables and content in your database.