Solved

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

Posted on 2006-11-15
3
408 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now