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:
dnf search gcc
selected one of them and installed:
dnf install gcc.x86_64
Now I could to proceed with configure:
./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.
That error is much easier to solve. As my installation was done on root account, the Sybase variables where not set, This will be solved by command (use correct path to SYBASE.sh as it is in your installation):
. /opt/sap/SYBASE.sh
and now the third trial of configure
./configure
configure: Completed successfully. Please run 'make clean && make' to build sqsh.
Good sign :) The next step is make:
make
Unfortunatelly, error was thrown again:
/include -I/usr/local/include -DSYB_LP64 -c -o cmd_do.o cmd_do.c
In file included from cmd_do.c:40:0:
sqsh_readline.h:29:31: fatal error: readline/readline.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'cmd_do.o' failed
This error states that the source code for the package readline is not available. Source packages have the "devel" in the name of the package. So i first looked at available packages:
dnf provides readline
and next installed those two:
dnf install readline-6.3-6.fc23.x86_64
dnf install readline-devel-6.3-6.fc23.x86_64
Time to try the make again:
make
This time no errors appeared, so I could continue with the installtion:
make install
Good - time to test! To start sqsh command like this one should be executed:
sqsh -Usa -SSAP01 -PPassw0rd
If during the start error like this one should be recorded:
sqsh: error while loading shared libraries: libsybblk64.so: cannot open shared object file: No such file or directory
than - you forgot to define the SYBASE variables. Execute just again (use correct path to SYBASE.sh as it is in your installation):
. /opt/sap/SYBASE.sh
To display basic help run:
sqsh --help
To read more detailed manual see:
Thank you Łukasz for sharinng!
Exams4sure is the best and authentic website to clear the iSQI CTAL-TAE exam on the first attempt. They have the best study material related to iSQI Certification. They have a professional team to deal with the clients very well. Exams4sure offers $$15 discount today to get this offer please visit Eaxms4sure.com.
ReplyDeleteCTAL-TAE Questions Answers