Use iSQL to Connect to SAP ASE in SAP HANA Cloud
- How to create an interfaces file
- How to establish connection to an instance using isql
- You need to provision an SAP HANA Cloud, SAP ASE instance for use.
- You require a Linux OS to follow the instructions in this tutorial.
In this tutorial group, you will learn how to connect to your SAP HANA Cloud, SAP Adaptive Server Enterprise database.
There are a few tools you can use to access and connect to the database. With these programming interfaces and drivers, you can then query and manipulate the data available there.
In each tutorial of this tutorial group, you can learn how to connect using a different interface or driver:
- Step 1
Before you can connect to any SAP HANA Cloud, SAP ASE instance, you need to make sure the instance is running in SAP HANA Cloud Central.
Then, you need to make sure you have the SAP HANA Cloud, SAP ASE Client SDK drivers are installed in a Linux system. To learn more about this, check out our technical documentation. There you will find a description and the link to download the SDK.
Then, to set up a connection, you will need the SQL Endpoint of the instance. To get it, follow these steps:
- In SAP HANA Cloud Central, click on the three dots button on the right side of the row for your SAP ASE instance.
- In the drop-down menu, select SQL Endpoint. This is the host name that you need to enter in the interfaces file to connect with your client.
Now that your preparations are done, you can get started. In the coming steps, learn how to connect using isql.
You can either follow the steps below or watch this video:
- Step 2
To connect to your SAP ASE database in SAP HANA Cloud using isql, you must first create an interfaces file. To do that, you will need the SQL Endpoint of your instance.
Switch to your PuTTy session. Go to your Sybase directory to create the interface file. You can use any editor you wish, but in this example, you will see the use of Vi editor. Run the following command:Shell/BashCopy
Note that the file is initially empty. The first entry you need to create is the name of your instance. Here is an example:
- Since the instance is running remotely and not locally, you need to add a query line. Here is an example:
query tcp ether 1a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e.ase.hxtp.xxxxxxxxxxxxxx.com 443 ssl="CN=hanacloud.ondemand.com"
Delete the colon between the server and the port number of your SQL Endpoint and insert a space in between.
Save and exit.
- Step 3
To connect to the server, enter the following syntax:Shell/BashCopy
isql -Uaseadmin -S<DEMO_ASE_INSTANCE_NAME>
Provide your instance password once prompted.
You are now connected to your SAP ASE database instance in SAP HANA Cloud.
Now, you know how to connect to your instance using isql. In the next tutorial, you can learn how to connect to an SAP ASE database in SAP HANA Cloud using the Python Sybase Driver.
- Step 4
Fill in the Blank: <div> </div> Complete the following command used to connect to the server:<div> </div> isql ____________ -S [ASE_INSTANCE_NAME]