python - Oracle connection string with at sign @ in pasword -


i have code connect oracle using connection string:

conn = cx_oracle.connect('username/password@server:port/services') 

but problem password contain @ character may become

conn = cx_oracle.connect('username/p@ssword@server:port/services') 

it return

databaseerror: ora-12154: tns:could not resolve connect identifier specified

i use django oracle settings

databases = {     'default': {         'engine': 'django.db.backends.oracle',          'name': 'services',           'user': 'user',                               'password': 'p@ssword',                           'host': 'ip',                               'port': 'port',                           } } 

i cant change password :( know problem?

i haven't tried cx_oracle, might able connect specifying individual parameters -

conn = cx_oracle.connect(user='username', password='p@ssword', dsn='server:port/services') 

or

dsn_tns = cx_oracle.makedsn('server', 'port', 'services') conn = cx_oracle.connect(user='username', password='p@ssword', dsn=dsn_tns) 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -