1                      Welcome to SQSH version 2.5.16
2
3Contents of this README file:
4
51. Introduction
62. Next release
73. Bug reports
84. Prebuild packages
95. Build sqsh yourself
106. Known issues
11   6.1 Sqsh on Cygwin using FreeTDS
12   6.2 Sqsh on Solaris x86_64
137. Complete file list of the source package
14
15
161. Introduction
17   Sqsh (pronounced skwish) is short for SQSHell (pronounced s-q-shell),
18   and is intended as a replacement for the venerable 'isql' program supplied
19   by Sybase. It came about due to years of frustration of trying to do real
20   work with a program that was never meant to perform real work.
21
22   Sqsh is much more than a nice prompt, it is intended to provide much of the
23   functionality provided by a good shell, such as variables, aliasing,
24   redirection, pipes, back-grounding, job control, history, command
25   substitution, and dynamic configuration. Also, as a by-product of the
26   design, it is remarkably easy to extend and add functionality. Build and
27   linked with Sybase CT-Library you can use sqsh to connect to SAP Sybase ASE,
28   Sybase IQ, Replication Server and any other Open Server application that
29   supports the TDS protocol. Build and linked with FreeTDS you can also use
30   sqsh to connect to a Microsoft SQL server.
31
32   This is the latest release of the sqsh project, source file "sqsh-2.5.16.tgz"
33   that is basically the same as "sqsh-2.5.tgz", but is OCS-16_0 aware. So if
34   you want to build sqsh using a SAP OpenClient 16 installation, you will need
35   this version.
36   This README file contains some basic instructions on howto install sqsh on
37   your computer. You may read the manual file INSTALL for more details on the
38   installation process and any installation requirements. The file CHANGES
39   contains a comprehensive explanation of what is new in this and previous
40   releases. Both files can be found in the zipped tarball sqsh-2.5.16.tgz.
41
42   Happy sqsh-ing,
43   Martin W.
44
45
462. Next release
47   During the Isug-Tech 2014 in Atlanta from 14-17 April, the new SAP Sybase
48   ASE version 16.0 will be introduced. A new version of sqsh (sqsh-3.0) that
49   supports new features in the accompanying CT-Library will be released as
50   soon as possible but not later than June 2014.
51
52
533. Bug Reports
54   Please report any bugs or observations out of the ordinary to
55   https://sourceforge.net/p/sqsh/bugs/ or drop me an e-mail at
56   mailto:mwesdorp@users.sourceforge.net.
57
58
594. Prebuild packages
60   You can download a couple of binary packages from the Sourceforge website.
61   The packages can be found at:
62
63       https://sourceforge.net/projects/sqsh/files/sqsh/sqsh-2.5/
64
65       sqsh-2.5-el6.x86_64.syb157.tar.gz
66       sqsh-2.5-el5.x86_64.syb157.tar.gz
67       sqsh-2.5-1.el6.x86_64.x86_64.rpm
68       sqsh-2.5-1.el5.x86_64.x86_64.rpm
69
70   Currently there are four binary packages available for RHEL5 and RHEL6
71   type of servers, for example CentOS 5.10 and CentOS 6.5. The packages
72   with syb157 in the name requires a Sybase OpenClient 15.x installation and
73   a readline package installed as well.
74   You can install the package by unzipping and untarring the install files
75   in a temporary directory and run the install.sh script. For example:
76
77   $ cd /tmp
78   $ tar xzf ~/Downloads/sqsh-2.5-el6.x86_64.syb157.tar.gz
79   $ cd sqsh-2.5
80   $ ./install.sh
81
82   The script will ask you for the root installation directory of the package.
83   You can install the package in your home directory, e.g. /home/sybase, and
84   you don't need root authorization for this type of installation.
85
86   The rpm files require a freetds and a readline package present and can be
87   installed using the rpm package manager. The executable will be installed in
88   /usr/bin and documentation can be found in /usr/share/doc/sqsh-2.5.
89   With this binary you are also able to connect to a MSSQL server.
90
91   $ sudo rpm --install ~/Downloads/sqsh-2.5-1.el6.x86_64.x86_64.rpm
92
93   If you need a prebuild package for another OS or combination of Sybase or
94   FreeTDS with any other options included/excluded, please drop me an e-mail at
95   mailto:mwesdorp@users.sourceforge.net and I will see what I can do to support
96   your request.
97
98
995. Build sqsh yourself
100   Download the zipped tar ball from Sourceforge to your client computer, in the
101   ~/Downloads directory for example. Use GNU tar to install/unpack the source
102   package (executable usually just named tar or gtar). For example:
103
104      $ cd $HOME
105      $ mkdir src
106      $ cd src
107      $ tar xzf ~/Downloads/sqsh-2.5.16.tgz
108      $ cd sqsh-2.5
109
110   To install sqsh it basically comes to running configure and make.
111   See the INSTALL file for more details. There is a script conf.sh in the root
112   directory ($HOME/src/sqsh-2.5/conf.sh) that may help you to set some
113   appropriate compiler flags and choose options to build a 32bit or 64bit
114   version of sqsh (depending on your platform of course). Eventually sqsh will
115   be installed in /usr/local by default. If you want to change that, you can
116   use the --prefix option of configure just to change the default, for example:
117
118        ./configure --prefix=/opt/software
119
120   You can run "./configure --help" for more info on available options.
121   You will definitely want sqsh with readline support enabled, so you will need
122   to install a GNU Readline development package. As a matter of fact, sqsh-2.5
123   enables --with-readline=yes by default in 'configure'. If you don't want
124   Readline support you need to specify:
125
126   ./configure --with-readline=no # or --without-readline
127
128   Make sure your SYBASE environment variables contains the correct base path of
129   the SYBASE installation. To enable sqsh to connect to a Microsoft SQL server,
130   you need to compile and link against FreeTDS and the SYBASE variable must
131   contain the installation prefix path of Freetds (usually
132   export SYBASE=/usr/local).
133   After you have run the script conf.sh or ./configure, you can check and adapt
134   the Makefile, src/Makefile, src/sqsh_parser/Makefile and src/config.h that
135   are created by configure, to your needs.
136
137   Then you can run make, make install, make install.man etc. So, just do:
138
139       $ export SYBASE=/opt/sybase
140       $ ./conf.sh
141       $ make
142       $ sudo make install
143       $ sudo make install.man
144       $ man sqsh
145
146   Well, reading the manual page will keep you busy for a while. :-)
147   In the doc directory an example for a .sqshrc can be found
148   that you can copy to your $HOME directory. During start-up, sqsh reads
149   this file to load default values for variables that controls the
150   behavior of sqsh, or installs additional functions, commands or aliases.
151   For example:
152
153       $ cp doc/sqshrc-2.5 $HOME/.sqshrc
154       $ chmod 600 $HOME/.sqshrc
155       $ mkdir tmp $HOME/.sqsh
156       $ chmod 700 $HOME/.sqsh
157
158   This sqshrc file assumes a $HOME/tmp directory exists for work files
159   and a $HOME/.sqsh directory exists to store history and readline_history
160   files, and you can also provide a sqsh_session file here for runtime
161   adjustments during connection setup to a server.
162
163   PLEASE NOTE, this sqshrc file sets a color prompt and text color, so
164   you have to make sure that the color scheme fits your terminal settings.
165   Make sure that the directory where the sqsh executable is installed is in
166   your PATH (by default this would be /usr/local/bin). If everything succeeded
167   you can now start sqsh and provide a servername, username and password as
168   you would do with isql.
169
170       $ sqsh -SSYBASE -Usybdba
171       Password:
172       [1] SYBASE.sybdba.master.1>
173
174
1756. Known issues
176
1776.1 Sqsh on Cygwin using FreeTDS
178    If you want to build sqsh on a Cygwin environment using FreeTDS, you first
179    have to build and install FreeTDS. If you have Cygwin64 then it is
180    recommended to install the libraries into a specific lib64 directory,
181    /usr/local/lib64 for example, to distinguish the 64 bit libraries from the
182    32 bit libraries in /usr/local/lib. You need to specify this location with
183    the configure script using the --libdir parameter.
184    The sqsh configure script expects a libct.so file in the libdir, but as
185    Cygwin does not use .so files (but ultimately dll files), you have to fool
186    sqsh by creating a dummy libct.so file.
187
188    $ export CFLAGS="-g -O2 -Wall -m64"
189    $ export LDFLAGS="-s -m64"
190    $ cd ~/src/freetds-0.91
191    $ ./configure --libdir=/usr/local/lib64
192    $ make
193    $ make install
194    $ touch /usr/local/lib64/libct.so
195    $ cd ~/src/sqsh-2.5
196    $ export SYBASE=/usr/local
197    $ ./configure
198    $ make
199    $ make install
200
2016.2 Sqsh on Solaris x86_64
202    Building sqsh on a mixed 32 and 64 bit platform is a real challenge as the
203    sqsh configure script might find 32 bit libraries for crypt, iconv and
204    pthread while you are building a 64 bit sqsh executable. In some specific
205    circumstances these libraries might be needed and that is why 'configure'
206    looks for their availability. If there are no 64 bit counterparts for these
207    libraries then the linker might fail and the configure script itself might
208    fail. To overcome this issue you must temporarily rename the 32 bit
209    libraries to enable 'configure' and 'make' to run successfully.
210    On one of my servers I had a 32 bit libcrypt.so library in /usr/lib and a 64
211    bit libcrypt_i.so in /usr/lib/amd64. By creating a symbolic link, I was able
212    to link sqsh with the crypt library and thus enable the \lock command using
213    my unix password to unlock the session. Also creating a symbolic link to the
214    amd64 directory in /usr/local/lib will make life for configure easier,
215    especially when using a 64 bit FreeTDS libct.a in /usr/local/lib64.
216
217    $ cd /usr/lib/amd64
218    $ sudo ln -s libcrypt_i.so.1 libcrypt.so
219    $ cd /usr/local
220    $ sudo ln -s lib/amd64 lib64
221    $ cd /usr
222    $ sudo ln -s lib/amd64 lib64
223
224    I also had to add the compat keyword to the password entry in the
225    /etc/nsswitch.conf file (passwd: files compat) to enable the call to the
226    getspnam() function. If this function returns NULL then sqsh would show
227    the message: "\lock: Unable to get shadow password" when you try to lock
228    the session with the \lock command. Note that the file /etc/shadow needs to
229    be readable for the world in order for this feature to work. As that might
230    lead to security issues it is better to undefine the HAVE_SHADOW_H and
231    HAVE_CRYPT in the src/config.h file after 'configure' completes, to disable
232    this feature.
233    In a next release I will probably add some controls to 'configure' to
234    enable or disable the use of /etc/password and/or /etc/shadow with crypt
235    in order to lock/unlock your session.
236
237
2387. Complete file list of the source package
239
240   The files contained in this source distribution are:
241
242   sqsh-2.5/aclocal.m4
243   sqsh-2.5/AUTHORS
244   sqsh-2.5/autoconf/config.guess
245   sqsh-2.5/autoconf/config.sub
246   sqsh-2.5/autoconf/install-man
247   sqsh-2.5/autoconf/install-sh
248   sqsh-2.5/autoconf/mkinstalldirs
249   sqsh-2.5/ChangeLog
250   sqsh-2.5/CHANGES
251   sqsh-2.5/configure
252   sqsh-2.5/configure.in
253   sqsh-2.5/conf.sh
254   sqsh-2.5/COPYING
255   sqsh-2.5/cygwin/config.h
256   sqsh-2.5/cygwin/cygwin64-syb15.sh
257   sqsh-2.5/cygwin/cygwin.sh
258   sqsh-2.5/cygwin/cygwin-syb15.sh
259   sqsh-2.5/cygwin/libblk.a
260   sqsh-2.5/cygwin/libcs.a
261   sqsh-2.5/cygwin/libct.a
262   sqsh-2.5/cygwin/libsybblk64.a
263   sqsh-2.5/cygwin/libsybblk.a
264   sqsh-2.5/cygwin/libsybcs64.a
265   sqsh-2.5/cygwin/libsybcs.a
266   sqsh-2.5/cygwin/libsybct64.a
267   sqsh-2.5/cygwin/libsybct.a
268   sqsh-2.5/cygwin/Makefile
269   sqsh-2.5/cygwin/Makefile-syb15
270   sqsh-2.5/cygwin/Makefile-syb15-x64
271   sqsh-2.5/cygwin/README
272   sqsh-2.5/doc/buildman.sh
273   sqsh-2.5/doc/FAQ
274   sqsh-2.5/doc/global.sqshrc
275   sqsh-2.5/doc/README.bin
276   sqsh-2.5/doc/sample.sqsh_m4
277   sqsh-2.5/doc/sqsh.1
278   sqsh-2.5/doc/sqsh.html
279   sqsh-2.5/doc/sqsh.pod
280   sqsh-2.5/doc/sqshrc-2.5
281   sqsh-2.5/filters/README
282   sqsh-2.5/filters/stats
283   sqsh-2.5/INSTALL
284   sqsh-2.5/Makefile.in
285   sqsh-2.5/README
286   sqsh-2.5/ReleaseNotes
287   sqsh-2.5/scripts/install.sh.in
288   sqsh-2.5/scripts/make_dist.sh
289   sqsh-2.5/scripts/make_wrapper.sh.in
290   sqsh-2.5/scripts/wrapper.sh.in
291   sqsh-2.5/src/alias.h
292   sqsh-2.5/src/cmd_alias.c
293   sqsh-2.5/src/cmd_bcp.c
294   sqsh-2.5/src/cmd_buf.c
295   sqsh-2.5/src/cmd_connect.c
296   sqsh-2.5/src/cmd_do.c
297   sqsh-2.5/src/cmd_echo.c
298   sqsh-2.5/src/cmd_exit.c
299   sqsh-2.5/src/cmd_for.c
300   sqsh-2.5/src/cmd_func.c
301   sqsh-2.5/src/cmd_go.c
302   sqsh-2.5/src/cmd.h
303   sqsh-2.5/src/cmd_help.c
304   sqsh-2.5/src/cmd_history.c
305   sqsh-2.5/src/cmd_if.c
306   sqsh-2.5/src/cmd_input.c
307   sqsh-2.5/src/cmd_input.h
308   sqsh-2.5/src/cmd_jobs.c
309   sqsh-2.5/src/cmd_kill.c
310   sqsh-2.5/src/cmd_lock.c
311   sqsh-2.5/src/cmd_loop.c
312   sqsh-2.5/src/cmd_misc.c
313   sqsh-2.5/src/cmd_misc.h
314   sqsh-2.5/src/cmd_read.c
315   sqsh-2.5/src/cmd_reconnect.c
316   sqsh-2.5/src/cmd_redraw.c
317   sqsh-2.5/src/cmd_reset.c
318   sqsh-2.5/src/cmd_return.c
319   sqsh-2.5/src/cmd_rpc.c
320   sqsh-2.5/src/cmd_run.c
321   sqsh-2.5/src/cmd_set.c
322   sqsh-2.5/src/cmd_shell.c
323   sqsh-2.5/src/cmd_show.c
324   sqsh-2.5/src/cmd_sleep.c
325   sqsh-2.5/src/cmd_wait.c
326   sqsh-2.5/src/cmd_warranty.c
327   sqsh-2.5/src/cmd_while.c
328   sqsh-2.5/src/config.h.in
329   sqsh-2.5/src/dsp_bcp.c
330   sqsh-2.5/src/dsp.c
331   sqsh-2.5/src/dsp_conv.c
332   sqsh-2.5/src/dsp_csv.c
333   sqsh-2.5/src/dsp_desc.c
334   sqsh-2.5/src/dsp.h
335   sqsh-2.5/src/dsp_horiz.c
336   sqsh-2.5/src/dsp_html.c
337   sqsh-2.5/src/dsp_meta.c
338   sqsh-2.5/src/dsp_none.c
339   sqsh-2.5/src/dsp_out.c
340   sqsh-2.5/src/dsp_pretty.c
341   sqsh-2.5/src/dsp_vert.c
342   sqsh-2.5/src/dsp_x.c
343   sqsh-2.5/src/Makefile.in
344   sqsh-2.5/src/sqsh_alias.c
345   sqsh-2.5/src/sqsh_alias.h
346   sqsh-2.5/src/sqsh_args.c
347   sqsh-2.5/src/sqsh_args.h
348   sqsh-2.5/src/sqsh_avl.c
349   sqsh-2.5/src/sqsh_avl.h
350   sqsh-2.5/src/sqsh_buf.c
351   sqsh-2.5/src/sqsh_buf.h
352   sqsh-2.5/src/sqsh_cmd.c
353   sqsh-2.5/src/sqsh_cmd.h
354   sqsh-2.5/src/sqsh_compat.c
355   sqsh-2.5/src/sqsh_compat.h
356   sqsh-2.5/src/sqsh_config.h
357   sqsh-2.5/src/sqsh_debug.c
358   sqsh-2.5/src/sqsh_debug.h
359   sqsh-2.5/src/sqsh_env.c
360   sqsh-2.5/src/sqsh_env.h
361   sqsh-2.5/src/sqsh_error.c
362   sqsh-2.5/src/sqsh_error.h
363   sqsh-2.5/src/sqsh_expand.c
364   sqsh-2.5/src/sqsh_expand.h
365   sqsh-2.5/src/sqsh_fd.c
366   sqsh-2.5/src/sqsh_fd.h
367   sqsh-2.5/src/sqsh_filter.c
368   sqsh-2.5/src/sqsh_filter.h
369   sqsh-2.5/src/sqsh_fork.c
370   sqsh-2.5/src/sqsh_fork.h
371   sqsh-2.5/src/sqsh_func.c
372   sqsh-2.5/src/sqsh_func.h
373   sqsh-2.5/src/sqsh_getopt.c
374   sqsh-2.5/src/sqsh_getopt.h
375   sqsh-2.5/src/sqsh_global.c
376   sqsh-2.5/src/sqsh_global.h
377   sqsh-2.5/src/sqsh_history.c
378   sqsh-2.5/src/sqsh_history.h
379   sqsh-2.5/src/sqsh_init.c
380   sqsh-2.5/src/sqsh_init.h
381   sqsh-2.5/src/sqsh_job.c
382   sqsh-2.5/src/sqsh_job.h
383   sqsh-2.5/src/sqsh_main.c
384   sqsh-2.5/src/sqsh_parser/Makefile.in
385   sqsh-2.5/src/sqsh_parser/sqsh_parser.c
386   sqsh-2.5/src/sqsh_parser/sqsh_parser.h
387   sqsh-2.5/src/sqsh_parser/tsql.c
388   sqsh-2.5/src/sqsh_parser/tsql.h
389   sqsh-2.5/src/sqsh_parser/tsql.l
390   sqsh-2.5/src/sqsh_parser/tsql.y
391   sqsh-2.5/src/sqsh_parser/tsql.yy.c
392   sqsh-2.5/src/sqsh_readline.c
393   sqsh-2.5/src/sqsh_readline.h
394   sqsh-2.5/src/sqsh_sig.c
395   sqsh-2.5/src/sqsh_sigcld.c
396   sqsh-2.5/src/sqsh_sigcld.h
397   sqsh-2.5/src/sqsh_sig.h
398   sqsh-2.5/src/sqsh_stdin.c
399   sqsh-2.5/src/sqsh_stdin.h
400   sqsh-2.5/src/sqsh_strchr.c
401   sqsh-2.5/src/sqsh_strchr.h
402   sqsh-2.5/src/sqsh_test.c
403   sqsh-2.5/src/sqsh_tok.c
404   sqsh-2.5/src/sqsh_tok.h
405   sqsh-2.5/src/sqsh_varbuf.c
406   sqsh-2.5/src/sqsh_varbuf.h
407   sqsh-2.5/src/var_ctlib.c
408   sqsh-2.5/src/var_date.c
409   sqsh-2.5/src/var_debug.c
410   sqsh-2.5/src/var_dsp.c
411   sqsh-2.5/src/var.h
412   sqsh-2.5/src/var_hist.c
413   sqsh-2.5/src/var_misc.c
414   sqsh-2.5/src/var_passwd.c
415   sqsh-2.5/src/var_readline.c
416   sqsh-2.5/src/var_thresh.c
417   /* The end */
418