ezconnect protocol as argument while connecting to the database
19c onwards ezconnect support passing protocol while connecting to the database, please provide a way for passing protocol as an argument while connecting to database. Right now we need to define it in tnsnames.ora file if we need to connect to the database via TCPS.
cx_Oracle.connect('hr', 'hrpwd', 'tcp', 'localhost:1567/orcl')
cx_Oracle.connect('hr', 'hrpwd', 'tcps', 'localhost:1521/orcl')
You can pass the protocol as part of the EZ connect string when using 19c client. See the tech article Oracle Database 19c Easy Connect Plus Configurable Database Connection Syntax:
cx_Oracle.connect('hr', 'hrpwd', 'tcps://localhost:1521/orcl')
Is this what you wanted? I'm a bit confused because you seem to know about this syntax, and about editing tnsnames.ora files.
I don't think connect() should change. Possibly make_dsn() could, but that is a bigger topic of discussion.
Oops yes thanks connect works. I tried makedsn and assumed connect also doesn't work. Yes it would be nice to have makedsn also work but that's not what I raised this issue for.
Thanks.