Skip to Content
Previous

Setup a HANA user account

By Abdel Dadouche

Configure a user account with the relevant roles and privileges to use the SAP Cloud for predictive services

You will learn

  • How to create a new user account on your HANA MDC instance using the SAP HANA Cockpit. Each Trial HANA MDC instance comes with a HANA System Account. This user account shall be used only to execute “System” related activities.
    In the “real world”, it is uncommon to use this user account to develop an “end-user” application.
  • What are the user roles and privileges required on HANA to use the SAP Cloud for predictive services. As the SAP Cloud for predictive services use the HANA Automated Predictive Library, it is required to configure the user roles and privileges accordingly.

Details

Step 1: Access the Security Console

From the SAP HANA Cockpit and connected with the HANA System Account, click on Manage Roles and Users. This will open the SAP HANA Web-based Development Workbench.

SAP HANA Cockpit
Please log in to access this content.
Step 2: Extend the SYSTEM user

In order to allow the SYSTEM user to run any SQL statement, you will need to grant him the Developer role.

SAP HANA Web-based Development Workbench

Under Security, expand Users, then double click on SYSTEM.

Select the Granted Roles tab, then click on the plus icon, then add the following role:

  • sap.hana.ide.roles::Developer

Click on the save button in the top menu bar

Please log in to access this content.
Step 3: Open the SAP HANA Web-based Development Workbench Catalog

Using the navigation menu bar icon, select Catalog.

The following screen should appear:

SAP HANA Web-based Development Workbench
Please log in to access this content.
Step 4: Create your user

Click on the SQL Console button in the top menu bar, and paste the following SQL code:

DROP USER HCPPSTRIAL CASCADE;
CREATE USER HCPPSTRIAL PASSWORD Welcome17Welcome17 NO FORCE_FIRST_PASSWORD_CHANGE;
ALTER USER  HCPPSTRIAL DISABLE PASSWORD LIFETIME;

call _SYS_REPO.GRANT_ACTIVATED_ROLE ('sap.hana.ide.roles::Developer','HCPPSTRIAL');

GRANT AFL__SYS_AFL_APL_AREA_EXECUTE TO HCPPSTRIAL;
GRANT AFLPM_CREATOR_ERASER_EXECUTE TO HCPPSTRIAL;

GRANT "CREATE SCHEMA" TO HCPPSTRIAL;

GRANT REPO.READ on "public" TO HCPPSTRIAL;
GRANT REPO.MAINTAIN_IMPORTED_PACKAGES on "public" TO HCPPSTRIAL;
GRANT REPO.MAINTAIN_NATIVE_PACKAGES   on "public" TO HCPPSTRIAL;

GRANT REPO.EDIT_NATIVE_OBJECTS   on "public" TO HCPPSTRIAL;
GRANT REPO.EDIT_IMPORTED_OBJECTS on "public" TO HCPPSTRIAL;

GRANT REPO.ACTIVATE_NATIVE_OBJECTS   on "public" TO HCPPSTRIAL;
GRANT REPO.ACTIVATE_IMPORTED_OBJECTS on "public" TO HCPPSTRIAL;

This script will delete any existing HCPPSTRIAL user including its related object and tables.

Click on the Logout Run button or press F8.

SAP HANA Web-based Development Workbench Login
Please log in to access this content.
Step 5: Verify that your user is properly created

Click on the Logout Logout icon located in the top right corner of the screen.

SAP HANA Web-based Development Workbench Login

Now, you need to connect with your HCPPSTRIAL HANA User Account.

Enter HCPPSTRIAL as Username user name and Welcome17Welcome17 as Password, click on Logon.

If you can login, then your HANA User Account is properly configured.

Please log in to access this content.

Next Steps

Updated 06/06/2017

Time to Complete

5 minutes

Beginner

Prerequisites

Next
Back to top