How to Create SAP HANA Database user
Objective : We want to create a HANA user using HANA studio and assign a role “ABAP_ADMIN” to this new user.
Prerequisite: You need HANA user with the system privilege USER ADMIN assigned.
Steps :How to create SAP HANA user using HANA Studio.
1. Login to HANA Studio with user having system privilege USER ADMIN.
2. Open the Administration Console and select the HANA system.
3. Expand the system as shown below and right click on “Users” and select “New User“
4. Enter the details as shown below.
5. To assign a existing role press the “plus” icon , highlighted above.
6. Select from the list of available roles.In our case we are selecting “ABAP_ADMIN“.
7. Now you can press the highlighted green arrow to create user.
Steps :How to create SAP HANA user using SQL Console.
We can also execute all these steps using the SQL also.
PFB sample SQL to create user , assign role , provide read access to schema “SAPXYZ” and assign read access to package.
CREATE USER PRAM PASSWORD XYZPassword; //This wll create user PRAM with password : XYZPassword
GRANT SELECT ON SCHEMA SAPXYZ TO PRAM; //This will grant read access to SAPXYZ schema to user
GRANT ABAP_ADMIN TO PRAM; //This will assign ABAP_ADMIN role to user
GRANT REPO.READ ON “xyz-package” TO PRAM; //This will give read access to package name ‘xyz-package ‘ to user.
GRANT EXECUTE ON REPOSITORY_REST TO PRAM; //This will give authorization to expand the “Content” folder to view the package.