PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "JAMES FELLEY" <felleyj at si dot edu>
Subject: Re: Problem with Sybperl installation
Date: Nov 23 2004 7:17PM

Michael's hints showed the way.  In fact, $SYBASE points to
 /opt/sybase as expected, but when I looked at the interfaces file
and decoded the hex values, I found that the interfaces file was
still pointing to the old server.  I changed the hex values to the
 correct ones, and now Sybperl works like a charm.
   Further investigation showed that Sybase had been placed
on the new machine, then the new machine was given the
IP address of the old machine, so Sybase users would never
know about the switch.  This was thought to only involve a
change in /etc/hosts, but now we know better:  the interfaces
file must be consistent as well.
   I have no idea why isql was working correctly,
even when I was specifying SYBASE as the server.  That may
be a question for another time
                             Jim

Jim Felley
OCIO
Smithsonian Institution

>>> Michael Peppler  11/23/04 08:43AM >>>
On Mon, 2004-11-22 at 21:52, JAMES FELLEY wrote:
> We recently moved from one Sun machine (running OS 2.9) to another. 
> Sybase was copied from one machine to the other, and I manually
> installed the /usr/local/perl (5.8.5) and sybperl-2.17.  Now a strange
> situation has been revealed:
>  
> 
> While testing the Sybperl module for read/write/delete abilities, it
> became apparent that while I was working on the new machine, the
> scripts were communicating with the old machine.  Numerous tests and
> running isql on each machine showed this to be the case.  When the old
> machine was turned off, Sybperl stopped working with the message:

>     DB-Library error:
> 
>         Unable to connect: SQL Server is unavailable or does not
> exist.

This is probably not linked with sybperl or perl, but rather with the
Sybase installation (and possibly with environment variables)

Things to check:

1. What does $SYBASE point to?
2. What does the $SYBASE/interfaces file look like?

You may want to check a minimal perl script, maybe something like:

#!/usr/local/bin/perl

use Sybase::DBlib;

print "SYBASE = $ENV{SYBASE}\n";
my $dbh = new Sybase::DBlib 'user', 'pwd', 'server';

(with correct values for user, pwd and server, of course).

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/ 
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or

long term contract positions - http://www.peppler.org/resume.html