SAP HANA Express Getting Started: Unterschied zwischen den Versionen

Aus MattWiki
Keine Bearbeitungszusammenfassung
Zeile 85: Zeile 85:
'''Root Cause'''
'''Root Cause'''


User name OPENSAPHANA_OPENSAPHANA_HDI_CONTAINER_1#OO was created in a different tenant database, i.e. SYSTEM instead of HXE.
The HXE tenant database has to be activated and mapped as default in the VM first. If this is not the case any created projects will create users in SYSTEM database instead of the development tenant database.


'''Fix'''
'''Fix'''


 
No fix known besides to dropping the VM entirely and setup again and following the steps above [[#Setup_Environment|Setup_Environment]]


=== Build of DB fails  ===
=== Build of DB fails  ===

Version vom 2. November 2020, 22:32 Uhr

This page contains instructions on how to set up SAP HANA Express Edition Virtual Machine for development and use of SAP training material.

Applies to SAP HANA Express Edition 2.0 SPS03 and SPS03

Most important step in order to prevent build errors afterwards is to Activate Tenant Database

Setup Environment

Activate Tenant Database

  • Login to SAP HANA XS Advanced Cockpit, probably at https://hxehost:51036/cockpit#/xsa/overview
  • Go to Tenant Databases
  • For Tenant Database HXE Click on Button Activate -> Enter Master Password
  • Map Database to Organization HANAExpress and Space development. Activate default checkbox
  • Click Save

Database Explorer

Add System Database

  • Login to SAP HANA Cockpit at https://hxehost:39030/go/hana-cockpit or https://hxehost:51045/cockpit#Shell-home (Use XSA_ADMIN)
  • Go to: Resource Directory -> SystemDB@HXE
  • Look at tile "Overall Database Status" and note server name and instance number
  • Login to SAP Web IDE (Use XSA_DEV)
  • Go to Database Explorer and click on "+"
  • Select Database Type SAP HANA Database
  • Enter values as follows:
    • Host -> server name noted above
    • Identifier -> Instance number -> instance number noted above
    • User -> System
    • Passwort -> Master Password
  • Click on OK

Add Tenant Database

Web IDE

Clone Project

  • Clone from desired repository
  • Open Project Settings -> Open section Space
  • Set space to development
  • Click on Save


Install Demodata

SFLIGHT

Source: https://blogs.sap.com/2018/12/18/howto-import-sflight-sample-data-into-sap-hana-from-a-local-computer/



Build zunächst user-db dann die core-db / db.


Trouble Shooting

Build of DB fails with invalid user name

Error Message

Using grantor service "ServiceName_1" of type "sql" Error: Error executing: GRANT "SFLIGHT_CONTAINER_ACCESS" TO "OPENSAPHANA_OPENSAPHANA_HDI_CONTAINER_1#OO"; (nested message: invalid user name: OPENSAPHANA_OPENSAPHANA_HDI_CONTAINER_1#OO: line 1 col 37 (at pos 36)) grantor service: "ServiceName_1", type: "sql", user: "CUPS_SFLIGHT" file name: cfg/SFLIGHT.hdbgrants

Root Cause

User name OPENSAPHANA_OPENSAPHANA_HDI_CONTAINER_1#OO was created in a different tenant database, i.e. SYSTEM instead of HXE.

The HXE tenant database has to be activated and mapped as default in the VM first. If this is not the case any created projects will create users in SYSTEM database instead of the development tenant database.

Fix

No fix known besides to dropping the VM entirely and setup again and following the steps above Setup_Environment

Build of DB fails

Error Message

20:27:30 (DIBuild) Processing "cfg/central.hdbgrants"... ok Processing "cfg/user.hdbgrants"... Using grantor service "hdi-user-service" of type "hdi" Granting schema roles in the container "OPENSAP_HANA_USER_00_1" and the parameters "[]"... Granting the schema role "user#" to the principal "OPENSAPHANA_OPENSAPHANA_DB_HDI_CONTAINER_1#OO" in the schema "" with grant option = "false" Error: Database error 389: : invalid role name: user#: line 1 col 7 (at pos 6) [8201003] Error: Granting schema roles in the container "OPENSAP_HANA_USER_00_1" and the parameters "[]"... failed [8214221]Error: Error executing: CALL "OPENSAP_HANA_USER_00_1#DI".GRANT_CONTAINER_SCHEMA_ROLES(#CONTAINER_ROLES, #CONTAINER_ROLES_PARAMETERS, ?, ?, ?); (nested message: HDI call failed)grantor service: "hdi-user-service", type: "hdi", user: "OPENSAP_HANA_USER_00_1_BVB0FJGXOQE559VFZERVZC3S1_DT" (hdi_user)file name: cfg/user.hdbgrants

Root Cause

Missing User DB.

Fix

Build User DB first.