OCISessionBegin failes for OS authentication [message #273359] |
Wed, 10 October 2007 02:31 |
Summy
Messages: 1 Registered: October 2007
|
Junior Member |
|
|
We do the following to connect to the database using the OS authentication:
1) Initialize the OCI using OCIInitialize
2) Initialize the environment using OCIEnvInit
3) We create four handles for error, server and service context and a user session.
4) Then we do a server attach using OCIServerAttach by passing the allocated server handle.
5) We then set the server attribute (OCI_ATTR_SERVER) of the service context using OCIAttrSet.
6) We then execute OCISessionBegin and pass the mode as OCI_CRED_EXT.
The above sequence works fine if ORACLE_SID is set in the environment and if we pass an empty string for the parameter "dblink" in OCIServerAttach.
But we fail to authenticate (OCISessionBegin fails with ORA-01017) if we pass in the "dblink" parameter with the same value as set in ORACLE_SID environment variable or a different value.
[Updated on: Wed, 10 October 2007 02:34] Report message to a moderator
|
|
|