dbTalk Databases Forums  

setting v$session.program?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss setting v$session.program? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mh@pixar.com
 
Posts: n/a

Default setting v$session.program? - 06-09-2009 , 01:09 PM






I'm using
dbms_application_info.set_module('my-module','my-action')
to set v$session.module and v$session.action.

How do I set v$session.program?

It's currently the name of the interpreter executable,
and I want to change it to the "real" name of my program.

Many TIA!
Mark

--
Mark Harrison
Pixar Animation Studios

Reply With Quote
  #2  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: setting v$session.program? - 06-09-2009 , 01:58 PM






On Tue, 09 Jun 2009 18:09:10 GMT, mh (AT) pixar (DOT) com wrote:

Quote:
I'm using
dbms_application_info.set_module('my-module','my-action')
to set v$session.module and v$session.action.

How do I set v$session.program?
Shortly: you don't
Quote:
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?

--
Sybrand Bakker
Senior Oracle DBA

Reply With Quote
  #3  
Old   
mh@pixar.com
 
Posts: n/a

Default Re: setting v$session.program? - 06-09-2009 , 02:59 PM



sybrandb (AT) hccnet (DOT) nl wrote:
Quote:
On Tue, 09 Jun 2009 18:09:10 GMT, mh (AT) pixar (DOT) com 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 "update_users.py" or "nightly_cleanup.py"
oracle shows "python.exe" for all programs.

--
Mark Harrison
Pixar Animation Studios

Reply With Quote
  #4  
Old   
joel garry
 
Posts: n/a

Default Re: setting v$session.program? - 06-09-2009 , 05:27 PM



On Jun 9, 12:59*pm, m... (AT) pixar (DOT) com wrote:
Quote:
sybra... (AT) hccnet (DOT) nl wrote:
On Tue, 09 Jun 2009 18:09:10 GMT, m... (AT) pixar (DOT) com 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 "update_users.py" or "nightly_cleanup.py"
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
http://www.uofr.net/~greg/processname.html and
http://mail.python.org/pipermail/pyt...ry/069667.html
(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
--
@home.com is bogus.
Great Wall of Los Angeles http://www.sparcmurals.org/sparcone/...28&Itemi d=60

Reply With Quote
  #5  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: setting v$session.program? - 06-09-2009 , 06:26 PM



joel garry schrieb:
Quote:
On Jun 9, 12:59 pm, m... (AT) pixar (DOT) com wrote:
sybra... (AT) hccnet (DOT) nl wrote:
On Tue, 09 Jun 2009 18:09:10 GMT, m... (AT) pixar (DOT) com 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 "update_users.py" or "nightly_cleanup.py"
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
http://www.uofr.net/~greg/processname.html and
http://mail.python.org/pipermail/pyt...ry/069667.html
(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
--
@home.com is bogus.
Great Wall of Los Angeles http://www.sparcmurals.org/sparcone/...28&Itemi d=60
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

Maxim

--
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

Reply With Quote
  #6  
Old   
Frank
 
Posts: n/a

Default Re: setting v$session.program? - 07-10-2009 , 08:41 AM



On 9 jun, 20:09, m... (AT) pixar (DOT) com wrote:
Quote:
I'm using
* * dbms_application_info.set_module('my-module','my-action')
to set v$session.module and v$session.action.

How do I set v$session.program?

It's currently the name of the interpreter executable,
and I want to change it to the "real" name of my program.

Many TIA!
Mark

--
Mark Harrison
Pixar Animation Studios
Would "who am i" (search asktom.oracle.com) suffice?
Not what you asked for, more in general: "how to determine
where I am, and what called me" (searc for "who called me", too)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.