tmaly has asked for the wisdom of the Perl Monks concerning the following question:

Monks

Is there a way to count the number of open connections to an Oracle database made with DBD::Oracle that were not connected with connect_cached through some internal DBI magic?

I am looking to determine if any of the modules I am using in a module are creating excessive number of connections


Thanks Ty

Update: Thanks Tim this was exactly what I needed.
-Ty


I also added found the get_info to be of use for Oracle with codes 13,17, and 47

Replies are listed 'Best First'.
Re: Counting Oracle Connections with DBI
by tim.bunce (Scribe) on May 19, 2009 at 14:25 UTC
    Yes. For a simple count you can use the Kids, or ActiveKids, attributes. To actually get the handles, see http://search.cpan.org/~timb/DBI/DBI.pm#ChildHandles_(array_ref)
Re: Counting Oracle Connections with DBI
by Anonymous Monk on May 19, 2009 at 13:39 UTC
    No. You could ask the database.