Oracle connection problem

8 views
Skip to first unread message

jca...@gmail.com

unread,
Aug 4, 2021, 7:52:42 PMAug 4
to sqlalchemy
I am using sqlalchemy 1.4.22 and cx oracle 8.2.1 to connect to production and development environments that each host a similar copy of the same schema.

The connection string that I use is the same for each excluding the password:

oracle+cx_oracle://user:pass@MyTNS

Dev works without a problem, but prod throws an Oracle error:

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

We can connect using sqlplus with the same credentials and tns id, any idea why it may not work for one environment?

Thanks,
jlc

Jonathan Vanasco

unread,
Aug 6, 2021, 5:09:30 PMAug 6
to sqlalchemy
You should ensure the connection string does not have any reserved/escape characters in it.  People have had similar issues in the past.  If that is the case, there are some recent threads in this group and on the github issues that show how to overcome the issue by building a connection string from components.

Other than that, this could be  an Oracle configuration issue? (see http://dba-oracle.com/t_ora_12514_tns_listener_does_not_currently_know_service_requested.htm) Is production configured correctly?
Reply all
Reply to author
Forward
0 new messages