freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] Receive "Login failed for user '(null)'" Error
- From: Mark Segall <Mark.Segall AT morganstanley.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] Receive "Login failed for user '(null)'" Error
- Date: Mon, 01 Dec 2003 12:07:08 -0500
I am trying to use freetds (got latest tar) to connect to a SQL Server
7.0 database.
When I run tsql using my freetds.conf file, it connects fine.
However, when I try to connect under perl (using the same conf file), I
get the "Login failed for user '(null)'. Reason: not associated with a
trusted SQL Server connection" when I issue my connect.
Looking at other problems reported with this error, I would have thought
that this server is using domain login, but it is using SQL Server
login.
The conf parameters (besides the host, port, and dump file) are:
tds version = 7.0
tds server login = yes
tds domain login = no
In my perl, I have a wrapper script which (besides setting the freetds
conf file) exports to LS_LIBRARY_PATH the path /u/appname/freetds/lib
and exports to SYBASE the path for the Sybase interfaces file (if I set
to this, I can run w/o freetds.conf but get the same login error).
(Note that I have a wrapper script for tsql that sets SYBASE to the same
value)
In the perl routine I have the following statements:
use lib '/u/appname/freetds/lib';
use DBI;
use Sybase::DBlib;
$libpath=$ENV{LD_LIBRARY_PATH};
$dbh = DBI->connect($app_server, $app_user, $app_passwd) or die
$DBI::errstr;
$ dbh->do('use DBName');
Any ideas on why tsql works fine but using the DBI connect does not? I
have confirmed that the variables in the connect have the proper
values. The server value is actually set to
dbi:Sybase:server=appserver and appserver is an entry in the conf
file. I have confirmed in the dump that the proper server ip address
and port are being referenced. (If I just set the server value to
appserver, I get the error "Can't connect, no database driver specified"
- Mark
--
NOTICE: If received in error, please destroy and notify sender. Sender
does not waive confidentiality or privilege, and use is prohibited.
-
[freetds] Receive "Login failed for user '(null)'" Error,
Mark Segall, 12/01/2003
- <Possible follow-up(s)>
- RE: [freetds] Receive "Login failed for user '(null)'" Error, Lowden, James K, 12/01/2003
- [freetds] Receive "Login failed for user '(null)'" Error, Mark Segall, 12/01/2003
- RE: [freetds] Receive "Login failed for user '(null)'" Error, Lowden, James K, 12/01/2003
-
Re: [freetds] Receive "Login failed for user '(null)'" Error,
Mark Segall, 12/01/2003
- Re: [freetds] Receive "Login failed for user '(null)'" Error, James K. Lowden, 12/01/2003
Archive powered by MHonArc 2.6.24.