In this article we will learn about
- What is PuTTY?
- How to use PuTTy to connect to HANA system?
- Run basic administration activities using Linux commands
What is PuTTY?
PuTTY is a free and open-source terminal emulator, serial console, and network file transfer application.
It allows Windows users to connect to remote systems over the Internet via Telnet and SSH.
While both Telnet and SSH allow you to connect to remote systems, SSH, supported in Putty, provides for a "Secure Shell", encrypting information before it is transferred. This way, it is harder for others to intercept passwords and other private information than if you were to just use Telnet.
SAP HANA and PuTTy:
SAP HANA is installed on a Linux system. We can use PuTTy as a client from a Windows system to connect to HANA.
Download PuTTy client:
You can download PuTTy from here
Connect to HANA using PuTTy:
- Open then putty.exe file. Specify the host id of HANA system as shown in image below and click on “Open”.
- Specify the HANA OS user and password.
- Sometimes the server might prompt a warning message that there could be some problem with security. Just ignore this and select “Yes”.
Done! You are now connected to HANA system.
Some example commands in PuTTy:
Now you can use different commands to check components, change configurations etc. Let us see some basic commands here.
The commands are case sensitive.
Change password for a user:
Check Server information:
SAP HANA Database Interactive Terminal (HDBSQL):
We can use command hdbsql to connect open interactive terminal and run SQL queries from PuTTy.
Enter the command hdbsql
Next step is login using a database user.
Enter the following command:
\c -i <instance no> -n localhost:<sql port> -u USER -p Password
\c -i 00 -n localhost 30015 -u SYSTEM -p Manager1
SQL port is 3 + <instance no of HANA> + 15
For example if the instance no is 02, then the SQL port will be 30215
Use hdbsql -h help to check different commands.