Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-12154: TNS:could not resolve the connect identifier specified - when connecting via Python scrip

User_427NNAug 19 2022 — edited Aug 19 2022

I am trying to connect to a DB via python script. Script works succesfully on my laptop, but I've attempted to get it running on a VM and its not working correctly, throwing below Oracle error:
(cx_Oracle.DatabaseError) ORA-12154: TNS:could not resolve the connect identifier specified
SQL Developer is set up on the VM and I am able to use it as normal, connected to same DB I am trying to access via Python. Any idea what might be the source of my issue?

Comments
Post Details
Added on Aug 19 2022
0 comments
366 views