connect to oracle database with phyton

0

I'm trying to connect to an oracle database via 32-bit phyton 3.6.5, but I miss this error:

I ping the database and receive a correct answer. I can also connect to the developer correctly.

I have also done a tnsping and returns: performed correctly and the parameter file used:

c:\app\oracle\producto.2.0\client_1\NETWORK\ADMIN\sqlnet.ora 
  

DatabaseError: ORA-12154: TNS: the specified connection identifier could not be resolved

The example script:

import cx_Oracle

dsn_tns = cx_Oracle.connect ('BASE_DATOS','1521', 'NOMBRE_SERVICIO')
conn = cx_Oracle.connect('USURIO','CONTRASEÑ','dsn_tns')

Greetings.

    
asked by Jav 27.08.2018 в 10:15
source

0 answers