Tuesday, September 5, 2017

Shell script Example


create file with following content
#!/bin/bash

echo "Hello"

save as  .sh

To chage the fileformat to unix
Open the file in vi editor
vi file_script.sh

In command mode type
:set fileformat=unix
:wq!

Give permission
chmod 755 file_script.sh


Run as
./file_script.sh

Data Provisioning in HANA

--------------- Document Processing Pipeline -----------------------

1. Install jdk on windows - \\inblr102\sapALL\Healthcare_LifeSciences\HPH Development\DPUMC\Developer Kit\Agent
2. Install Dp Agent - \\inblr102\sapALL\Healthcare_LifeSciences\HPH Development\DPUMC\Developer Kit\Agent\HANA_DP_AGENT_20_WIN_X86_64>hdbsetup.exe
Username - Global/i320726
Password - global_password

Copy jre folder in C:\usr\sap\dataprovagent and add the path of jre/bin to env variable path(name should be same jre)
3. Download Adapters Jar (Prefer Latest) - http://nexus.wdf.sap.corp:8081/nexus/content/repositories/deploy.snapshots/com/sap/hc/hph/di/JCO_HC_HPH_EIM/
4. Install Adapters -  Install EIM Adapters
a. Command prompt (Admin)
b. Access the Java_EIM_Adapters folder. Example->C:\Users\shals\Desktop\Adapters\JAVA_EIM_ADAPTERS
c. Run setup.bat file. Example->  C:\Users\shals\Desktop\Adapters\JAVA_EIM_ADAPTERS>setup.bat
5.First run the DP AGENT (C:\usr\sap\dataprovagent\dpAgent.exe) and Open the Config tool of DP Agent - C:\usr\sap\dataprovagent\configTool>dpagentconfigtool.exe. In HANA STUDIO under configuration (dademon.ini->dpserver->instances) make value to 1.
6. Click on 'Connect to HANA' -
a. HANA Hostname - DNS Name in monsoon (mo-4680a994c.mo.sap.corp)
b. HANA Port - 30015 (Dont change if its there)
c. HANA Admin User - Database user
d. HANA Admin Password - Database password
e. Click on Connect
7. Click on 'Register Agent' -
a. Agent Name - Any Name
b. Agent Hostname - Ip address of system (Open cmd and type 'ipconfig' and u will see the ipv4 address (10.52.102.179))

8. In the Adapter status select the adapter which is needed and click on Register Adapter. If you dont find the Adapter then Deploy Adapter manually.


--------------- Create Remote Source in HANA Studio ------------------------
1. Open Hana Studio (Make sure its in SAP HANA Development  Perspective)
2. Go to systems tab, and follow the hierarcy (SYSTEM->Provisioning->Remote Sources)
3. Right Click on 'Remote Sources' and click on 'New Remote Source'
a. Source Name - Any Name.
b. Adapter Name - Select the Adapter name (XML, BLOB etc)
Fill all the required parameters for the adapter.
Save the configuration.



Activation of files in HANA through Regi

1.Install hdbclient
2.Set the enviornment variable for hdbclient
3.$hdbuserstore SET <userstorename> <hanamachinehostname>:30015 <user> <password>
4.$regi create workspace myWorkspace --key=<userstorename>
5.$cd myWorkspace
6.$regi track package repository_package     //sap.hc.hph.custom
7.$regi checkout package repository_package
8. Do the modifications
7.$regi PUSH
This will take some time to finish.

Install HANA

Download SPS HANA revision.

Go to the hana installation location

cd /tmp/SPS10_Rev102_01/server/linuxx86_64/SAP_HANA_DATABASE

For a different version of HANA, change SPS10_Rev102_01

For uninstalling an existing instance : sudo ./hdbuninst
For installing a new instance : sudo ./hdbinst