SQLProvider icon indicating copy to clipboard operation
SQLProvider copied to clipboard

Using Oracle Wallet in connection string

Open Pranav180495 opened this issue 8 years ago • 3 comments

Description

Hi I want to use an oracle wallet as a part of my connection string but I can't seem to be able to get it to work with SqlDataProvider. Initially we were using the username and password credentials in the connection string to connect to the DB but have since switched to using a wallet and the library doesn't seem to support that.

type sql = SqlDataProvider<ConnectionString = "User Id=test_user;Password=test_password ;Data Source=test_db_connectionstring", ResolutionPath", DatabaseVendor = Common.DatabaseProviderTypes.ORACLE>

When using the wallet, I try using a connection string similar to this:

https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9527479800346454884

I have tested the wallet on my machine and I am able to connect to it from the command prompt so there are no issues from the Oracle side.

Repro steps

Replace the original Oracle connection string with a wallet connection string and follow a syntax like this

type sql=SqlDataProvide<ConnectionString="Data Source=ORCL;User ID=/;Min Pool Size=4;Max Pool Size=4";ResolutionPath", DatabaseVendor = Common.DatabaseProviderTypes.ORACLE>

The wallet is created and has been added to tnsname.ora.

Expected behavior

We expect it to connect to the database using the Oracle wallet instead of the connection string with credentials.

Actual behavior

I get an error with invalid username/password;logon denied . I have tried pointing to the wallet_location in the connection string but I am still thrown this error:

image

Known workarounds

Using the username/password for the user works fine however, we would still like to use the Oracle wallet for our application.

Related information

  • Oracle
  • Windows 7
  • .NET 4.5.2,

Pranav180495 avatar Aug 30 '17 08:08 Pranav180495

Any answer or this ? I am having the same issue

brsc2909 avatar Sep 13 '17 10:09 brsc2909

Our great Oracle guru @colinbull may be the correct person to respond to this.

Thorium avatar Sep 13 '17 14:09 Thorium

Which driver are you using managed or native? Because I'm not sure that oracle wallet connection strings are fully supported with the managed driver but as with all oracle documentation it is hard to tell. It also looks if it is supported you might need to add some configuration to the app.config to point the wallet file. See here https://docs.oracle.com/cd/E63277_01/win.121/e63268/InstallManagedConfig.htm#ODPNT8167

I personally have never used wallet connections. But hopefully this is some help.

colinbull avatar Sep 13 '17 15:09 colinbull