From: Adrian Klaver <adrian.klaver@aklaver.com>
To: karthik kumar <karthikkumar.db2dba@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Fwd: Carto ODBC_FDW issue "ERROR: Connecting to driver" from PG to DB2
Date: Mon, 9 Apr 2018 16:52:47 -0700
Message-ID: <2f510eb0-86d7-b2fa-1397-5d16512c1234@aklaver.com> (raw)
In-Reply-To: <CADbTQ2bYPqKaxFu78MNSufYSRSAkEksBifRJ_iCUnjRCBT9jVA@mail.gmail.com>
References: <CADbTQ2a9Y4-3dQCOq7BG8juf2cyZvm7tAhW_XTpdJv1n5c-QPA@mail.gmail.com>
<2aef0ab7-8854-978a-aae0-7e3cf6214c79@aklaver.com>
<CADbTQ2aKKrbGYH9p32+hx+=SYrXY_Q84JhfOqUzuRWaOZ260Gw@mail.gmail.com>
<a175dc17-9737-58c8-5819-f99a6c43a47c@aklaver.com>
<CADbTQ2bYPqKaxFu78MNSufYSRSAkEksBifRJ_iCUnjRCBT9jVA@mail.gmail.com>
On 04/09/2018 02:37 PM, karthik kumar wrote:
>
>
> On Mon, Apr 9, 2018 at 5:13 PM, Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
> On 04/09/2018 02:10 PM, karthik kumar wrote:
> Assuming using this:
>
> https://github.com/ZhengYang/odbc_fdw>
> I believe that should be username and password per above link:
>
> "CREATE USER MAPPING FOR postgres
> SERVER odbc_server
> OPTIONS (username 'root', password '');
> "
>
> Yes.
>
>
> Does 'yes' mean you changed this:
>
> CREATE USER MAPPING FOR pg SERVER odbc_db2 OPTIONS (odbc_UID
> 'db2inst1', odbc_PWD 'db2inst1');
>
> to this?:
>
> CREATE USER MAPPING FOR pg SERVER odbc_db2 OPTIONS (username
> 'db2inst1', password 'db2inst1');
>
>
> If i try to use username it throws error as invalid option
>
> postgres=# CREATE SERVER driver_db5 FOREIGN DATA WRAPPER odbc_fdw
> OPTIONS (dsn 'sample');
> CREATE SERVER
>
> postgres=# CREATE USER MAPPING FOR pg SERVER driver_db5 OPTIONS
> (username 'db2inst1', password 'db2inst1');
> ERROR: invalid option "username"
> HINT: Valid options in this context are: <none>
You are using the extension from below, correct?:
https://github.com/ZhengYang/odbc_fdw
In psql what does the below show?:
\dx
What happens if you do not include the OPTIONS?
>
> postgres=# CREATE USER MAPPING FOR pg SERVER driver_db5 OPTIONS
> (odbc_UID 'db2inst1', odbc_PWD 'db2inst1');
> CREATE USER MAPPING
>
>
>
> Thanks,
> Karthik.
>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, karthikkumar.db2dba@gmail.com
Subject: Re: Fwd: Carto ODBC_FDW issue "ERROR: Connecting to driver" from PG to DB2
In-Reply-To: <2f510eb0-86d7-b2fa-1397-5d16512c1234@aklaver.com>
References: <CADbTQ2a9Y4-3dQCOq7BG8juf2cyZvm7tAhW_XTpdJv1n5c-QPA@mail.gmail.com> <2aef0ab7-8854-978a-aae0-7e3cf6214c79@aklaver.com> <CADbTQ2aKKrbGYH9p32+hx+=SYrXY_Q84JhfOqUzuRWaOZ260Gw@mail.gmail.com> <a175dc17-9737-58c8-5819-f99a6c43a47c@aklaver.com> <CADbTQ2bYPqKaxFu78MNSufYSRSAkEksBifRJ_iCUnjRCBT9jVA@mail.gmail.com> <2f510eb0-86d7-b2fa-1397-5d16512c1234@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox