cx_Oracle can't use JDBC thin to connect. You need to use an Oracle Client (like Instant Client which you can download from here: Oracle Instant Client Downloads). Then, you can use EZ connect as in the following:
db_connection = cx_Oracle.connect("user/password@server:port/service")
You replace the bits in the string with the values for your configuration. A default configuration might look like this:
db_connection = cx_Oracle.connect("cx_Oracle/welcome@localhost/orclpdb")
Essentially, any connect string that works with SQL*Plus should also work with cx_Oracle. You just can't use JDBC thin!
Hope that helps.
Anthony, Thank you for your suggestion and I'm able to successfully establish a database connection now. I stripped down my complex connection string into "user/password@server:port/service" format and that solved the problem. Because my initial connection string has two hosts, i prepared two connections string one for each host in the suggested format and found out that one of the host connection is no longer valid and that is throwing me an error "ORA-12154". I appreciate your quick response with a working solution.
You're welcome. Glad to be of help!