EDUCAÇÃO E TECNOLOGIA

Unable to connect remote source: Cannot establish JDBC connection. Error: SAP DBTech JDBC: [4321]: only secure connections are allowed

If you are new to SAP HANA Cloud, and you want to replicate some tables, there is already a nice blog post available for transferring of data from on-premise SAP HANA to SAP HANA Cloud using SDI.

However, I will cover in this blog post only a small portion of how you can update a remote store for SSL encryption. Mainly section 2.1 from above mentioned link.

Scenario

Your source database i.e. on-premise SAP HANA database server has got SSL encryption enabled for all connections. In this case, the remote source created on SAP HANA Cloud instance, also needs to be adjusted so that it can connect securely connect to on-premise SAP HANA DB.

If you try to open a virtual table, in this situation you may face below error :

Could not open 'SAPH2Q_VST'.'USR02'. Error: (dberror) [5921]: Unable to connect remote source: Cannot establish JDBC connection. Error: SAP DBTech JDBC: [4321]: only secure connections are allowed 

Steps to follow

  1. Open SQL console and suspend the remote source connection (Eg: VST_H2E in my case).
    ALTER REMOTE SOURCE VST_H2E Suspend Capture ; ALTER REMOTE SOURCE VST_H2E Suspend Distribution;​
  2. At Database Explorer, just do a single click on “Remote Sources”, then select the corresponding remote source name.

  3. Select the remote source and go to ‘Edit’ :
  4. In the Configurations tab, go to section ‘Connection Security’ & change the parameter ‘Enable SSL encryption’ as ‘true’ :
    Click on Save.
  5. Once the configuration is adjusted, open SQL console again and resume the remote source connection :
    ALTER REMOTE SOURCE VST_H2E Resume Capture; ALTER REMOTE SOURCE VST_H2E Resume Distribution;​
  6. Once done, refresh in database explorer catalog and try to open the virtual table again. It will work fine.

This is how, you can enable a secure connection between SAP HANA Cloud instance and an on-premise SAP HANA server.