由于TNS错误,无法从数据库更新实体数据模型 [英] Cannot update Entity data model from database due to TNS error

查看:239
本文介绍了由于TNS错误,无法从数据库更新实体数据模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从数据库更新我的实体数据模型。今天早些时候,我运行我的应用程序很好,能够访问数据库,因为我有一个tnsnames.ora文件,我复制并粘贴到我的项目文件夹。然后,当我试图打开我的edmx文件时,我收到一条消息:

I'm trying to update my Entity data model from the database. Earlier today, I ran my app just fine and was able to access the database, as I have a tnsnames.ora file that I copied and pasted into my project folder. Then, when i was trying to open my edmx file, I was getting a message along the lines of:

ADO.NET提供程序'Oracle.ManagedDataAccess.Client'没有在机器或应用程序配置文件中注册,或无法加载

"The ADO.NET provider 'Oracle.ManagedDataAccess.Client' is either not registered in the machine or application config file, or could not be loaded"

我注意到我的机器没有安装Visual Studio的ODAC。所以我继续前进了。现在,我可以打开我的edmx文件,但我的向导无法连接到数据库:

I noticed that my machine didn't have ODAC for Visual Studio installed. So I went ahead and did that. Now, I can open my edmx file just fine, but my wizard is failing to connect to the database:

ORA-12154:TNS:无法解析连接标识符指定

"ORA-12154: TNS:could not resolve the connect identifier specified"

自从今天上午以来,我不认为我触摸了我的tnsnames.ora文件。是什么赋予了?

I don't think I've touched my tnsnames.ora file since this morning. What gives?

推荐答案

图解出问题。

tnsnames.ora文件到我安装了Oracle / client_1 / Network / Admin的位置,并在同一位置获取sqlnet.ora文件。

I had to copy the tnsnames.ora file over to where i installed Oracle/client_1/Network/Admin, AND get the sqlnet.ora file in that same location.

这篇关于由于TNS错误,无法从数据库更新实体数据模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆