I want to have a connections which stays activated:

cn=cx_Oracle.connect("dataset", "lowprivuser", "password")


and change the user of that connection.

Reason: I want to have a web application, which connects ONE TIME (per process/thread) to Oracle, and switches the privileges on the fly.

I looked into "SET ROLE <ACTIVEUSERax>"; but as much as I understand thats pureley additional, so:

cn=cx_Oracle.connect("dataset", "lowprivuser", "password")
# gives the privs of "lowprivuser"
cs=cn.cursor()

cs.execute ("SET ROLE USERFISCH identified by secret2006")

then gives the privs of "lowprivuser" plus the privs of  USERFISCH,

and an additional

cs.execute ("SET ROLE USERFOO identified by othersecret")

adds the privs of "USERFOO", WITHOUT loosing those of USERFISCH.


Is there any way to do this?

Best wishes,

Harald






--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Let's set so double the killer delete select all.
_______________________________________________
DB-SIG maillist  -  DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to