-
Notifications
You must be signed in to change notification settings - Fork 126
sap hana guide
User can configure SAP HANA use case on local by creating VM on local machine and setting up SAP HANA database on it. In case, user do not have sufficient memory on local, user can setup VM remotely and configure SAP HANA database on it. Detailed requirement and procedure for setting up remote VM is provided at https://developers.sap.com/group.hxe-install-binary.html . In case, user choose to create VM remotely you can skop next 2 steps and start with Setting up Database for MTSJ .
-
Download VMware Workstation Player to run SAP Hana database https://www.vmware.com/in/products/workstation-player/workstation-player-evaluation.html
-
Install VMware and open. Using VMware browse check if you can find hxe.ova file. This file is not visible through windows explorer. This is the SAP Hana Express Edition image to be run inside VMware. If available open it in VMware. Otherwise, download Download Manager for SAP Hana from the link below. It may ask to register which is a simple process. https://www.sap.com/cmp/ft/crm-xu16-dat-hddedft/typ.html
-
Run the download manager and on the screen use the defaults and click download.
-
Once the .ova file has been opened inside VMware workstation. Click on the image and go to Edit Virtual Machine Settings. Set the memory allocation to 5GB. And Network Connection to NAT . NAT shows the IP for the virtual machine which will be used to establish JDBC connection
-
Click Play Virtual Machine. When first time the virtual machine runs it display following. Copy the IP address which will be used for JDBC connection
-
Type hxeadm, which is the username and hit Enter. Next it will ask for password which is HXEHana1. Once successfully logged in it will ask to set a new password. Choose a new password and remember.
-
You need to set Master password for SAP Hana database. Set it as you like and remember.
-
For “proceed with configuration” type y and hit Enter. Hana database has started in the background.
-
Try connecting with following command, replace the password with the master password
hxehost:hxeadm>hdbsql \c -d SYSTEMDB -n localhost:39013 -u SYSTEM -p <>
-
After you start Vmware, login with hxeadm as login and the password. At the prompt - hxehost:hxeadm>hdbsql Please note the IP address, that need to be put in mtsj java backend
-
On prompt hdbsql> type below to connect to the DB
\c -d SYSTEMDB -n localhost:39013 -u SYSTEM -p <password>
-
Type below query to see, if you have access to tenant database i.e. HXE
SELECT DATABASE_NAME, ACTIVE_STATUS FROM SYS.M_DATABASES ORDER BY 1;
Run the below for enabling the script server
ALTER DATABASE HXE ADD 'scriptserver'
To check if the script server is enable, execute below statement
SELECT SERVICE_NAME, PORT, ACTIVE_STATUS FROM SYS.M_SERVICES ORDER BY 1;
It should see the scriptserver in it.
-
Connect using the below
\c -d hxe -n localhost:39013 -u system -p <password>
-
To create a user
Create user hanauser1 password <password> no force_first_password_change
-
Grant below permission to the user
GRANT AFLPM_CREATOR_ERASER_EXECUTE TO hanauser1 GRANT AFL__SYS_AFL_AFLPAL_EXECUTE TO hanauser1 – here we have 2 underscore grant AFL__SYS_AFL_AFLPAL_EXECUTE_WITH_GRANT_OPTION to hanauser1 grant AFLPM_CREATOR_ERASER_EXECUTE to hanauser GRANT DATA ADMIN TO hanauser1 GRANT IMPORT TO hanauser1 GRANT EXECUTE on _SYS_REPO.GRANT_ACTIVATED_ROLE TO hanauser1 GRANT EXECUTE ON system.afl_wrapper_generator to hanauser1 GRANT EXECUTE ON system.afl_wrapper_eraser to hanauser1 GRANT MODELING TO hanauser1
-
Now connect to HXE tenant using below
\c -d hxe -n localhost:39013 -u hanauser1 -p <password>
-
Update application.properties file
# update the below
spring.flyway.locations=classpath:db/migration,classpath:db/specific/hana
# Add the below
spring.jpa.database=default
spring.jpa.database-platform=org.hibernate.dialect.HANAColumnStoreDialect
spring.datasource.driver-class-name=com.sap.db.jdbc.Driver
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
#Comment the below
#spring.profiles.active=h2mem
spring.profiles.active=hana
-
Update config/application.properties file
# update the below
spring.flyway.locations=classpath:db/migration,classpath:db/specific/hana
spring.datasource.url=jdbc:sap://ip:port/?databaseName=hxe
spring.datasource.username=username
spring.datasource.password=password
-
Update the following property in config file in my-thai-star\angular\src\app\core\config
enablePrediction: true,
-
Open console.bat
-
Go to folder > sappoc\my-thai-star\angular and type the below commands in following order
npm uninstall -g angular-cli @angular/cli
npm install -g @angular/cli
npm install
npm audit fix
npm run start
-
Update the config.ini with the corresponding details:
➢ Use the below query to find the SQL port of the indexserver:
SELECT SERVICE_NAME, PORT, SQL_PORT FROM SYS.M_SERVICES
➢ Update now the config.ini:
host = 192.168.188.128 (update this with your IP as done above)
port = 39015 – check this port it might be different
user = hanauser1
password = <password>
-
Next, open eclipse and run the SpringBootApp.java as Java Application.
-
We will use hana-my-thai-star-data-generator at https://github.com/SAP/hana-my-thai-star-data-generator .
-
Open the console.bat.
-
Go to the folder \hana-my-thai-star-data-generator and type the following command:
pip install -r requirements.txt
If pip is not part of your path run:
${devonfw-distribution}\software\python3\scripts\pip install -r requirements.txt
-
Last but not least, you need to run the following commands in the correct order:
➢ Go to dir \sappoc\hana-my-thai-star-data-generator\src ➢ Python address_generator.py ➢ Python main.py
After a while you will get the screen below.
-
-
Technical design
-
Data model
-
Server Side
-
Client Side
-
-
Security
-
Testing
-
Server Side
-
Client Side
-
End to end
-
-
UI design
-
CI/CD