Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f2UEYgK53064 for ; Fri, 30 Mar 2001 09:34:42 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f2U6ANK68320 for ; Fri, 30 Mar 2001 01:10:23 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f2U5ef129325 for pgsql-sql@postgresql.org; Fri, 30 Mar 2001 00:40:41 -0500 (EST) (envelope-from news) From: Ian Harding X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Untitled Date: Thu, 29 Mar 2001 21:47:41 -0800 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 46 Message-ID: <3AC41DFD.94FAC669@pakrat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.12-20 i686) X-Accept-Language: en To: pgsql-sql@postgresql.org X-Archive-Number: 200103/641 X-Sequence-Number: 2313 "Md. Intekhab Alam" wrote: > Has anyone tried setting up Postgres as a linked server under Microsofts SQL > Server 7 to connect with SQL 6.5 > > I am able to create the link correctly (see below) and see all the tables > available in Postgres, but if I try querying anything in them I get the > following error > > Server: Msg 7313, Level 16, State 1 > Invalid schema or catalog specified for provider 'MSDASQL'. > > how should I correct this problem. I am in very critical > position because of this problem. > > please help me out ASAP i will be thankfull for that. > > waiting eagarly for the reply with helpful suggetion. > > regards, > > Intekhab Alam > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) You need to specify the table with the fully qualified format: SERVER.DATABASE.OWNER.TABLE or whatever format the ODBC driver is expecting. The DATABASE portion is what they refer to as CATALOG or SCHEMA. I usually end up trying any combination I can think of until I reach the right one. I can tell you it is expecting three dots, and it can accept blanks in between if it can use a default. For example, in MS SQL Server, owner defaults to 'dbo' if left blank. The docs in MS SQL Server are not too clear on this subject. Good luck. BTW, you will want to alias the fully qualified name in any queries since you can't use it to specify a field. SERVER.DATABASE.OWNER.TABLE.FIELD is not valid. It's SELECT T.FIELD FROM SERVER.DATABASE.OWNER.TABLE T WHERE... Ian