Unix Technical Forum

dbi_link and dbi:ODBC

This is a discussion on dbi_link and dbi:ODBC within the Pgsql General forums, part of the PostgreSQL category; --> I have the following problem getting to connect a remote database (MS SQL Server in my case) to PostgreSQL. ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:20 AM
Hermann Muster
 
Posts: n/a
Default dbi_link and dbi:ODBC

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:ODBCRIVER=SQL Native
Client;Server=192.168.10.175;Database=Test;Uid=sa; Pwd=test;MARS_Connection=yes;LongReadLen=8000;Long TruncOk=1',
'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;Long TruncOk=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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:21 AM
David Fetter
 
Posts: n/a
Default Re: dbi_link and dbi:ODBC

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:ODBCRIVER=SQL Native Client;Server=192.168.10.175;Database=Test;Uid=sa; Pwd=test;MARS_Connection=yes;LongReadLen=8000;Long TruncOk=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;Long TruncOk=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@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com

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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:53 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com