After activating the sslenforce parameter in the hanadatabase, our attempts to connect to the hana database via hana studio were unsuccessful due to an “only secured connections are allowed” error. Here is one of the methods we employed to establish a secure connection with the hana database.

 

This change was implemented based on the information provided in the following SAP notes: https://launchpad.support.sap.com/#/notes/3168368 https://launchpad.support.sap.com/#/notes/2475246

 

Here are the steps we followed to establish a connection from SAP Hana Studio to the HANA DB.

  1. Export the Hana server certificate using sapgenpse as per note 2475246.export%20the%20server%20cert
  2. On the local windows machine, locate the Java home. Goto hana studio à help about hana studio àInstallation details and locate java.home.
    locate%20JAVA_HOMENavigate to $Java_homebin
    navigate%20to%20JAVA_HOME%5Cbin
  3. Execute the below command to create a keystore.keytool.exe -genkey -keystore “C:Tempcertificates.keystore” -keyalg RSA -dName “CN=Firstname Lastname, OU=HANA, O=SAP, C=DE” -alias local
    create%20a%20keystore
  4. Import the certificate into the keystore which was exported earlier in step 1 with below command.

    keytool -v -importcert -alias hana<sid> -file “C:Tempcertificatessapsid.crt” -keypass password -keystore .keystore -storepass password

    import%20the%20cert

    import the cert

     

  5. To list the certificates in the keystore execute the below command.
    keytool -v -list -keystore C:Program Filessaphdbstudiopluginscom.sap.ide.sapjvm.jre.win32.x86_64_110.8.0jrebin.keystore
  6. The keystore file will be generated in same $JAVA_HOMEbin directory. Copy the .keystore file to some temp directory for easy navigation.
  7. In the hana studio connect using ssl. Browse the keystore and provide the password.
    connect%20using%20SSL
    browse%20keystore
  8. We should be able to connect via SSL now. To confirm that we can see the lock symbol in the connections
    lock%20symbol%20in%20hana%20studio%20connection

Numerous blogs provide guidance on establishing SSL connectivity to Hana Database, and the following is one of the suggested methods. Any suggestions or feedback for improvements are greatly appreciated. Feel free to share your thoughts at the end of the blog post.

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x