Re: setting v$session.program?

From: Maxim Demenko <>
Date: Wed, 10 Jun 2009 01:26:48 +0200
Message-ID: <>

joel garry schrieb:
> On Jun 9, 12:59 pm, wrote:
>> wrote:
>>> On Tue, 09 Jun 2009 18:09:10 GMT, wrote:
>>>> It's currently the name of the interpreter executable,
>>>> and I want to change it to the "real" name of my program.
>>> Why on earth?
>> They are python programs, which are run by the
>> python interpreter.  So instead of seeing program
>> names like "" or ""
>> oracle shows "python.exe" for all programs.
>> --
>> Mark Harrison
>> Pixar Animation Studios

> I don't remember how, but there are things on the net like
> and
> (I was looking for a simple wrapper from way back I'm sure I've seen,
> but couldn't find it with a quick search).
> It can vary significantly by OS, and even depending on which calls or
> programs are used to look. Don't know how variable Oracle is, but
> these things tend to use the local variants, as Oracle has to ask the
> OS or "trust" a client.
> I'm kinda wondering what would happen if you created links of the
> various names you want, pointing at python (or copying/renaming if you
> don't have links). Only if you have just a few, of course. More info
> google on spoofing oracle.
> jg
> --
> is bogus.
> Great Wall of Los Angeles

There should be a possibility to set the value of v$session.program over OCI process handle attribute (if i look right in the docs, it should be the OCI_ATTR_MEMPOOL_APPNAME). This is implemented in the Oracle jdbc drivers (i've seen for sure on this newsgroup a working example, a couple of metalink notes exist as well), however i don't have a clue, how difficult is it to implement in cx_Oracle, but one can ask Anthony Tuininga about it.
Personally i don't see much value in such thing, because module,clientinfo and action gives you a lot of flexibility and (thankfully) it can be set directly from cx_python without need to call dbms_application_info. These attributes can be as well changed at runtime, giving you much better instrumentation than static value of program attribute. For security reasons ( for example - restricting access for some programs) it is practically useless as well, because you can easily change this attribute by simply renaming of executables - works on windows and unix ( don't know about windows, but on linux even symlink work).

Best regards


Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?

Aksel Peter Jørgensen
Received on Tue Jun 09 2009 - 18:26:48 CDT

Original text of this message