L
L
lPolar2015-01-19 14:26:38
Oracle
lPolar, 2015-01-19 14:26:38

How to set up a connection to Oracle through sqlalchemy?

Hello. I'm trying to connect to an Oracle database using sqlalchemy:

import sqlalchemy as sql
e=sql.create_engine('oracle://user:[email protected]:port/sid')
e.connect()

I am getting error
ORA-12541: TNS:no listener.
At the same time, through Toad, the connection via TNS works fine, but when using a direct connection, the same error occurs.
It seems to me that I have listener.ora configured incorrectly, but I have no idea how and what to write there, since I have no experience with Oracle.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Swartalf, 2015-01-19
@Swartalf

what is currently written in listener.ora, tnsnames.ora ?
and on what platform the base is installed, it does not hurt to find out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question