Connecting to remote Oracle db via Python
xrgtn at yandex.ru
Fri Feb 18 23:33:53 CET 2011
On Thu, Feb 17, 2011 at 02:40:22AM -0800, pstatham
> I've installed the cx_Oracle module for Python
> and I'm trying to connect to my remote Oracle
Can you tnsping your remote Oracle DB
> >>> uid = "scott"
> >>> pwd = "tiger"
> >>> service = "10.5.1.12:1521:PR10"
> >>> db = cx_Oracle.connect(uid + "/" + pwd + "@" + service)
Try 'tnsping service' or 'sqlplus uid/pwd at service'
in your Korn/Bourne/whoever shell 1st. If this
works, then cx_Oracle will work too.
'service' must be specified in system TNSNAMES
file or in your ~/.tnsnames.ora
With best regards,
More information about the Python-list