Skip to content

sybase

Connect

isql -S[db] -U[user] -P[password] -D[database]

Execute query from file to file output

cat << EOF >> input.sql
select * from tbl_template1
go
EOF

isql -SDB1 -Usa -PPassword -Ddbtest -s, -w 10000 -i input.sql -o output.txt
usage: isql [-b] [-e] [-F] [-p] [-n] [-v] [-W] [-X] [-Y] [-Q]
    [-a display_charset] [-A packet_size] [-c cmdend] [-D database]
    [-E editor] [-h header] [-H hostname] [-i inputfile]
    [-I interfaces_file] [-J client_charset] [-K keytab_file]
    [-l login_timeout] [-L textlimit] [-m errorlevel] [-M labelname labelvalue]
    [-o outputfile] [-P password] [-R remote_server_principal]
    [-s col_separator] [-S server_name] [-t timeout] [-U username]
    [-V [security_options]] [-w column_width] [-y sybase directory]
    [-z localename] [-Z security_mechanism] [-x trusted.txt_file]
    [--retserverror] [--conceal [wildcard]] [--appname application_name]
    [--history [p]length [--history_file file_name]] [--URP rempwstring]
    [--filemode outputfile_permission] [--help]