freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] NT Authentication with Named Instances
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] NT Authentication with Named Instances
- Date: Fri, 14 Aug 2009 16:12:43 +0200
Il giorno mar, 11/08/2009 alle 12.20 -0400, Anon Ymous ha scritto:
> Hello FreeTDS enthusiasts! I first would like to say that I love FreeTDS and
> the great connectivity it brings. I have a question for you all today, that
> I have been having a hard time with lately. I have a SQL Server 2000 server
> that I need to connect to via Linux FreeTDS. The server is in NT
> Authentication mode only, and is using a named instance on port 4433. The
> sql server is not connected to a domain, and can't be. The account I am
> using to login is a local user on the server. Unfortunately, I cannot have
> anything changed on the server, so I'm trying to work with what I have been
> given. I am trying to connect using Perl's DBI:ODBC connection. For
> reference, here is my DSN, (substituted localhost for real ip)
>
> my $host = '127.0.0.1\InstanceName';
> my $usr = 'HostName\UserName';
> my $pw = 'Password';
> my $dsn =
> DRIVER=/usr/local/lib/libtdsodbc.so;SERVER=$host;PORT=4433;DATABASE=DataBase;UID=$usr;PW=$pw;TDS_Version=8.0";
> my $dbh = DBI->connect('DBI:ODBC:'.$dsn) || die $DBI::errstr;
>
It's PWD=, not PW=, also PORT is useless in this case. Use either PORT
or instance!
> I keep getting the error, "Login failed for user '(null)'. Reason: Not
> associated with a trusted SQL Server connection." I read the guide talking
> about this, http://www.freetds.org/userguide/domains.htm, but the server is
> set at "Send LM & NTLM - use NTLMv2 session secuiryt if negotiated". Here
> are my conf files.
>
> *odbc.ini*
> [ODBC Data Sources]
> VOIP
> [VOIP]
> Driver = FreeTDS
> Description = Connection to the new voip DB
> Trace = No
> Server = 127.0.0.1
> Port = 4433
> Database = databasename
> [Default]
> Driver = FreeTDS
>
You used a odbc.ini-less configuration so these informations are not
used.
> *freetds.conf*
> [VOIP]
> host = 127.0.0.1
> instance = CRSSQL
> port = 4433
> client charset = UTF-8
> tds version = 8.0
>
not used, use port or instance.
> *odbcinst.ini*
> [FreeTDS]
> Description = FreeTDS Driver
> Driver = /usr/local/lib/libtdsodbc.so
>
Having these lines you can use
my $dsn ="DRIVER=FreeTDS;SERVER=$host;PORT=4433;DATABASE=DataBase;UID=
$usr;PWD=$pw;TDS_Version=8.0";
>
> I can connect remotely by creating a user on my local windows maching that
> matches the sql server user, and using Microsoft's Sql Server Management
> Studio. I am hoping someone can help me, as I have run clean out of ideas.
> My Google-fu seems to have failed me so far on this one.
You could even try post 0.82 patches (see
http://freetds.sourceforge.net/) which add support for NTLM2 or a
snapshot version.
bye
freddy77
-
[freetds] NT Authentication with Named Instances,
Anon Ymous, 08/11/2009
- Re: [freetds] NT Authentication with Named Instances, Mittel, Alexander, 08/12/2009
- Re: [freetds] NT Authentication with Named Instances, Frediano Ziglio, 08/14/2009
Archive powered by MHonArc 2.6.24.