|
|
sybperl-l Archive
Up Prev Next
From: "Erich Izdepski" <Izdepse at mail dot nrucfc dot org>
Subject: Login problems
Date: Sep 17 1997 12:07PM
#!/usr/local/bin/perl
use Sybase::DBlib;
######### Part One
$ENV{"SYBASE"} = "/usr/syb49";
$SQLUSR ="dummy";
$SQLPWD ="dummy_pass";
$SQLSRV ="SRV_1";
$SQLDB ="DB1";
print ("Logging in to SRV_1.\n");
$dbproc = Sybase::DBlib->dblogin($SQLUSR,$SQLPWD,$SQLSRV,$SQLDB);
# do sql stuff
$dbproc->dbclose;
########## Part Two
$ENV{"SYBASE"} = "/usr/syb10";
$SQLUSR ="user";
$SQLPWD ="user_pass";
$SQLSRV ="SRV_2";
$SQLDB ="DB2";
print ("Logging in to SRV_1.\n");
$dbh= Sybase::DBlib->dblogin($SQLUSR,$SQLPWD,$SQLSRV,$SQLDB);
# do sql stuff
$dbh->dbclose;
When I run code like the above, I get an error stating that the server name
for Part Two is not in the interfaces
files, which prevents logging on. If I run the code without Part One, I do
not get the error and everything
works fine. I've verified that all the server names are in the interfaces
files pointed to by the 'Sybase' environment
variable. It looks like dblogin, though, is using the path from Part One
when checking the interfaces file.
Any ideas?
Erich Izdepski
|