Solved

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

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

679 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