Solved

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

Posted on 2006-11-15
3
413 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-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

732 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