连接 C 语言中的安格尔
我需要通过 OpenAPI 连接到 Ingres 提供的 demodb,Ingres 和 C 应用程序都在 Windows 上运行。 我所做的:
- 在 Ingres 网络实用程序中创建了一个名为“usernode”的“节点”。
- 在 Ingres 安装中创建用户帐户(名为“用户”,密码为“用户”)和 Windows 用户管理(相同的凭据)。
- 在数据库中向用户授予必要的权限。
- 在 C 代码中,我使用 IIAPI_CONNPARM 结构调用了 IIapi_connect() 函数。 使用过的会员: co_target = "用户节点::demodb", co_username = "用户", co_password = "user"
但 IIapi_connect() 调用返回错误:
“用户提供了一个 vnode 作为数据库名称 (vnode::dbname) 的一部分,但缺少该 vnode 的连接信息。使用 NETUTIL 输入 vnode 的连接信息。 ”
有人知道“节点”这个奇怪的概念吗?
成功连接所需的最少步骤(数据库管理和函数参数传递)是什么?
I need to connect to an Ingres supplied demodb through OpenAPI, both Ingres and C application running on windows. What i have done:
- Created a "node" in the Ingres Network Utility named "usernode".
- created user accounts in the Ingres installation (named "user" password "user") and in the Windows user management (the same creds.)
- Granted necessary privileges to the user in the database.
- In C code i have called IIapi_connect() function with an IIAPI_CONNPARM structure.
Used members:
co_target = "usernode::demodb",
co_username = "user",
co_password = "user"
But IIapi_connect() call returns an error:
"User provided a vnode as part of the database name (vnode::dbname), but connection information for that vnode is missing. Enter connection information for the vnode using NETUTIL."
Anybody knows something that is a weird concept "node"?
What are the minimum steps (in the database administration and the function parameters passing) necessary for the successful connect?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您收到以下错误是因为您的用户 ID 尚未添加到服务器。
我猜测正在传递的用户 ID 是在虚拟节点(又名 vnode)定义中定义的,并且该用户需要添加到服务器上的用户列表中。以下内容将通过命令添加用户行,将 USERNAME 更改为您要添加的用户名:
对于 Windows:
对于 UNIX/Linux/OS X:
或者,您可以在连接中使用动态 vnode,以便 co_target 指定所有连接信息(包括用户详细信息):
例如
,如果您想查看 Ingres 的 OpenAPI 代码的工作示例,请查看 Ingres PECL 扩展名。
You get the following error because your user id has not been added to the server.
I am guessing that the user id being passed across is defined in the virtual node (aka vnode) definition and it's that user that needs to be added to the user list on the server. The following will add a user from the command line, change USERNAME to the username you wish to add:
For Windows:
For UNIX/Linux/OS X:
Alternatively you can use a dynamic vnode in your connection such that co_target specifies all the connection information (including user details):
for example
If you want to see a working example of OpenAPI code for Ingres take a look at the Ingres PECL extension.
任何问题?
Any questions?