【发布时间】:2019-01-29 17:10:21
【问题描述】:
下面是我在 python 上执行的代码。
import cx_Oracle
oracle_url = user/p@ssword@hostname:1521/db_service
cx_Oracle.connect(oracle_url)
它给出错误:ORA-12154: TNS:could not resolve the connect identifier specified
尝试过的解决方案(适用于 powershell 或 CMD):
- 在我的密码周围添加“引号”没有帮助。
- 添加“引号”也不起作用。
【问题讨论】:
-
如果将“@”替换为 URL 或百分比编码值:“%40”会怎样?
标签: python python-3.x oracle cx-oracle