简体   繁体   English

IBM DB2 连接

[英]IBM DB2 Connections

Why can I connect to my sql db2 while using jupyter notebooks in ibm cloud but when I try to run the same connection string in ms vs code I get an error?为什么在 ibm cloud 中使用 jupyter notebooks 时可以连接到我的 sql db2 但是当我尝试在 ms vs code 中运行相同的连接字符串时出现错误?

'''%sql ibm_db_sa://un:pw@host:port/db?security=SSL''' '''%sql ibm_db_sa://un:pw@host:port/db?security=SSL'''

(ibm_db_dbi.Error) ibm_db_dbi::Error: [IBM][CLI Driver] SQL5005C The operation failed because the database manager failed to access either the database manager configuration file or the database configuration file.\r SQLCODE=-5005 (Background on this error at: http://sqlalche.me/e/dbapi) Connection info needed in SQLAlchemy format, example: postgresql://username:password@hostname/dbname or an existing connection: dict_keys([]) (ibm_db_dbi.Error) ibm_db_dbi::Error: [IBM][CLI Driver] SQL5005C 操作失败,因为数据库管理器无法访问数据库管理器配置文件或数据库配置文件。\r SQLCODE=-5005(此背景错误:http://sqlalche.me/e/dbapi) SQLAlchemy 格式所需的连接信息,例如:postgresql://username:dict_keyname 或现有连接

Could you specify what is ms?你能指定什么是ms吗? Also please try to reach the dba admin to verify the user account has the correct privileges to access to the database.另外请尝试联系 dba 管理员以验证用户帐户是否具有访问数据库的正确权限。 If you are trying to connect in remote mode from a Linux environment you will need a SSL certificate to ensure the correct connection.如果您尝试从 Linux 环境以远程模式连接,则需要 SSL 证书以确保正确连接。 And check if the instance is UP and if not try to run db2start.并检查实例是否已启动,如果未启动,请尝试运行 db2start。

In my case I got error就我而言,我遇到了错误

SQL0332N Character conversion from the source code page "874" to the target code page "1252" is not supported. SQL0332N 不支持从源代码页“874”到目标代码页“1252”的字符转换。 SQLCODE=-332 SQLCODE=-332

I found the codepage of table is 874 and my OS is not set non-Unicode so I go to the Region setting and I solved this by changing at 'Language for non-Unicoded programs' from English(United States) to Thai(Thailand)我发现表的代码页是 874 并且我的操作系统没有设置为非 Unicode,所以我将 go 设置为区域设置,我通过将“非 Unicode 程序的语言”从英语(美国)更改为泰语(泰国)解决了这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM