Thanks for the help!
After a bit of struggling I was able to set the module name. Turns out
DBD::Oracle 1.06 has a bug in it regarding ora_module_name. It tries to
use DBMS_APPLICATION_NAME.SET_MODULE() when it should really be using
DBMS_APPLICATION_INFO.SET_MODULE().
if ($attr && $attr->{ora_module_name}) {
eval {
$dbh->do(q{BEGIN DBMS_APPLICATION_NAME.SET_MODULE(:1,NULL);
END;},
undef, $attr->{ora_module_name});
};
}
This problem has apparently been fixed in recent versions of
DBD::Oracle.
Once I figured this out, I simply called
DBMS_APPLICATION_INFO.SET_MODULE() in my code directly.
- Jim
-----Original Message-----
From: Reidy, Ron [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 12:12 PM
To: Jim Spath; [EMAIL PROTECTED]
Subject: RE: Defining V$SESSION.PROGRAM
Look at ora_module_name.
-----------------
Ron Reidy
Senior DBA
Array BioPharma, Inc.
303.386.1480
-----Original Message-----
From: Jim Spath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 9:04 AM
To: [EMAIL PROTECTED]
Subject: Defining V$SESSION.PROGRAM
I was wondering if it is possible to define the program attribute of an
Oracle session via DBI or DBD::Oracle (V$SESSION.PROGRAM).
SQLPlus will definte the program attribute as:
[EMAIL PROTECTED] (TNS V1-V3)
But my perl processes always end up with a program attribute of:
? @[HOSTNAME].[DOMAIN].com (TNS V1-V3)
I know for a fact that it is possible to set this attribute, as we run
some third-party software which identifies itself properly to Oracle. I
was hoping Perl would allow me to do the same, so that I could better
monitor database activity.
Thanks in advance for the help!
- Jim
PS - I did find this link via Google:
http://www.dbforums.com/showpost.php?p=2385561&postcount=2
But it only talks about how to set the properties via the JDBC Thin
driver.
This electronic message transmission is a PRIVATE communication which
contains
information which may be confidential or privileged. The information is
intended
to be for the use of the individual or entity named above. If you are
not the
intended recipient, please be aware that any disclosure, copying,
distribution
or use of the contents of this information is prohibited. Please notify
the
sender of the delivery error by replying to this message, or notify us
by
telephone (877-633-2436, ext. 0), and then delete it from your system.