|
|
sybperl-l Archive
Up Prev Next
From: scable at elmer dot tci dot com (Steve Cable)
Subject: Re: Login problems
Date: Sep 17 1997 3:29PM
Erich,
You can use dbsetifile ("/usr/syb10/interfaces");
to tell it how to find the interfaces file for the second server.
Steve
> From owner-sybperl-l@trln.lib.unc.edu Wed Sep 17 06:51 MDT 1997
> X-ListName: SybPerl Discussion List
> Warnings-To: <>
> From: "Erich Izdepski"
> To: SYBPERL-L@trln.lib.unc.edu
> Date: Wed, 17 Sep 1997 08:07:53 -0400
> Subject: Login problems
> MIME-Version: 1.0
>
>
> #!/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
>
>
>
|