Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcixP-0003nm-C7 for pgsql-admin@arkaria.postgresql.org; Wed, 02 Aug 2017 02:00:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dcixO-00047Q-V5 for pgsql-admin@arkaria.postgresql.org; Wed, 02 Aug 2017 02:00:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dcivb-0000sS-OJ for pgsql-admin@postgresql.org; Wed, 02 Aug 2017 01:58:27 +0000 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dcivX-0004de-VN for pgsql-admin@postgresql.org; Wed, 02 Aug 2017 01:58:27 +0000 Received: by mail-io0-x230.google.com with SMTP id m88so14942797iod.2 for ; Tue, 01 Aug 2017 18:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=propaas-com.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=Cby0Z60IEymqvnt0UfDbkcGFbiDJZ82Cy6TVvvrUtIk=; b=Oz4s78wv2tiBxP50QbGdiB9yCNrudyNE/VnIu2zuiIDr25jOD56liGTnisbJ1mmbmU QkNQplsAvpizwmxX741QXaoaCNu5NNP80i/qJGUFI006v+xbPle2kWr0/70xox50LxFG /ZGAtiy+IMVTBCfWumBik62Ga1w24lnvC3BBbFm0TL0Z9f66tk8hYz2x6Ma93YyqWHlI tpAoCF+sqfaH1GRohhy/+NPArb7qikh0eQZ1VtcA1PhMItTF5NZ38Ncn/0g9myOrkiMu MOZ2DVapQCvqrtd0AHu0ZajgTQnYOJBZ67aCyoK6fB3gFNTJoOvIUw0EIu8b3Q7qp+T4 scJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=Cby0Z60IEymqvnt0UfDbkcGFbiDJZ82Cy6TVvvrUtIk=; b=NPeW3M0ObUPZbcoFwALtY9BSIaTxtwrQYUUfhG2yQ9ClwELRuRZkJq2Zzu7zYBy+Sh ZpgIPqiFE6WOVi3gpgIt5eFimnSCe/rzXTPgDwipNS61f1q1iPzEqwmW6Zgz7KXfd0ZZ qRA+zV13zRyEkvtebKujZ4l7bqmwPWOJ+BWxkFRww/PMRN+LwH52ZEann0868W12j5mQ XXlHkZ6y6Ep00vN8/scQ7wAAcxv2ckIPb6EOh3krkQi8bWVyt9FE6V7oO2KJWfDMSDi/ v9ALjtTkBVkiV0RwmhVzGbaXURagitsD72tAM25zc7Fx78lO/Skne83HlJA07fHjqqx4 PZ4w== X-Gm-Message-State: AIVw111Kcut45YLltmyLXn7JiPpnaKT5J+daiY7PXYfAcnwXoGT5xrtq bXncnhSiWleU+2LO X-Received: by 10.107.9.195 with SMTP id 64mr24198480ioj.72.1501639101790; Tue, 01 Aug 2017 18:58:21 -0700 (PDT) Received: from [10.1.0.190] (50-243-150-81-static.hfc.comcastbusiness.net. [50.243.150.81]) by smtp.gmail.com with ESMTPSA id k138sm15357686ioe.57.2017.08.01.18.58.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2017 18:58:21 -0700 (PDT) To: pgsql-admin From: PropAAS DBA Subject: oracle_fdw issues Message-ID: <341df494-f543-d4fa-a6b7-e1288b56d66b@propaas.com> Date: Tue, 1 Aug 2017 19:58:20 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------0C356377579FE2C2A00D0CAA" Content-Language: en-US List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. --------------0C356377579FE2C2A00D0CAA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi All; I'm trying to setup oracle_fdw and I think I'm mostly there but I have an issue. Here's what I've done. - both PostgreSQL 9.6 and Oracle v10 running on the same server As the postgres user I can connect to the Oracle instance like so: 1) export ORACLE_HOME 2) export ORACLE_SID Note: the oracle sid = VLCDB 3) run sqlplus and when prompted enter system for the user and then the passwd So based on the fact I can connect, I did this: 1) downloaded, compiled and installed oracle_fdw 2) connected to psql and ran this: - CREATE EXTENSION oracle_fdw; - CREATE SERVER oradb1 FOREIGN DATA WRAPPER oracle_fdw OPTIONS (dbserver 'VLCDB'); -GRANT USAGE ON FOREIGN SERVER oradb1 TO postgres; - CREATE USER MAPPING FOR postgres SERVER oradb1 OPTIONS (user 'system', password 'orapwd'); All of the above commands completed successfully, then I created a foreign table which also succeeded: CREATE FOREIGN TABLE oratab1 (pid int, cname varchar(30), cstatus varchar(30), c_ts timestamp with time zone) SERVER oradb1 options (schema 'CLD', table 'cust_ord_process_status'); Now if I run: IMPORT FOREIGN SCHEMA CLD FROM SERVER oradb1 INTO local_cld_sch; it hangs for a long time and eventually returns this error * **ERROR: cannot connect to foreign Oracle server** **DETAIL: ORA-12154: TNS:could not resolve the connect identifier specified* Also If I run this (based on the foreign table above) select * from oratab1 limit 10; it also hangs for a long time, then I get this error * **ERROR: cannot connect**ion for foreign table "oratab1" cannot be established **DETAIL: ORA-12154: TNS:could not resolve the connect identifier specified* * * Thoughts? Thanks in advance --------------0C356377579FE2C2A00D0CAA Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi All;


I'm trying to setup oracle_fdw and I think I'm mostly there but I have an issue.  Here's what I've done.


- both PostgreSQL 9.6 and Oracle v10 running on the same server

As the postgres user I can connect to the Oracle instance like so:

1) export ORACLE_HOME

2) export ORACLE_SID

Note: the oracle sid = VLCDB

3) run sqlplus and when prompted enter system for the user and then the passwd


So based on the fact I can connect, I did this:


1) downloaded, compiled and installed oracle_fdw

2) connected to psql and ran this:

- CREATE EXTENSION oracle_fdw;

- CREATE SERVER oradb1  FOREIGN DATA WRAPPER oracle_fdw
          OPTIONS (dbserver 'VLCDB');

-GRANT USAGE ON FOREIGN SERVER oradb1 TO postgres;

- CREATE USER MAPPING FOR postgres SERVER oradb1
          OPTIONS (user 'system', password 'orapwd');



All of the above commands completed successfully, then I created a foreign table which also succeeded:

CREATE FOREIGN TABLE oratab1 (pid int, cname varchar(30), cstatus varchar(30), c_ts timestamp with time zone)

SERVER oradb1 options (schema 'CLD', table 'cust_ord_process_status');


Now if I run:

IMPORT FOREIGN SCHEMA CLD FROM SERVER oradb1 INTO local_cld_sch;

it hangs for a long time and eventually returns this error


ERROR:  cannot connect to foreign Oracle server
DETAIL:  ORA-12154:  TNS:could not resolve the connect identifier specified



Also If I run this (based on the foreign table above)

select * from oratab1 limit 10;


it also hangs for a long time, then I get this error


ERROR:  cannot connection for foreign table "oratab1" cannot be established
DETAIL:  ORA-12154:  TNS:could not resolve the connect identifier specified



Thoughts?

Thanks in advance




--------------0C356377579FE2C2A00D0CAA--