[Zope] How to connect to Sybase using ZSybaseDA

A J Wilson ajwilson@ezy.net.au
Mon, 26 Jul 1999 12:02:13 +1000


It appears that I was using the Host Name instead of the Server Name.  I
have finally got the first signs of life out of it.

Many Thanks
Austin

----- Original Message -----
From: Alexander Staubo <alex@mop.no>
To: Zope Mailing List (E-mail) <zope@zope.org>; 'A J Wilson'
<ajwilson@ezy.net.au>
Sent: Monday, July 26, 1999 11:31 AM
Subject: RE: [Zope] How to connect to Sybase using ZSybaseDA


> Remember that server name != host name. Sybase distinguishes between the
> identifier of the database server and the machine running the server.
> Afaik, there's no way to tell ctsybase the host name, but I could be
> wrong there. Also note that the server name is case sensitive, so
> "Turtle" != "turtle".
>
> You might try isql:
>
> isql -U qawila1 -P figtree -S turtle
>
> ...should verify whether the parameters are correct as typed. If you
> find that you need to type:
>
> isql -U qawila1 -P figtree -S mysybase -H turtle
>
> ...which means "turtle" is the host name, and "mysybase" is the server
> name, then the host name is definitely part of the equation.
>
> --
> Alexander Staubo             http://www.mop.no/~alex/
> "QED?" said Russell.
> "It's Latin," said Morgan. "It means, So there you bastard."
> --Robert Rankin, _Nostramadus Ate My Hamster_
>
> >-----Original Message-----
> >From: A J Wilson [mailto:ajwilson@ezy.net.au]
> >Sent: 26. juli 1999 03:29
> >To: Alexander Staubo; Zope Mailing List (E-mail)
> >Subject: Re: [Zope] How to connect to Sybase using ZSybaseDA
> >
> >
> >I tried to connect manually using the script suggested below.
> >The output is
> >shown below.  I would appreciate if someone could interprete
> >it for me and
> >advise how I might fix the problem.
> >
> >Many Thanks
> >Austin
> >
> >Python 1.5.1 (#10, Jul 25 1999, 07:21:22)  [GCC 2.7.2.3] on linux2
> >Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>>> import ctsybase
> >>>> c = ctsybase.ctsybase({'user': 'qawila1', 'password': 'figtree',
> >'server': 'turtle'})
> >Traceback (innermost last):
> >  File "<stdin>", line 1, in ?
> >SybaseError: ['failed to connect to server', ('client', 4, 84083715,
> >'ct_connect(): network packet layer:
> >internal net library error: Specified server name attribute
> >could not be
> >found', 0, '', 0, 'ZZZZZ')]
> >>>>
> >
> >----- Original Message -----
> >From: Alexander Staubo <alex@mop.no>
> >To: Zope Mailing List (E-mail) <zope@zope.org>; 'A J Wilson'
> ><ajwilson@ezy.net.au>
> >Sent: Monday, July 26, 1999 8:31 AM
> >Subject: RE: [Zope] How to connect to Sybase using ZSybaseDA
> >
> >
> >> Note that ZSybaseDA has a bug that keeps it from publishing errors
> >> correctly. Check the line number given in the traceback.
> >Verify that you
> >> login ID has access to the database and table.
> >>
> >> You can test this manually thus (replace user name,
> >password, server and
> >> database with real values):
> >>
> >> import ctsybase
> >> c = ctsybase.ctsybase({'user': 'bob', 'password': 'bob',
> >> 'server': 'MYSYB'})
> >> c.execute('use my_database')
> >>
> >> which should go through okay if it works, give you a (hopefully)
> >> human-readable error response if not.
> >>
> >> -- Alexander Staubo             http://www.mop.no/~alex/
> >> "Give me an underground laboratory, half a dozen atom smashers and a
> >> beautiful
> >> girl in a diaphanous veil waiting to be turned into a
> >chimpanzee, and I
> >> care
> >> not who writes the nation's laws." --S. J. Perelman
> >>
> >>
> >> -----Original Message-----
> >> From: A J Wilson [mailto:ajwilson@ezy.net.au]
> >> Sent: 25. juli 1999 22:33
> >> To: zope@zope.org
> >> Cc: rossl@med.usyd.edu.au
> >> Subject: Re: [Zope] How to connect to Sybase using ZSybaseDA
> >>
> >>
> >> I have a Sybase database which I can access through isql, MSAccess,
> >> Sybase Central etc.  When I tried to access it using the
> >ZSybaseDA using
> >> the connection string in the form [dbusername] [password]
> >[machinename]
> >> [databasename] I get an error saying "Invalid connection
> >string:".  Any
> >> other suggestions.
> >>
> >> Regards
> >> Austin
> >>
> >>
> >> >From: rossl@med.usyd.edu.au
> >> >Date: Sat, 24 Jul 1999 18:14:06 -0700
> >> >To: zope@zope.org
> >> >Subject: Re:  [Zope] How to connect to Sybase using ZSybaseDA
> >> >
> >> >try
> >> >[dbusername] [password] [machinename] [databasename]
> >> >
> >> >eg
> >> >
> >> >bob bobspass redhat1 zopestuff
> >> >
> >> >(Of course, you need to use the sybase utilities to make database
> >> zopestuff and accessible by bob using bobspass)
> >> >
> >>  ><003001bed623$61e130a0$0202a8c-@lalaland.net.au> wrote:
> >> o>riginal article:http://www.egroups.com/group/zope/?start=8450
> >> > Hi
> >> >
> >> > I managed to compile the ZSybaseDA under Redhat 5.1.  Now
> >I need help
> >> to connect to the database.  Zope is running on the same machine as
> >> >Sybase ASE.  Could someone please tell me the format for
> >the Database
> >> Connection String?
> >