[Zope] mini-HOWTO: connecting to SQL Server from Zope on Linux.

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Tue, 09 Feb 1999 15:05:10 +1100


Yay. After a fair amount of swearing at Sybase/MS documentation, I now have
a Zope installation on a Linux box that can access an MS SQL Server 6.5
running on an NT box alongside. 

Here's the steps I had to go through to make it work:

On the NT server: 
  Install SQL Server (I used 6.5, 7.0 may not work as it has further
diverged from Sybase). Make sure when you install that you select 'TCP/IP
socket' from the Network Options. Make a note of the port number (it
defaulted to 1433 here).
  Set up the database and the username that's meant to access the 
database.

On the linux box:
  Install Sybase ASE 11.0.3 for Linux. It's available from www.redhat.com,
amongst other places.
  Set up an entry in the 'interfaces' file. Mine looks something like

## tdata on fme.arbhome.com.au
##       Services:
##              query   tcp     (1433)

tdata
        query tcp ether fme.arbhome.com.au 1433

(the docs talk about using sybinit to do this - as far as I can tell,
sybinit is pretty bloody useless, and it's quicker to do this yourself.)

  Get the ctsybasemodule from http://starship.skyport.net/~pgodman/,
  install.
  Get ZSybaseDA from http://www.zope.org/Download/Contrib, install.

Create a new connection, using conn str "user password server database"
- in my case this was "tuser tpw tdata tdata" (as the database on the
NT server was also called tdata).

And then it just works (for me, anyway.)

Hope that this is useful for someone...

Anthony