Closed hvardhan20 closed 2 years ago
There is no way, currently, to specify the protocol within makedsn(). You can use an easy connect string to accomplish the task, though:
dsn = "tcps://host:port/service_name"
If you have the separate components you can do this:
dsn = f"{protocol}://{host}:{port}/{service_name}"
The ability to build connect strings in a more generic and complete fashion (and yes, including the protocol) will be forthcoming in a new version. Stay tuned!
For completeness you can also pass a full connect descriptor with protocol, or put the connect descriptor in a tnsnames.ora file and pass the descriptor alias when you connect:
cjdbmelb = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)... etc etc
See the doc on Connection Strings.
Thanks for the clarification! Will go with the f-string for now.
8.3.0
Is there a protocol argument for cx_Oracle.makedsn function? It is forming the DSN string with TCP by default and there is no way to change that. Is there? I would like to specify TCPS as the protocol while using cx_Oracle.makedsn. How can I do that?
Thanks!