Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

dbi between nt and unix (code)

by deprecated (Priest)
on Jun 20, 2001 at 19:10 UTC ( #90027=perlquestion: print w/replies, xml ) Need Help??

deprecated has asked for the wisdom of the Perl Monks concerning the following question:

I've got an interesting problem where I need to do some stuff with a postgres database on a unix machine. However, the script that needs to talk to that database lives on an NT machine.

  • can i build DBI and DBD::Pg on Win?
  • how can i make this work outside of dbi?

brother dep

Laziness, Impatience, Hubris, and Generosity.

Replies are listed 'Best First'.
Re: dbi between nt and unix (code)
by Jonathan (Curate) on Jun 20, 2001 at 19:50 UTC
    Have you considered using DBD::Proxy and DBI::ProxyServer to communicate between the boxes?
    It seems quite a good solution to this sort of problem.

    When the bells justle in the tower, the hollow night amid. Then on my tongue the taste is sour, of all I ever did....

      I want to second this recommendation. Using DBD::Proxy and DBI::ProxyServer is a very good approach to NT/Unix cross-platform database access. The only drawback is that you will have one server process more on the database server. You might have to fiddle with the default transfer unit lengths if you transfer a lot of BLOB stuff, like image data or so. I have used this approach several times at work, and it is the perfect thing to do if you need the access only for a limited time, like when you are porting legacy data. Much easier to install then anything else, IMHO.

      Christian Lemburg
      Brainbench MVP for Perl

Re: dbi between nt and unix (code)
by DeaconBlues (Monk) on Jun 20, 2001 at 19:28 UTC

    If you have ActivePerl installed on the NT machine, you can use the pre-built ASPSN zip archives for the DBI and DBD modules. They are located here:

    Using this set up I have perl scripts running on my NT workstation that access Oracle Databases on UNIX machines.


    There is some set up involved with the Data Sources control panel

Re: dbi between nt and unix (code)
by MrCromeDome (Deacon) on Jun 20, 2001 at 21:16 UTC
    What version of postgres are you accessing? There is an ODBC driver available from the postgres site that works with 6.5.x (and potentially earlier versions). If this is the case, you can use DBD::ODBC (which works exceptionally well for me) to access your postgres database. From checking the ActiveState site, there doesn't appear to be a DBD available for postgres.

    I know from experience however that this ODBC driver does not work with postgres version 7.x.

    Good luck!

    Update: Whoops! I appear to have made a liar of myself. Just checked out the postgres site for the first time in a while, and they appear to have a pretty recently updated ODBC driver for postgres 7.x. This might be just what you need. Haven't had the chance to test it though. Again, good luck!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://90027]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2023-06-01 09:20 GMT
Find Nodes?
    Voting Booth?

    No recent polls found