Script to test connecting to Oracle DBs

newbie01 perl <[email protected]>
Newsgroups gmane.comp.lang.perl.beginners,gmane.comp.lang.perl.modules.dbi.general
Message-ID <CAMnMhCCsuWB1cy3ruMcE5ZrX635HMs6XnJXuVV6WvJZ9HePDHA@mail.gmail.com>
Hi all,

I am looking for a Perl script or something similar that I can use to test
connection from a client PC to several databases on a server.

Does anyone know of any such script lying around somewhere :(-

Currently, am testing connection from a client PC to an Oracle DB using
Oracle's sqlplus. All is well and good until I have to test connection to
multiple databases on the server.

So I am hoping to use a Perl script that I can use which will parse some
sort of config file that contains hostname.tns_alias combination and then
test connection to the Oracle DB and run a simple SQL like SELECT COUNT(1)
from USER_TABLES, if I get an error, that means there is an issue
connection to that database, otherwise all is good.

At the moment, easiest I can think of using Perl's system command to run
sqlplus. Or is it better to look at using DBI? Would be very much
appreciated if someone can provide me a simple DBI script to start with if
that is the best approach to use.

Any suggestion/advice much appreciated. Thanks in advance.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.