SQSH (SQshelL)

Description

Sqsh (pronounced skwish) is short for SQshelL (pronounced s-q-shell), and is intended as a replacement for the venerable ‘isql’ program supplied by Sybase. It came about due to years of frustration of trying to do real work with a program that was never meant to perform real work.

Sqsh is much more than a nice prompt, it is intended to provide much of the functionality provided by a good shell, such as variables, aliasing, redirection, pipes, back-grounding, job control, history, command substitution, and dynamic configuration. Also, as a by-product of the design, it is remarkably easy to extend and add functionality.

Usage

Syntax

sqsh [-a count] [-A packet_size] [-b] [-B] [-c [cmdend]] [-C sql]
          [-d severity] [-D database] [-e] [-E editor] [-f severity]
          [-G TDS version] [-h] [-H hostname] [-i filename] [-I interfaces]
          [-J charset] [-k keywords] [-K keytab] [-l level|flags]
          [-L var=value] [-m style] [-n {on|off}] [-N appname] [-o filename]
          [-p] [-P [password]] [-Q query_timeout] [-r [sqshrc]]
          [-R principal] [-s colsep] [-S server] [-t [filter]]
          [-T login_timeout] [-U username] [-v] [-V [bcdimoqru]] [-w width]
          [-X] [-y directory] [-z language] [-Z [secmech]]

Options

 -a  Max. # of errors before abort       -m  Set display mode
 -A  Adjust TDS packet size              -n  Set chained transaction mode
 -b  Suppress banner message on startup  -N  Set Application Name (sqsh)
 -B  Turn off file buffering on startup  -o  Direct all output to file
 -c  Alias for the 'go' command          -p  Display performance stats
 -C  Send sql statement to server        -P  Sybase password (NULL)
 -d  Min. severity level to display      -Q  Query timeout period in seconds
 -D  Change database context on startup  -r  Specify name of .sqshrc
 -e  Echo batch prior to executing       -R  Network security server principal
 -E  Replace default editor (vi)         -s  Alternate column separator (\t)
 -f  Min. severity level for failure     -S  Name of Sybase server ($DSQUERY)
 -G  TDS version to use                  -t  Filter batches through program
 -h  Disable headers and footers         -T  Login timeout period in seconds
 -H  Set the client hostname             -U  Name of Sybase user
 -i  Read input from file                -v  Display current version and exit
 -I  Alternate interfaces file           -V  Request network security services
 -J  Client character set                -w  Adjust result display width
 -k  Specify alternate keywords file     -X  Enable client password encryption
 -K  Network security keytab file (DCE)  -y  Override value of $SYBASE
 -l  Set debugging level                 -z  Alternate display language
 -L  Set the value of a given variable   -Z  Network security mechanism

Example

cyborg@cyborg:~$ sudo sqsh -S SERV -U user -P passwd -D db -L bcp_colsep=',' -m bcp \ -C 'select * from some_table where foo=bar' > /path/to/output.out

 

0 Comments

Leave a reply

CONTACT US

We're are building as a community and a team. Be a part of it.

Sending

©2017 Ztrela Knowledge Solutions Pvt. Ltd

Log in with your credentials

Forgot your details?