Season with a little DBI…
Load the modules, then do all the previous work the easy way:
$dbh = DBI->connect(”dbi:Oracle:”, $user, $password);
Get an OCI attribute from an DBI handle:
use Oracle::OCI qw(:all);
OCIAttrGet($dbh, OCI_HTYPE_handle, my $attrib_value, 0, OCI_ATTR_name, $dbh);
That’s it!
- The $dbh DBI handle holds the DBD::Oracle handle that, in turn, holds the OCI handles
- The Oracle::OCI module works with DBD::Oracle to extract whichever handle is needed