【发布时间】:2020-03-31 13:58:21
【问题描述】:
我一直在尝试使用提供的凭据连接到托管在 IBM 云上的 IBM DB2 服务器。我按照说明进行操作,但收到以下错误:
SQLAlchemy 格式所需的连接信息,例如: postgresql://username:password@hostname/dbname 或现有连接:dict_keys([]) 无法加载插件:sqlalchemy.dialects:ibm_db_sa 需要的连接信息 SQLAlchemy 格式,示例: postgresql://username:password@hostname/dbname 或现有连接:dict_keys([])
这是我使用的代码:
# Remember the connection string is of the format:
# %sql ibm_db_sa://my-username:my-password@my-hostname:my-port/my-db-name
# Enter the connection string for your Db2 on Cloud database instance below
# i.e. copy after db2:// from the URI string in Service Credentials of your Db2 instance. Remove the double quotes at the end.
%sql ibm_db_sa://user:password@dashdb-txn-sbox-yp-dal09-04.services.dal.bluemix.net:50000/BLUDB
如果您能帮助我解决此错误,我将不胜感激。
【问题讨论】:
标签: python db2 database-connection ibm-cloud