[cx-oracle-users] How do I fix the ORA-12514 TNS:listener error?
Brought to you by:
atuining
From: Eric P. <er...@ac...> - 2010-06-14 19:42:45
|
I'm working on a generalized database explorer tool lets you browse Oracle databases. It work for me, but some other people are reporting this error message when an attempt to connect to their DB fails: DatabaseError: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor I build up this connection string: "%s/%s@%s" % (username, password, host) // with an optional ":%d" % (port,) at the end, // but the error is triggered without it. I do all my testing with Oracle running on a dedicated server, and can connect with this string, using this code: conn = cx_Oracle.connect(connectionString) cu = conn.cursor() ... I've been told I should look for two alternatives: 1. Provide a tnsnames.ora file, that contains the database-specific name, and something called the SERVICE_NAME. How would cx_Oracle work with this? 2. An alternative is to bypass tnsnames.ora using this string: <<USER_NAME>>/<<PWD>>@<<HOST>>:<<PORT>>/<<SERVICE_NAME>> ======== Can anyone shed some light on what I have to do to fix the connection problem? Is the SERVICE_NAME what we MySQLer's call the database name? Thanks, Eric |