Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use Connection.clientinfo with v$session table

700084Oct 16 2009 — edited Oct 18 2009
Hi everyone,

I'm trying to keep tabs on the number of connections I create (via python and cx_Oracle) by monitoring Oracle's v$session table.

From the cx_Oracle docs, it appears the preferred way to write my "module" and "action" parameters to v$session is via the Connection.clientinfo method.

I tried creating a connection and using that method, but the results did not appear in the v$session table. Below is how I called the method:

cnx.clientinfo(module="name of module", action="myaction")

Is that the correct way to use "clientinfo"?

The cx_Oracle docs don't provide any usage examples (that I could find), and only point to the Python DB API specs. I didn't notice a mention of this method there:
http://www.python.org/dev/peps/pep-0249/

Can anyway show me an example of how to use the "clientinfo" method? Also, is it necessary to have "write" permission for my username in order to access v$session? If so, perhaps that's my problem...

Comments

gernot

Instance debugging (d0.sql) shows that HTTP header variable is found and its value is correct. But the sentry function still fails - see attachment
d2.txt (12.99 KB)Which additional conditions are checked in the sentry function (in HTTP header variable authentication scheme to login in APEX itself)?
(user exists and is open)
Thanks

user12097829

Hi,
I've the same problem here (using Apex 21.2 and Apex 22.1):
HTTP header variable is set by Apache and found by Apex. But the sentry function still fails.
Using the Oracle provided "HTTP header variable" authentication scheme, there's no possibility to specify a custom sentry function, but obviously there must be an internal sentry function.
Which additional conditions are checked in the internal sentry function?
Thanks

user12097829

Hi,
found a solution for my problem with "HTTP header variable":
Following several tutorials I had set "Verify Username" to "After Login" for my authentication scheme.
After changing setting "Verify Username" from "After Login" to "Each Request" everything works fine.
Thanks

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 15 2009
Added on Oct 16 2009
1 comment
5,136 views