views:

22

answers:

2

Hello,

I am using a standalone Oracle.DataAccess manual installation for my project to avoid a full Oracle client installation on customers machines (no oracle home). For this I followed this guide and it works pretty well.

Actually the user/password is stored in a configuration file but I want to use the current AD user so I need to provide an authentication service to the client. The problem is that you need an oracle home to provide these informations to the client, which would be a sqlnet.ora files in your oracle home Network directory in this case. I had the same problem with TNS names but I found that I could provide the full server address directly in the connection string instead of having a tnsnames.ora.

So do you know if there is a similar way or a programmatic way to provide the authentication service to the Oracle client?

Thanks.

+1  A: 

You can specify the environment variable TNS_ADMIN, give it a value of a directory name, and put your sqlnet.ora file there.

DCookie
I accept this answer because I do no think that Oracle provided a programmatical way to specify authentication services. I do not really love the idea of having to set an environment variable for that but at least it is something. Thank you.
Ucodia
After a lot of testing, the fact that it worked was all about luck. I was dynamically defining the environment through .NET, and set TNS_ADMIN to the application directory where I put the sqlnet.ora. But I noticed that it worked even when I am not setting the environment. The only change I noticed using Process Monitor is that it was not searching for TNS_ADMIN path in registry anymore. In fact the Great Oracle Black Box will first search for sqlnet.ora in the application directory even if there is a full client install on the machine.
Ucodia
A: 

After a lot of testing, I discovered that when you use a distributed Oracle.DataAccess client, it will first look in the application directory for a sqlnet.ora even if a Oracle.DataAccess client of the same version is already installed and has a sqlnet.ora in its network/admin directory.

I would really like to find a documentation explaining how ODAC is initializing and configuring and in which order because from here it looks like a real black box!

Ucodia