Solved

Remote access with Perl running on Solaris to an IBM DB2 database on Linux

Posted on 2006-11-15
3
410 Views
Last Modified: 2013-12-05
Greetings,

We have a Perl 5.6.1 script that is running on Sun Solaris 9. We need it to connect to and run a query on a table in an IBM DB2 V8.2 database which is installed on a Suse Linux 9 computer. What is the best way to accomplish this? Will we need a bridging tool due to the different operating systems on the servers?

Thank you.
0
Comment
Question by:TAI-
3 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 250 total points
ID: 17954097
hi

first of all you will need to install a db2 client on the solaris machine,
you can download a free client from the ibm web site
you can use the run time client which is the minimal client in terms of demand on machine resources

once you have installed the db2 run time client (or any other client) you need to catalog the remote database (the one on the linux machine) localy on the solaris
in order to do so you need to use 2 commands
catalog tcpip node - this will define the communication path to the linux server
catalog db - this will define a local alias on the solaris machine to the udb database that resides on the linux machine

now you can access the database as if it is local to the solaris machine

in order to run the query localy, you can just use the commands :
db2 connect to <db-name> user <user-name> using <password>
db2 select ... <rest of your query>
and just grab the output from stdout

momi
0
 
LVL 7

Expert Comment

by:sachinwadhwa
ID: 17955317
This will help: Perl programming with DB2 Universal Database

http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0512greenstein/
0
 

Author Comment

by:TAI-
ID: 17977427
Hmm. It seems I have to somehow combine the two replies.

The document in the IBM link doesn't seem to explain how to remotely access the database over different OS.

And momi's commands don't seem to be Perl commands.

Maybe if I install DB2 client and catalog, then use the Perl DBI commands it might work.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question