1. Anthony Tuininga
  2. cx_Oracle
  3. Pull requests

Pull requests

#1 Declined
Repository
dagwieers
Branch
default
Repository
anthony_tuininga
Branch
default

Add support for setting the client_identifier during connection

Author
  1. Dag Wieers
Reviewers
Description

Add support for setting the client_identifier during connection so that logon triggers will see this value, as requested and implemented by Dag Wieers.

Comments (2)

  1. Dag Wieers author

    I have not tested it, lacking Oracle libraries to build against. But it conforms to a previous (similar) commit (wrt. module, action and clientinfo) and should therefor be correct (give or take a typo ;-))

    Thanks in advance !

  2. Dag Wieers author

    In the meantime I have tested it using oracle-instantclient-10.2.0.5 and oracle-instantclient-11.2.0.3.0, and in both cases the ACL still blocks me. I use it like this:

    con = oracle.connect(username, password, dns, client_identifier="perl")

    I have no means of verifying what is actually logged inside the database for this request, but I can confirm this does not work whereas symlinking python to ./perl and using ./perl in the shebang does work and is not blocked by the ACL. So I wonder if it is even using OCI_ATTR_CLIENT_IDENTIFIER during the connect in the instantclient library. For all we know the library is providing its own client_identifier during connect by using its own technique of getting the program name (in this case the interpreter from the shebang).