Re: dbi_link and dbi:ODBC

From: David Fetter <david(at)fetter(dot)org>
To: Hermann Muster <Hermann(dot)Muster(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dbi_link and dbi:ODBC
Date: 2008-02-28 10:01:13
Message-ID: 20080228100113.GA24707@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Feb 26, 2008 at 04:07:23PM +0100, Hermann Muster wrote:
> I have the following problem getting to connect a remote database (MS SQL
> Server in my case) to PostgreSQL.
>
> I'm using SQL Server 2005 Express Edition. I tried it with the following:
>
> SELECT dbi_link.make_accessor_functions(
> 'dbi:ODBC:DRIVER=SQL Native Client;Server=192.168.10.175;Database=Test;Uid=sa;Pwd=test;MARS_Connection=yes;LongReadLen=8000;LongTruncOk=1',

Hermann,

I haven't tested MS SQL Server with the ODBC driver, but I have used
FreeTDS to good effect with that DBMS. If you have a test setup I can
use to diagnose this, that would be great. I have some time this
weekend. Let me know off-list.

By the way, you'll probably want to file a bug report against DBI-Link
<http://pgfoundry.org/projects/dbi-link/> and join the DBI-Link
mailing list to discuss this, as that's a more appropriate forum for
such discussions :)

Cheers,
David (author of DBI-Link)
> 'sa',
> 'test',
> '---
> AutoCommit: 1
> RaiseError: 1
> LongReadLen: 8000
> LongTruncOk: 1
> ',
> NULL,
> NULL,
> NULL,
> 'Solution'
> );
>
> Unfortunately, I can't get it to work. The following errors occur. Any idea
> about that?
>
> ERROR: error from Perl function: error from Perl function: DBI
> connect('DRIVER=SQL Native
> Client;Server=192.168.10.175;Database=Test;Uid=sa;Pwd=test;MARS_Connection=yes;LongReadLen=8000;LongTruncOk=1','sa',...)
> failed: [Microsoft][SQL Native Client]Named Pipes-Provider: A connection to
> SQL Server couldn't be established [2]. (SQL-08001)
> [Microsoft][SQL Native Client]Logintimeout expired. (SQL-HYT00)
> [Microsoft][SQL Native Client]Invalid attribute for the connection string
> (SQL-01S00)
> [Microsoft][SQL Native Client]Error with extablishing connection to server.
> (SQL-08001)(DBD: db_login/SQLConnect err=-1) at line 37 at line 35.
> SQL Status:XX000
>
> P.S. I translated the above messages from german, so it's not exactly the
> same message than the english SQL Server.
>
> Thanks for your help. :-)
>
> Regards.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2008-02-28 11:28:04 Re: debug nonstandard use of \\ in a string literal
Previous Message Richard Huxton 2008-02-28 09:53:26 Re: on update, how to change the value?