Received: from mta07-svc.ntlworld.com (mta07-svc.ntlworld.com [62.253.162.47]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0P0tkl31815 for ; Thu, 24 Jan 2002 19:55:46 -0500 (EST) (envelope-from boylesa@roselink.co.uk) Received: from dualtower ([213.105.88.197]) by mta07-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20020125005549.HVBT6966.mta07-svc.ntlworld.com@dualtower>; Fri, 25 Jan 2002 00:55:49 +0000 Message-ID: <009301c1a53a$f6165730$c55869d5@dualtower> From: "Steve Boyle \(Roselink\)" To: "Oleg Lebedev" , "Postgres SQL Mailing List" References: <3C507907.5B012DCF@waterford.org> Subject: Re: linking from SQL Server Date: Fri, 25 Jan 2002 00:55:19 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200201/279 X-Sequence-Number: 6363 Oleg, I've just spent the last couple of hours trying to get this to work - with little success. I managed to create the linked server using both Enterprise manager and also Query Analyser using EXEC sp_dropserver 'Postgresql' EXEC sp_addlinkedserver 'Postgresql', 'Postgresql', 'MSDASQL', 'DATABASE=[dbname];SERVER=localhost;PORT=5432;A0=0;A1=6.4;A2=0;A3=0;A4=0;A5= 0;A6=;A7=100;A8=4096;A9=0;B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0; B9=0;C0=0;C1=0;C2=dd_' I generated the DSN above from a linked Access table (I've replaced my actual database name with [dbname] and it works when I test the connection string in Access. I tested the connection with: select * from postgresql...test select * from postgresql..test select * from postgresql.test (The documentation suggests that it wants a fully qualified table name so I tried all of the above in case there was some mapping taking place in any of the drivers). This reports that the linked server has been created but I cannot run SQL Server queries against it, and cannot find where I can get more details relating to the OLE DB errors produced. If anyone can get any further with pls post as I think it would open up some interesting possibilities. sb ----- Original Message ----- From: "Oleg Lebedev" To: "Postgres SQL Mailing List" Sent: Thursday, January 24, 2002 9:13 PM Subject: [SQL] linking from SQL Server > Hi, > I am wondering if anybody tried to link PostgreSQL tables/databases from > SQL Server. > As I understand SQL Server uses OLE DB for this kind of connections. I > wonder if this is possible at all with postgres. > thanks, > > Oleg > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >