开发者

Programmaticaly provide SqlNet authentication service name to Oracle client

开发者 https://www.devze.com 2023-01-14 13:05 出处:网络
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 wo

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 n开发者_如何学编程eed 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.


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


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!

0

精彩评论

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