[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qmail-sql and MS SQL Server/ODBC Questions



Michael

I've got unixODBC and FreeTDS installed and I can use isql to connect to
the MSSQL server in the client's server room. I can modify the database
so I know that all the FreeTDS/ODBC settings are correct.

But ...

I cannot get qmail-getpw to connect to the server - I get an error from
FreeTDS which shows that it is trying to connect to localhost.

What should the connectstring look like in /var/qmail/control/sqlserver
for an ODBC connection? I've tried the name of the DSN in odbc.ini but
this doesn't work despite working for isql. Permissions and ownership on
sqlserver are correct.

Many thanks for your help

Philip


On Tue, 2004-03-30 at 23:24, Michael Devogelaere wrote:
> Hello Philip,
> 
> You should install the development-files of the unixODBC package on your 
> computer. With Redhat, this package is called something like unixodbc-devel.
> In sql.headers: options passed to the compiler to find the unixODBC-header
> files. Something like '-I/path/to/includes/unixodbc'.
> In sql.lib: unixODBC-library used by the linker. Something like
> '-L/path/to/libs -lodbc'.
> With RedHat, you can put an empty line in sql.headers. '-lodbc' should
> be enough for sql.lib.
> There is currently no further documentation about the ODBC-installation:
> you should definitely consult the official documentation about unixODBC and 
> how to install the Microsoft-driver. I think it's the same one as the
> sybase-driver ? For a related project i use the freetds-libraries to
> communicate with a microsoft sql-server. Those libraries implement the
> Sybase-protocol.
> 
> Regards,
> Michael.
> 
> On Mon, Mar 29, 2004 at 10:57:58PM +0100, Philip de Lisle wrote:
> > Hi
> > 
> > I've got a client who wants to use Qmail-sql with MS SQL Server.
> > 
> > Several questions:
> > 
> > 1. When I try to compile qmail I get missing header files (the 3 inside
> > the #ifdef SQLTYPE == UNIXODBCTYLE block in sql.h).
> > 
> > Where do I find these files? I don't have a copy of MS SQL Server (I'm
> > only a humble Linux users <g>), but the client probably has them if they
> > are part of the MS dev kit.
> > 
> > 2. What should go in sql.headers and sql.lib?
> > 
> > 3. What should go in s.lib in ./checkpassword-0.90?
> > 
> > 4. Are there any instructions for ODBC use that I've missed/can't find.
> > If not, are there any plans to write some? I can see more MS shops
> > starting to look at Linux MTAs going forward so this would be useful,
> > particularly as this client has a huge investment in triggers which
> > don't translate to MySQL or PostgreSQL and has to stay with the MS
> > server for the foreseeable future.
> > 
> > Many thanks in advance.
> > 
> > Philip
> > 
>