Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 3DDB71E4A567 for ; Thu, 9 Aug 2012 09:50:16 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SzSBn-0003Iw-T6 for pgsql-admin@postgresql.org; Thu, 09 Aug 2012 12:50:15 +0000 Received: by pbbrr13 with SMTP id rr13so868446pbb.19 for ; Thu, 09 Aug 2012 05:49:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:x-gm-message-state; bh=AHEuWDWB9HZEl3SyAUjd7c8a5THCvSmz/Ssn0iWh/EA=; b=Zuj5md1kPxSb7cl40VJqOoqykny2qNB3i50bD5w924zu70BTlpbJTEYY7mqUZHZEur xBB+sJaSderkYGgmtZizFCfd4BqYEiZYlBXCR6VNBf63cCBAL11Mld6zZS9XC/yS3v0j UMFpBJYaw3/SSYPcdsdX2tYSivpRSnDmSZkC6dXLbVlFWmLKZyXa3q8kYT0DzTffJG9S r6X1fBI+GzskB1V1HbbYcr8sl0DQjDsFoi6qGxwta3h/JfILxhLRgBOQYX1R3vAz8OGC eT0P6x7/MCPWN63KmIcKK/e8FkLdQ1ywf/OR0wW4A7mSeUPztXG2gjRFhXSFMDWzm40K yvXg== Received: by 10.68.129.73 with SMTP id nu9mr4074698pbb.59.1344516597177; Thu, 09 Aug 2012 05:49:57 -0700 (PDT) Received: from ayaki.localdomain (124-169-173-54.dyn.iinet.net.au. [124.169.173.54]) by mx.google.com with ESMTPS id sj5sm1102409pbc.30.2012.08.09.05.49.54 (version=SSLv3 cipher=OTHER); Thu, 09 Aug 2012 05:49:55 -0700 (PDT) Message-ID: <5023B1EF.8060709@ringerc.id.au> Date: Thu, 09 Aug 2012 20:49:51 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: karthi keyan , "'pgsql-admin@postgresql.org'" Subject: Re: Data migration to sql server 2008 References: <50220DC1.8030007@ringerc.id.au> In-Reply-To: Content-Type: multipart/alternative; boundary="------------090807050306070605070702" X-Gm-Message-State: ALoCoQnbwvTfvfebDectutS58w4Ex0l7/MghpSdyc6ZfHn9PooJairx4u+IpB8YcDOST1p1Ms31M X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/63 X-Sequence-Number: 39884 This is a multi-part message in MIME format. --------------090807050306070605070702 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit [Replying via mailing list] On 08/09/2012 08:24 PM, karthi keyan wrote: > Thank you for u r reply. > I have establish the same by sql server *linked server method* .its is > working fine. > But right now i am facing the problem of . > > -- Query i used in sql > Select * from openquery(Postgre,' > dblink_connect(''mycon'',''hostaddr=localhost; dbname=explore > ;user=openerp; password=xplore)') > > > --- the response > > Cannot process the object " > dblink_connect('mycon','hostaddr=localhost; dbname=explore > ;user=openerp; password=xplore)". The OLE DB provider "MSDASQL" for > linked server "Postgre" indicates that either the object has no > columns or the current user does not have permissions on that object. > > Pl help me to fix it out. You haven't really shown enough information. In particular, where does this 'Postgre' variable/table/whatever come from? What is it? You should look at the PostgreSQL server logs to see if PostgreSQL is sending an error when you attempt the connection and if so, what it is. Consider also setting log_statement = 'all' in postgresql.conf so you can see exactly what queries this "openquery" tool runs against PostgreSQL. Please reply via the mailing list ("reply all") in future. -- Craig Ringer --------------090807050306070605070702 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
[Replying via mailing list]

On 08/09/2012 08:24 PM, karthi keyan wrote:
Thank you for u r reply.
I have establish the same by sql server linked server method .its is working fine.
But right now i am facing the problem of .

-- Query i used in sql
 Select *     from openquery(Postgre,' dblink_connect(''mycon'',''hostaddr=localhost; dbname=explore ;user=openerp; password=xplore)')


--- the response

Cannot process the object " dblink_connect('mycon','hostaddr=localhost; dbname=explore ;user=openerp; password=xplore)". The OLE DB provider "MSDASQL" for linked server "Postgre" indicates that either the object has no columns or the current user does not have permissions on that object.

Pl help me to fix it out.

You haven't really shown enough information. In particular, where does this 'Postgre' variable/table/whatever come from? What is it?

You should look at the PostgreSQL server logs to see if PostgreSQL is sending an error when you attempt the connection and if so, what it is. Consider also setting log_statement = 'all' in postgresql.conf so you can see exactly what queries this "openquery" tool runs against PostgreSQL.

Please reply via the mailing list ("reply all") in future.

--
Craig Ringer
--------------090807050306070605070702--