isql is a tool allowing to work with Sybase from command line, but it is not a very convenient tool. It is not possible to use history of commands and even command line editing doesn't work! Fortunately there are still hard-working programmers,who for free develop great tools!
This time I want to write about
sqsh that can be downloaded from:
https://en.wikipedia.org/wiki/Sqsh
The most important features that I like very much are:
- command line editing (you can use left & right arrows)
- history, that is saved even between sessions
- executing the commands after ";" (you don't have to type "go" - just end the query with ";" and it will run)
- compatibility in the scope of options with isql
The only part that makes some problems is, that to have it working you need to install it and the installation must be done starting with source code (BTW - this is also an advantage)
Installation step by step with all the problems that I have met:
Copy the sources and un-tar them:
tar xvf sqsh-2.5.16.1.tgz
This command will create a folder with source code. Change directory to it and execute a configure command:
./configure
In my case this resulted with error message:
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
So I needed to read the config.log file. I have found entry like:
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2244: checking build system type
configure:2258: result: x86_64-unknown-linux-gnu
configure:2278: checking host system type
configure:2291: result: x86_64-unknown-linux-gnu
configure:2467: checking for gcc
configure:2497: result: no
configure:2560: checking for cc
configure:2607: result: no
configure:2663: checking for cl.exe
configure:2693: result: no
configure:2717: error: in `/opt/sap/sqsh-2.5':
configure:2719: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Ok, so I needed to install compiler. I have found firt available compilers:
selected one of them and installed:
dnf install gcc.x86_64
Now I could to proceed with configure:
Unfortunately this ended with error again:
checking Open Client installation... no
configure: error: Unable to locate Sybase installation. Check your SYBASE environment variable setting.