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

Hello, Monks...

I suddenly find myself having to use DB2 in a new work environment. The DB2 server is far, far away, and also a Solaris box. I wish to develop my programs on my local RedHat 9 workstation, which I will ultimately transfer over to the Solaris box. While developing the programs I wish to remotely connect to the DB2 server on that machine via DBI/DBD::DB2.

How can this be done?

I have read in the perldoc for DBD::DB2 that there is this mysterious thing called a "catalog" that should be on my local machine from which DBD::DB2 would read the connection parameters to the remote DB2 server. Talking with the DB2 administrator here, he says that installing a catalog on my local machine would require installing DB2 on my local machine, and setting up DB2 server replication.

This sounds like insane overkill to me. (Quite apart from the fact that we have the software & license for DB2 on the Solaris machine, but none for the local RedHat boxen.)

Isn't there something akin to simply specifying a hostname and port in the DBI connect string (per MySQL)? And perhaps additionally specifying a few environment variables (per Oracle)?

Apologise if this question has been asked here before. ('Search' didn't yield anything particularly similar.) I did about an hour of searching the 'net at large, mailing list archives, etc. as well, but everything I ever read pointed to the "catalog".

Cheers,
Richard

  • Comment on remote connections to DB2 database via DBI/DBD::DB2

Replies are listed 'Best First'.
Re: remote connections to DB2 database via DBI/DBD::DB2
by derby (Abbot) on Jul 30, 2003 at 16:12 UTC
    You need the DB2 client libraries only. Check out IBM's howto.

    -derby

    <rant>I don't know why RDBMS companies feel compelled to bury their drivers so deep under cover. You would think that they would want to distribute (and even -- egads -- open source) the drivers in a give away the razor type promotion.</rant>

    Anyways, in case your DBA cannot extract the client for you, they can be found here (for now at least).

Re: remote connections to DB2 database via DBI/DBD::DB2
by shemp (Deacon) on Jul 30, 2003 at 16:17 UTC
    I know for a fact that you dont need to install DB2 on clients to get a catalog running. We have a number of machines that remotely connect to a DB2 server, but dont have DB2 installed.
    If you run this code snippet, it will tell you about the DB2 catalog on your machine. (when you have one set up)
    use DBI; print DBI->data_sources('DB2');
    Im sorry that i dont know how to set up the client machine, they were that way when i started working on them.

    I mostly wanted to say that your admin is incorrect.