Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problems Connecting Debian --> MSSQL through odbc

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problems Connecting Debian --> MSSQL through odbc
  • Date: Thu, 16 Jul 2009 17:31:17 +0200

Could you also try

TDSDUMP=stderr isql TEST admin pass

where TEST is your DSN, admin your account and pass your password ??

freddy77


Il giorno gio, 16/07/2009 alle 17.17 +0200, Jaap van Arragon ha scritto:
> Thank you.
>
> SERVER:~# TDSDUMPCONFIG=stderr TDSDUMP=stderr \
> > sh -x ./osqlscript.sh -S TEST -U admin -P pass
> ++ basename ./osqlscript.sh
> + USAGE='Syntax: osqlscript.sh -S server -U user -P password'
> + getopts I:S:U:P: OPTION
> + case ${OPTION} in
> + DSN=TEST
> + getopts I:S:U:P: OPTION
> + case ${OPTION} in
> + USERNAME=admin
> + getopts I:S:U:P: OPTION
> + case ${OPTION} in
> + PASSWORD=pass
> + getopts I:S:U:P: OPTION
> + '[' -z TEST -o -z admin -o -z pass ']'
> ++ command -v isql
> + ISQL=/usr/bin/isql
> + '[' -z /usr/bin/isql ']'
> ++ strings /usr/bin/isql
> ++ grep '^/'
> ++ grep -v elf
> ++ grep -v '\.so\.'
> ++ head -1
> ++ sed 's/lib$/etc/'
> + ISQL_DIR=
> ++ basename ./osqlscript.sh
> + INI_DIRNAME=/tmp/osqlscript.sh.16985
> + exec
> + '[' -z '' ']'
> + echo 'checking shared odbc libraries linked to isql for default
> directories...'
> checking shared odbc libraries linked to isql for default directories...
> + echo
> + ldd /usr/bin/isql
> + awk '/[-]lodbc/ {print $3}'
> + read L
> + strings ''
> strings: '': No such file
> + grep '^/'
> + grep -v /lib
> + read D
> + read L
> ++ cat /tmp/osqlscript.sh.16985
> + ODBC_DIR=
> + rm /tmp/osqlscript.sh.16985
> + '[' -z '' -a -z '' ']'
> ++ basename ./osqlscript.sh
> ++ command -v isql
> + echo 'osqlscript.sh: problem: no potential directory strings in
> "/usr/bin/isql"'
> osqlscript.sh: problem: no potential directory strings in "/usr/bin/isql"
> ++ basename ./osqlscript.sh
> + echo 'osqlscript.sh: advice: use "osql -I DIR" where DIR unixODBC\'\''s
> install prefix e.g. /usr/local'
> osqlscript.sh: advice: use "osql -I DIR" where DIR unixODBC\'s install
> prefix e.g. /usr/local
> + echo 'isql strings are:'
> isql strings are:
> + strings /usr/bin/isql
> + grep '^/'
> + sed 's/^/+ /'
> + /lib/ld-linux.so.2
> + '[' '' ']'
> + echo 'checking odbc.ini files'
> checking odbc.ini files
> + for F in '"${HOME}/.odbc.ini"' '"${ODBC_DIR}/odbc.ini"'
> ++ dirname /root/.odbc.ini
> + '[' '!' -d /root ']'
> + '[' -r /root/.odbc.ini ']'
> + echo ' reading' '"/root/.odbc.ini"'
> reading "/root/.odbc.ini"
> + grep '[TEST]' /root/.odbc.ini
> + '[' 0 -eq 0 ']'
> + echo '[TEST]' found in '"/root/.odbc.ini"'
> [TEST] found in "/root/.odbc.ini"
> + ODBC_INI=/root/.odbc.ini
> + break
> + '[' -z /root/.odbc.ini ']'
> + echo found this section:
> found this section:
> + SED_CMD='/^\[TEST\]/,/^[[:space:]]*$/ { s/^/ /; p; }'
> + sed -ne '/^\[TEST\]/,/^[[:space:]]*$/ { s/^/ /; p; }' /root/.odbc.ini
> [TEST]
> Driver = FreeTDS
> #Driver = /usr/lib/odbc/libtdsodbc.so
> Description = A good description of your DB
> Trace = Yes
> Server = [10.10.10.51]
> Port = 1433
> TDS_Version = 7.0
>
> + for D in '"${DSN}"' ''\''default'\'''
> + echo 'looking for driver for DSN [TEST]'
> looking for driver for DSN [TEST]
> + grep TEST /root/.odbc.ini
> + '[' 0 -eq 0 ']'
> + CMD='/^\[TEST\]/,/^[[:space:]]*$/ { s/^/ /; p; }'
> ++ sed -ne '/^\[TEST\]/,/^[[:space:]]*$/ { s/^/ /; p; }' /root/.odbc.ini
> ++ grep -Ei '^[[:space:]]*driver[[:space:]]*='
> + DRIVER_LINE=' Driver = FreeTDS'
> + '[' -z ' Driver = FreeTDS' ']'
> ++ echo Driver = FreeTDS
> ++ awk -F = '{print $2}'
> ++ sed 's/[[:space:]][[:space:]]*//g'
> + DRIVER=FreeTDS
> + '[' FreeTDS ']'
> ++ basename /root/.odbc.ini
> + echo 'driver "FreeTDS" found for [TEST] in .odbc.ini'
> driver "FreeTDS" found for [TEST] in .odbc.ini
> + break
> + '[' -z FreeTDS ']'
> + echo found driver named '"FreeTDS"'
> found driver named "FreeTDS"
> + '[' '!' -r FreeTDS ']'
> + DRIVERNAME=FreeTDS
> + ODBC_INST=/odbcinst.ini
> + echo 'FreeTDS is not a readable file'
> FreeTDS is not a readable file
> + echo 'looking for entry named [FreeTDS] in /odbcinst.ini'
> looking for entry named [FreeTDS] in /odbcinst.ini
> + grep FreeTDS /odbcinst.ini
> grep: /odbcinst.ini: No such file or directory
> + '[' 2 -ne 0 ']'
> + '[' 0 -eq 1 ']'
> + exit 1
>
>
>
> On 7/16/09 5:10 PM, "Daniel Fazekas" <fdsubs AT t-online.hu> wrote:
>
> > On Jul 16, 2009, at 17:07, Jaap van Arragon wrote:
> >
> >>> Regarding (B), let's follow Frediano's suggestion:
> >>>
> >>> $ TDSDUMPCONFIG=stderr TDSDUMP=stderr \
> >>> isql -v svr usr pwd
> >> OPTION 1:
> >> SERVER:~# TDSDUMPCONFIG=stderr TDSDUMP=stderr
> >> SERVER:~# isql -v TEST admin pass
> >
> > You missed the slash \ at the end of the TDSDUMP line.
> > This way your enviromental variables are meaningless since they are
> > not exported.
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page