Skip to Main Content

Oracle Database Discussions

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!

Oracle connection using python

3733902Jun 27 2018 — edited Jun 27 2018

Hi All,

I am trying to Connect to oracle using python. i have written the following code

"import cx_Oracle

con = cx_Oracle.connect('odsdb/xxxxxx@xxxxxx:1521/xxxx')"

and  also i have  downloaded instance client package and added to environmental variable path.

but after executing  i am getting this error 'cx_Oracle.DatabaseError: ORA-12545: Connect failed because target host or object does not exist'

and also with this same username password and host i am able to connect using oracle SQL developer

can someone please help me?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2018
Added on Jun 27 2018
1 comment
437 views