-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connection string using wallet #360
Comments
It should work but I have not tested it myself. Make sure to setup sqlnet.ora and tnsnames.ora. Do not put username and password in connection string. Just pass the tnsname from the tnsnames.ora file. |
Not all wallets have usernames and passwords so sometimes they are needed in the application parameters. For example when connecting to Oracle Cloud DBs the wallets are only used to enable SSL/TLS. If you are using Oracle cloud, the videos https://www.youtube.com/watch?v=5HlaPpY6gNw and https://www.youtube.com/watch?v=WaVdFZ90Jj8 have some content showing what to do with the wallets. The steps are common for all C based Oracle DB drivers, including go-oci8. |
Not working. "Unable to connect to oracle:ORA-12154: TNS:could not resolve the connect identifier specified" |
Just put in the tnsname, no /@ |
Unable to connect to oracle:ORA-01005: null password given; logon denied |
What happens when you use sqlplus? |
sqlplus works with /@tnsname |
What happens with sqlplus with just tnsname? |
Fails to connect |
@cjbj Any thoughts on where the issue is? Something needs to change in the go-oci8 (oic) code I assume? |
@bhargaviaaa what kind of wallet do you have - does it have username & password, or does it just set up TLS? @MichaelS11 If the wallet has username & password, how is OCI_CRED_EXT being set? E.g. via an explicit flag . Also see p 116 of http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html |
Does not include username and password |
@cjbj Lines 319 to 334 in cbd8d5b
|
@cjbj So what does that mean? |
@cjbj Any more thoughts? |
@MichaelS11 can you check how it's being done in https://github.com/oracle/odpi/blob/v3.3.0/src/dpiConn.c#L542 and https://github.com/oracle/odpi/blob/v3.3.0/src/dpiConn.c#L389 ? |
@cjbj I am not sure what part of that code you are trying to point out. For the OCISessionBegin the credt should be set to OCI_CRED_EXT which seems correct. What other part of the code is important for connecting with wallet? |
It does seem like that is all that should be needed in the code. Have you created a wallet for testing? https://cx-oracle.readthedocs.io/en/latest/user_guide/connection_handling.html#using-an-oracle-wallet-for-external-authentication |
I have not but @bhargaviaaa and other people have. |
@MichaelS11 someone will need to do some debugging and comparison on this. |
Sure, looking for some pointers and how to go about that? |
Run one of the other working drivers and see what it passes? But you'll need a wallet. |
Not sure how that is going to help debug this driver. That will tell me that my wallet works but not what is wrong with this driver. |
@MichaelS11 I'm not sure what you want me to do. I can advise and point to examples, but I'm not able to run your code in a debugger. |
I am looking for help with debugging Oracle OCI code. This driver is just a interface between the Go SQL packages and the Oracle OCI code/package. Just need normal Oracle OCI help / troubleshooting steps for the OCI driver. Can even think about it as if it was C++ code if that helps. |
@MichaelS11 send me email? |
I got wallet login working on a Oracle database installed on Linux. Wallet create example (replace type_*_here lines):
Go sql open example (replace type_tnsname_entry_name_here):
So I think the go-oci8 driver is working unless more information can be provided showing otherwise. |
@mattn Close this? |
Is it possible to connect oracle DB using wallet? If yes please provide example.
The text was updated successfully, but these errors were encountered: