Thread: Hi!
Hi! I'm trying to connect an Oracle Db with a PostgreSQL Db, by means of Oracle heterogeneous service. I've installed (in my oracle server) DG4ODBC which is the oracle gateway, UnixODBC which is the driver manager... and all I need now is the PostgreSQL driver. I've downloaded psqlodbc... but I can't "configure" it as it says that theres a missing variable ... "PG_CONFIG". I've found the pg_config file in my PostgreSQL server.. but I don't know if there's any other driver to install which wouldn expect pg_config to be there. Both servers are Linux RHEL 4. Oracle version: 10.2.0.4... PostgreSQL version: 8.2.4 Thanks for your help! Daniela.
On 2/12/2009 4:03 AM, Daniela Mamede d'Almeida wrote: > Hi! > I'm trying to connect an Oracle Db with a PostgreSQL Db, by means of > Oracle heterogeneous service. > I've installed (in my oracle server) DG4ODBC which is the oracle > gateway, UnixODBC which is the driver manager... and all I need now is > the PostgreSQL driver. I've downloaded psqlodbc... but I can't > "configure" it as it says that theres a missing variable ... > "PG_CONFIG". Possible hints: http://www.google.com.au/search?q="PG_CONFIG"+"unixodbc" Particularly: http://cpansearch.perl.org/src/RKIES/UnixODBC-0.34/dbms/README ... which suggests that you must specify PG_CONFIG as an environment variable when calling configure: # export PG_CONFIG=/usr/local/pgsql/bin/pg_config # ./configure (adjust PG_CONFIG for the location of pg_config on your system). -- Craig Ringer
Thanks for answering! My problem is that the Oracle Db and the PostgreSQL Db are both on different servers, and I;ve been told by Oracle support that I need to install the PostgreSQL driver in my Oracle server. Now I don't know how to solve the PG_CONFIG error, as there's no pg_config file in the Oracle server! How can I solve this? Thanks a lot! Daniela. Craig Ringer escribió: > On 2/12/2009 4:03 AM, Daniela Mamede d'Almeida wrote: >> Hi! >> I'm trying to connect an Oracle Db with a PostgreSQL Db, by means of >> Oracle heterogeneous service. >> I've installed (in my oracle server) DG4ODBC which is the oracle >> gateway, UnixODBC which is the driver manager... and all I need now is >> the PostgreSQL driver. I've downloaded psqlodbc... but I can't >> "configure" it as it says that theres a missing variable ... >> "PG_CONFIG". > > Possible hints: > > http://www.google.com.au/search?q="PG_CONFIG"+"unixodbc" > > Particularly: > > http://cpansearch.perl.org/src/RKIES/UnixODBC-0.34/dbms/README > > ... which suggests that you must specify PG_CONFIG as an environment > variable when calling configure: > > # export PG_CONFIG=/usr/local/pgsql/bin/pg_config > # ./configure > > (adjust PG_CONFIG for the location of pg_config on your system). > > -- > Craig Ringer
On Wed, Dec 2, 2009 at 9:35 AM, Daniela Mamede d'Almeida <dmamede@mecon.gov.ar> wrote:
Yes, you'll have to install Postgres (or at least the Postgres client libraries) on your Oracle server.
Thanks for answering!
My problem is that the Oracle Db and the PostgreSQL Db are both on different servers, and I;ve been told by Oracle support that I need to install the PostgreSQL driver in my Oracle server. Now I don't know how to solve the PG_CONFIG error, as there's no pg_config file in the Oracle server!
How can I solve this?
Yes, you'll have to install Postgres (or at least the Postgres client libraries) on your Oracle server.
--
Jonah H. Harris, Senior DBA
myYearbook.com
On 2/12/2009 10:35 PM, Daniela Mamede d'Almeida wrote: > Thanks for answering! > My problem is that the Oracle Db and the PostgreSQL Db are both on > different servers, and I;ve been told by Oracle support that I need to > install the PostgreSQL driver in my Oracle server. Now I don't know how > to solve the PG_CONFIG error, as there's no pg_config file in the Oracle > server! Er ... The file `pg_config' is part of the PostgreSQL package. It's installed with the server. It's a program that should be in the server's binary directory, in the same place as `psql'. Since you're building pgodbc from source, I'm assuming you also built and installed PostgreSQL from sources, so you should have it. If you installed distro binaries, you'll probably need a -dev or -devel package for libpq too. HOWEVER, if you installed PostgreSQL using your distro's packaging system, you should just install psqlodbc that way too, not build it from sources. It should be in your distro's package management system. On my Debian and Ubuntu systems, for example, I just "apt-get install odbc-postgresql" to install it. If you'd given us a few basic details like what PostgreSQL version you had, where you got it from, how you installed it, the OS and version you were running on, etc, it might be a little bit easier to help you with this. See: http://wiki.postgresql.org/wiki/Guide_to_reporting_problems -- Craig Ringer
Hi Jonah!<br /> I installed the client libraries, but the error is still there... The pkg I installed is postgresql-libs-7.4.13-2.RHEL4.1.x86_64.rpm<br/> Do I have to do anything?<br /><br /> Thanks!<br /> Daniela.<br /><br />Jonah H. Harris escribió: <blockquote cite="mid:36e682920912020700o4dc0a460rdb60af4aa4f9d7ef@mail.gmail.com" type="cite"><divclass="gmail_quote">On Wed, Dec 2, 2009 at 9:35 AM, Daniela Mamede d'Almeida <span dir="ltr"><<a href="mailto:dmamede@mecon.gov.ar"moz-do-not-send="true">dmamede@mecon.gov.ar</a>></span> wrote:<br /><blockquote class="gmail_quote"style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanksfor answering!<br /> My problem is that the Oracle Db and the PostgreSQL Db are both on different servers, andI;ve been told by Oracle support that I need to install the PostgreSQL driver in my Oracle server. Now I don't know howto solve the PG_CONFIG error, as there's no pg_config file in the Oracle server!<br /> How can I solve this?<br /></blockquote><div><br/> Yes, you'll have to install Postgres (or at least the Postgres client libraries) on your Oracleserver.<br /></div></div><br /> -- <br /> Jonah H. Harris, Senior DBA<br /> myYearbook.com<br /><br /></blockquote>
On Fri, Dec 4, 2009 at 1:05 PM, Daniela Mamede d'Almeida <dmamede@mecon.gov.ar> wrote:
Hey Daniela,I installed the client libraries, but the error is still there... The pkg I installed is postgresql-libs-7.4.13-2.RHEL4.1.x86_64.rpm
Do I have to do anything?
Let me update my how-to doc for you.
--
Jonah H. Harris, Senior DBA
myYearbook.com
On 5/12/2009 2:05 AM, Daniela Mamede d'Almeida wrote: > Hi Jonah! > I installed the client libraries, but the error is still there... The > pkg I installed is postgresql-libs-7.4.13-2.RHEL4.1.x86_64.rpm > Do I have to do anything? Install the PgODBC packages too, rather than trying to build PgODBC from source. Assuming there are any for RHEL4 - I can't find a package search like `packages.debian.org' for RHEL, but the distrowatch source package list doesn't include unixodbc so it might not be included in the system packages. If you *must* install PgODBC from source, install the -dev or -devel rpm for the client libraries too, since that should contain pg_config . You might also need to install unixodbc; I'm not sure about that. -- Craig Ringer
Hi List! After looking for a suitable pkg for a long time, I've found postgresql-devel-8.4.1-1PGDG.rhel4.x86_64.rpm which sounded like what I needed! But when I tried to install it, it asked for some dependencies, and those dependencies asked for other dependencies... and I almost got all Postgres pkg installed by the end, and that's not what I want. Isn't there a better way to get pg_config? Thanks a lot for your help! Daniela. Craig Ringer escribió: > On 5/12/2009 2:05 AM, Daniela Mamede d'Almeida wrote: >> Hi Jonah! >> I installed the client libraries, but the error is still there... The >> pkg I installed is postgresql-libs-7.4.13-2.RHEL4.1.x86_64.rpm >> Do I have to do anything? > > Install the PgODBC packages too, rather than trying to build PgODBC > from source. Assuming there are any for RHEL4 - I can't find a package > search like `packages.debian.org' for RHEL, but the distrowatch source > package list doesn't include unixodbc so it might not be included in > the system packages. > > If you *must* install PgODBC from source, install the -dev or -devel > rpm for the client libraries too, since that should contain pg_config > . You might also need to install unixodbc; I'm not sure about that. > > -- > Craig Ringer
On Tuesday 15 December 2009 7:21:54 am Daniela Mamede d'Almeida wrote: > Hi List! > After looking for a suitable pkg for a long time, I've found > postgresql-devel-8.4.1-1PGDG.rhel4.x86_64.rpm which sounded like what I > needed! But when I tried to install it, it asked for some dependencies, > and those dependencies asked for other dependencies... and I almost got > all Postgres pkg installed by the end, and that's not what I want. > Isn't there a better way to get pg_config? > > Thanks a lot for your help! > Daniela. > > The thing to keep in mind is that pg_config is just a helper program. To quote the docs: http://www.postgresql.org/docs/8.4/interactive/app-pgconfig.html "The pg_config utility prints configuration parameters of the currently installed version of PostgreSQL. It is intended, for example, to be used by software packages that want to interface to PostgreSQL to facilitate finding the required header files and libraries. " In order for pg_config to work the other files/libraries need to be installed. -- Adrian Klaver aklaver@comcast.net
Oracle support told me to install PostgreSQL driver in my Oracle server. What I don't understand is what's the use of runningpg_config in a server where there's no Postgre installed.<br /> Maybe there's another postgresql driver that wouldn'texpect pg_config to be there. I there any?<br /><br /> Thanks!!<br /><br /> Adrian Klaver escribió: <blockquote cite="mid:200912150856.28133.aklaver@comcast.net"type="cite"><pre wrap="">On Tuesday 15 December 2009 7:21:54 am DanielaMamede d'Almeida wrote: </pre><blockquote type="cite"><pre wrap="">Hi List! After looking for a suitable pkg for a long time, I've found postgresql-devel-8.4.1-1PGDG.rhel4.x86_64.rpm which sounded like what I needed! But when I tried to install it, it asked for some dependencies, and those dependencies asked for other dependencies... and I almost got all Postgres pkg installed by the end, and that's not what I want. Isn't there a better way to get pg_config? Thanks a lot for your help! Daniela. </pre></blockquote><pre wrap=""> The thing to keep in mind is that pg_config is just a helper program. To quote the docs: <a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/8.4/interactive/app-pgconfig.html">http://www.postgresql.org/docs/8.4/interactive/app-pgconfig.html</a> "The pg_config utility prints configuration parameters of the currently installed version of PostgreSQL. It is intended, for example, to be used by software packages that want to interface to PostgreSQL to facilitate finding the required header files and libraries. " In order for pg_config to work the other files/libraries need to be installed. </pre></blockquote>
On Tuesday 15 December 2009 9:16:41 am Daniela Mamede d'Almeida wrote: > Oracle support told me to install PostgreSQL driver in my Oracle server. > What I don't understand is what's the use of running pg_config in a server > where there's no Postgre installed. Maybe there's another postgresql driver > that wouldn't expect pg_config to be there. I there any? > > Thanks!! > pg_config is not the problem, it is just a program to make compiling the ODBC driver easier. You could specify the locations for the necessary files to the configure program manually without using pg_config. The issue is that in order to compile the driver you need the Postgres files/libraries. That being said did you try the rpm below: http://yum.pgsqlrpms.org/8.2/redhat/rhel-4-x86_64/postgresql-odbc-08.03.0400-1PGDG.rhel4.x86_64.rpm Note:This is for version Postgres 8.2 which is what you originally said you are using. You previous email had postgresql-devel-8.4.1-1PGDG.rhel4.x86_64.rpm which is for Postgres 8.4 and may be part of the problem. -- Adrian Klaver aklaver@comcast.net
On Tue, Dec 15, 2009 at 12:16 PM, Daniela Mamede d'Almeida <dmamede@mecon.gov.ar> wrote:
I hate the pgodbc driver and given that I spent an hour trying to get ODBCng working with 11.2 on CentOS 5.4 x86_64 with no success, you may want to look at this article.
I can confirm that the following works as expected, though it uses the commercial PostgreSQL DataDirect driver:
http://eduardolegatti.blogspot.com/2009/07/abordando-o-uso-de-database-links-em.html
Oracle support told me to install PostgreSQL driver in my Oracle server. What I don't understand is what's the use of running pg_config in a server where there's no Postgre installed.
Maybe there's another postgresql driver that wouldn't expect pg_config to be there. I there any?
I hate the pgodbc driver and given that I spent an hour trying to get ODBCng working with 11.2 on CentOS 5.4 x86_64 with no success, you may want to look at this article.
I can confirm that the following works as expected, though it uses the commercial PostgreSQL DataDirect driver:
http://eduardolegatti.blogspot.com/2009/07/abordando-o-uso-de-database-links-em.html
--
Jonah H. Harris, Senior DBA
myYearbook.com