database - error accessing oracleDB with python -


i used docker run virtual oracle db server on localmachine(host).

it works when use in on shell(bash).

however want make access python interface.

cx_oracle(python interface oracle) installed,

but not accessed on python code(jupyter notebook). code simple below

import cx_oracle con = cx_oracle.connect("system/oracle@localhost:8080") 

error code:

databaseerror                             traceback (most recent call last) <ipython-input-8-681e47c38e7c> in <module>() ----> 1 con = cx_oracle.connect("system/oracle@localhost:8080")  databaseerror: ora-12537:  

i'm not sure can use cx_oracle.connect port that. can check data source name ( dsn ).


first, try connecting without :8080. if doesn't work, try below.


go python interactive mode command line. python -i

import cx_oracle

dsn = cx_oracle.makedsn( 'localhost', '8080' )


if don't find that, check out burleson. site helpful ora issues.

http://www.dba-oracle.com/t_ora_12537_tns_error.htm

and of course, assume have doc:

http://cx-oracle.readthedocs.io/en/latest/module.html?highlight=connect


also, assuming following guide, might want link it's url in comments or in original post.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -