Oracle beginner problem: can't connect to Oracle using cx_Oracle
johnbenson at fairisaac.com
Wed Jan 28 03:51:02 CET 2004
Hi, I'm a non-Oracle guy just starting to use Python to explore Oracle.
I enclose the Python command prompt log for the usage example further
down with only the user, password and host names changed to keep me out
of trouble. But first, I'd like to point out that I'm able to logon to
myhost, and get into the following via SQL*Plus using myuser/mypassword
Oracle8i Enterprise Edition Release 184.108.40.206.0 - Production
With the Partitioning option
JServer Release 220.127.116.11.0 - Production
(end quote of Unix box SQL*Plus stuff)
so I know that myuser/mypassword works for SQL*Plus on the myhost Unix
I downloaded the cx_Oracle Python interface to Oracle(r) Version: 4.0
Date: December 17, 2003 Win32 binary for Oracle 8i, Python 2.) and
proceeded to exercise the usage example:
PythonWin 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)]
Portions Copyright 1994-2001 Mark Hammond (mhammond at skippinet.com.au) -
see 'Help/About PythonWin' for further copyright information.
>>> import cx_Oracle
>>> connection = cx_Oracle.connect("myuser/mypassword at myhost")
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
DatabaseError: ORA-12514: TNS:listener could not resolve SERVICE_NAME
given in connect descriptor
(end usage example quote)
Any ideas as to what the problem is?
Thanks in advance for the usual valuable and pertinent advice I have
come to expect from this forum.
jsbenson at bensonsystems.com
More information about the Python-list