开发者

How to autologin to oracle using OCI with C++ using windows credentials?

Basically I have a C++ app which login to oracle db using OCI. DB is configured to authenticate users from windows domain user accounts.

At the moment when my client log in, I pass user name and password to OCI in order to login 开发者_如何学Cby setting OCI_ATTR_PASSWORD and OCI_ATTR_USERNAME attributes in user session handle.

What should I do in the code to make OCI take windows credencials directly instead of me providing them through the code?


See Oracle Call Interface Programmer's Guide - OCISessionBegin()

The second type of credentials supported are external credentials. No attributes need to be set on the user session handle before calling OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent to the Oracle7 'connect /' syntax. If values have been set for OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are ignored if OCI_CRED_EXT is used.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜