Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: OPS$ / default accounts
The code below retrieves all the tnsnames on the system on which it is run (at least for Solaris which is all I run)
HTH!
#!/usr/local/bin/perl -w
#use strict;
use CGI::Carp qw{fatalsToBrowser};
use DBI;
@data_sources = DBI->data_sources('Oracle');
$i = 0;
while (defined $data_sources[$i]) {
print ("-->$data_sources[$i]\n");
$i++;
}
Stephane Faroult wrote:
>
> Jared.Still_at_radisys.com wrote:
> >
> > Thank you Steve, this is a great resource, as it
> > will save duplicating effort.
> >
> > I'll go update my script now...
> >
> > Jared
>
> If I may suggest something, Jared, I am a bit of a Perl illiterate
> (shame! shame!) but it looks to me that you supply the dbname on the
> command line. I think that it would be great if you could, possibly
> optionally, check all tnsnames.ora entries. For what I have heard of the
> text processing capabilities of perl, and for having done it in C, it
> shouldn't be too difficult and would be much appreciated by large shops.
>
> --
> Regards,
>
> Stephane Faroult
> Oriole Ltd
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Stephane Faroult
> INET: sfaroult_at_oriole.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- Charlie Mengler Maintenance Warehouse charliem_at_mwh.com 10641 Scripps Summit Ct. 858-831-2229 San Diego, CA 92131 You can lead some people to knowledge, but you can't make them think! -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Charlie Mengler INET: charliem_at_mwh.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Feb 01 2002 - 16:51:21 CST
![]() |
![]() |