[Zope] SyBase connection problem

Chris McDonough chrism@digicool.com
Tue, 11 Jan 2000 19:12:18 -0500


Hung,

SybaseDAv2 takes all its information from the interfaces file.  As long
as you put a hostname in the server field and that hostname resolves to
the IP address that's listed in the interfaces file, it uses that
interfaces entry to access the database.  This also means that the port
it looks to on the server is the one that is specified within the
interfaces file.  Usually, you can just type the name you've defined in
the interfaces file into the server textbox within SybaseDAv2.

AFAIK, the interfaces file only controls the client library lookups, and
you'll need to go change the server port somewhere else (where, I don't
know).

Before you run Zope, in the start script you'll need to set the $SYBASE
environment variable to the  sybase home directory, and you'll need to
make sure that the /etc/ld.so.conf file lists $SYBASE/lib as a place to
find shared libraries.  If you add an entry to ld.so.conf, you'll need
to run ldconfig to reparse the ld.so.conf file.  This is on Linux.  On
solaris, you can define an environment variable ($LD_LIBRARY_PATH) that
points to the sybase lib dir.

If all is well with the world after that, you should be able to connect
to your database.

Hung Jung Lu wrote:
> 
> Hi,
> 
> I am new to Sybase.
> 
> I have installed the SybaseDAv2 product without
> problem on Zope, I can see it in the product list.
> But when I click on it, I get the following error:
> 
> Traceback (innermost last):
>   File "/usr/local/bs_zope_2000_01/lib/python/OFS/Application.py", line 387,
> in import_products
>     product=__import__(pname, global_dict, global_dict, silly)
>   File
> "/usr/local/bs_zope_2000_01/lib/python/Products/SybaseDAv2/__init__.py",
> line 90, in ?
>     import DA
>   File "/usr/local/bs_zope_2000_01/lib/python/Products/SybaseDAv2/DA.py",
> line 91, in ?
>     from db import DB
>   File "/usr/local/bs_zope_2000_01/lib/python/Products/SybaseDAv2/db.py",
> line 96, in ?
>     _context=sy_occ.cs_ctx_alloc()
> sy_occ.error: Could not connect to Sybase
> 
> The Sybase database itself is running, as I can see it from
> isql or from the ./showserver commands.
> 
> One immediate question is: does SybaseDAv2 assume a particular
> TCP/IP port number (like 4100 or 4002)? If so, how can I
> change that number? How can I change the the hostname and
> port number in general? In general, how does SybaseDAv2
> know what host and what port number the database is serving
> from? Is there any configuration file? How does one
> supply things like username and password in SybaseDAv2 to
> the Sybase database? Am I asking the right questions?
> 
> I have tried to tweak the "interfaces" file in Sybase
> itself so it serves at the port number 4100 or 4002, but
> neither choice improved the situation.
> 
> After installing the SybaseDAv2, what else do I need
> to do before I can start to create SQL methods?
> 
> thanks in advance,
> 
> Hung Jung
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Chris McDonough - Digital Creations, Inc.
Publishers of Zope - http://www.zope.org