[freetds] Failing logins / instance ignored?

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Tue Dec 19 09:18:44 EST 2006


> 
> I apologize if this is a FAQ, but I tried googling for it, looking 
> through the mailing list, etc, and nothing seemed to help.
> 
> Here is what happens when I try to log in to a SQL server from Perl:
> 
> main::(../s/dbd.pl:13): my $dbh = DBI -> 
> connect('dbi:Sybase:MSSQL:server=hsldbYukon;database=IT',
> main::(../s/dbd.pl:14): 'itc','hidden')
> main::(../s/dbd.pl:15):     or die $DBI::errstr;
>   DB<1> n
> FreeTDS: config.c:461: ignoring unrecognized option 'instance'

instance is supported since 0.64.

> DBI connect('MSSQL:server=hsldbYukon;database=IT','itc',...) failed: 
> Server message number=18456 severity=14 state=1 line=0 
> text=Login failed 
> for user 'itc'.OpenClient message: LAYER = (0) ORIGIN = (0) 
> SEVERITY = 
> (78) NUMBER = (46)
> Message String: Login incorrect.
>  at ../s/dbd.pl line 13
>  at /usr/lib/perl5/DBI.pm line 638
>         DBI::__ANON__[/usr/lib/perl5/DBI.pm:687]('undef', 'undef') 
> called at /usr/lib/perl5/DBI.pm line 689
>         DBI::connect('DBI', 
> 'dbi:Sybase:MSSQL:server=hsldbYukon;database=IT', 'itc', 'hidden') 
> called at ../s/dbd.pl line 13
> Server message number=18456 severity=14 state=1 line=0 
> text=Login failed 
> for user 'itc'.OpenClient message: LAYER = (0) ORIGIN = (0) 
> SEVERITY = 
> (78) NUMBER = (46)
> Message String: Login incorrect.
>  at ../s/dbd.pl line 13
> 
> 
> So far I've ruled out having the wrong password (it is altered in the 
> above messages, but many other people use the same username password 
> combo to access that server, and I did double check it), some 
> kind of IP 
> related or firewall related problem on the server, and having an 
> outdated installation of freetds (I get the same results with 
> 0.63 and 
> the stable and the current version, and the latest snapshot).
> 
> All the versions return the line which I think may be the clue:
> 
> FreeTDS: config.c:461: ignoring unrecognized option 'instance',
> and CLOSE to line 461 in config.c I find the line that 
> >>seems<< to be 
> handling it.
> 

???

0.64:

./src/tds/config.c:465:         tdsdump_log(TDS_DBG_INFO1, "UNRECOGNIZED
option '%s'...ignoring.\n", option);

HEAD

./src/tds/config.c:510:         tdsdump_log(TDS_DBG_INFO1, "UNRECOGNIZED
option '%s' ... ignoring.\n", option);

You are probably using a former version.

> NB: I found the instance parameter in freetds docs.
> 
> Doing the troubleshooting steps from the manual, I get
> 
> tsql -H hsldb.hermes.si -p 1433 -U itc  (Note: no way to 
> specify instance?)
> 

tsql do not support instance name in parameters, you need to use
freetds.conf or specify port directly

> locale is "en_US.UTF-8"
> locale charset is "UTF-8"
> Password:
> Msg 18456, Level 14, State 1, Server , Line 0
> Login failed for user 'itc'.
> Msg 20014, Level 9, State 0, Server OpenClient, Line 0
> Login incorrect.
> There was a problem connecting to the server
> 
> Note that the message doesn't match the message I would get if the 
> server expected the domain login.
> 
> I'm lost.
> 
> 
> Here is the entry from /etc/freetds/freetds.conf
>  [hsldbYukon]
>         host = hsldb.hermes.si
>         tds version = 7.0
>         port = 1433
>         instance = YUKON
> 

Mmm.... instance is a way to specify a port, you should use one options.
If you are using mssql 2000 or 2005 you can use protocol 8.0

bye
  Frediano



More information about the FreeTDS mailing list