问题描述
有人知道ODP.NET托管访问(Oracle.ManagedDataAccess 12.2)是否通过Entity Frameworks工具(相对于2017 Entity Framework 6.2)支持LDAP?DBA禁止通过TNS进行访问,因此我不再无法连接到数据库以更新数据模型.我收到的错误消息是ORA-12154 TNS无法解析指定的连接标识符.
Does anyone know if ODP.NET Managed Access (Oracle.ManagedDataAccess 12.2) support LDAP with the Entity Frameworks tools (vs 2017 Entity Framework 6.2)? The DBA inhibited access through TNS, so I no longer unable to connect to database to update the data models. The error message I received was ORA-12154 TNS could not resolve the connect identifier specified.
我试图将LDAPSetting包含在app.net中,但这没有用.我仍然可以使用任何方法来使用实体框架工具来更新这些数据模型吗?
I tried to include the LDAPSetting in the app.net, but that didn't work. Is there any way I could still use the Entity Framework tools to update these data models?
推荐答案
ODP.NET托管驱动程序很可能找不到您的 sqlnet.ora
和 ldap.ora
文件.
Most likely the ODP.NET Managed Driver does not find your sqlnet.ora
and ldap.ora
files.
您是否在 sqlnet.ora
文件中设置了 NAMES.DIRECTORY_PATH =(LDAP,...)
?
Did you set NAMES.DIRECTORY_PATH = (LDAP, ...)
in your sqlnet.ora
file?
您还可以通过 TNS_ADMIN
环境变量或在machine.config中使用脚本来定义 sqlnet.ora
和 ldap.ora
文件的位置与此类似:
You can define location of sqlnet.ora
and ldap.ora
files also by TNS_ADMIN
environment variable or in machine.config with a script similar to this:
set TNS_ADMIN=C:\oracle\network\admin
set Oracle_x64=c:\oracle\product\12.2\Client_x64\odp.net
"%Oracle_x64%\managed\x64\OraProvCfg.exe" /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:%Oracle_x64%\managed\common\Oracle.ManagedDataAccess.dll /set:settings\TNS_ADMIN:%TNS_ADMIN%
set Oracle_x86=c:\oracle\product\12.2\Client_x86\odp.net
"%Oracle_x86%\managed\x86\OraProvCfg.exe" /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:%Oracle_x86%\managed\common\Oracle.ManagedDataAccess.dll /set:settings\TNS_ADMIN:%TNS_ADMIN%
如果这没有帮助,请采取以下解决方法:.但是,在我的计算机上,LDAP解析可以与ODP.NET托管驱动程序配合使用.也许也可以看看适用于.NET的Oracle数据提供程序,托管驱动程序配置
If it does not help, here would be a workaround: ODP.NET Managed library does resolve alias, but 32-bit library does. However, on my machine LDAP resolution works fine with ODP.NET Managed Driver. Perhaps have also a look at Oracle Data Provider for .NET, Managed Driver Configuration
这篇关于ODP.NET可以通过实体框架工具支持LDAP吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!