0

I'm new to python environment. I try install cx_Oracle in windows 8.1 based on the installation guide(https://www.cs.utexas.edu/~scohen/cs327e_spr15/cx_Oracle/windows.html, easy_install cx_Oracle (python package) on Windows)

When I tried to connect with cx_Oracle I have encountered an error "ORA-12170 TNS:Connection timeout occurred", "cx_Oracle.DatabaseError: ORA-12541: TNS:no listener". Why this error happens. Does anyone help me.

I could not understand what is wrong with my question. In addition to voting my question as negative please guide what makes me wrong. I was totally helpless.

For ORA_12170 (ORA-12170: TNS:Connect timeout occurred) I couldn't issue an lsnrtcl status. For ORA_12541 (Oracle client ORA-12541: TNS:no listener) I couldn't find (control panel -> administrative tools -> services ->oracle) oracle running.

Community
  • 1
  • 1
priya
  • 29
  • 7

1 Answers1

1

The error "ORA-12541: TNS:no listener" occurs when the server to which you are trying to connect does not have a listener running. Check that the server has a listener running and that it is responding. You can do that by issuing the command

lsnrctl status

on the server on which the listener is running. You can also use SQL*Plus to connect to the database using the connect string you are attempting with cx_Oracle. Once you are able to connect successfully with SQL*Plus you should have no difficulty with cx_Oracle.

Anthony Tuininga
  • 6,388
  • 2
  • 14
  • 23