How to use Connection.clientinfo with v$session table
700084Oct 16 2009 — edited Oct 18 2009Hi 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...