惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园 - 司徒正美
N
News and Events Feed by Topic
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
N
News and Events Feed by Topic
O
OpenAI News
L
LangChain Blog
F
Full Disclosure
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
Cloudbric
Cloudbric
W
WeLiveSecurity
Application and Cybersecurity Blog
Application and Cybersecurity Blog
罗磊的独立博客
Attack and Defense Labs
Attack and Defense Labs
PCI Perspectives
PCI Perspectives
TaoSecurity Blog
TaoSecurity Blog
AI
AI
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cisco Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
T
The Exploit Database - CXSecurity.com
T
Threatpost
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Last Week in AI
Last Week in AI
雷峰网
雷峰网
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Cyber Attacks, Cyber Crime and Cyber Security
博客园 - 聂微东
P
Proofpoint News Feed
Latest news
Latest news
S
SegmentFault 最新的问题
J
Java Code Geeks
T
Threat Research - Cisco Blogs
H
Help Net Security
P
Privacy International News Feed

博客园 - DotNet编程

统计文件夹内所有文件信息的小程序 SQL格式化插件—SQL Pretty Printer Win7版IE10浏览器正式版官方下载地址 MEF开发资源 Windows Store 应用程序开发示例资源 [转]李彦宏:给青年创业者提出了七条宝贵建议 DWG TrueView 2010 下载地址 [转]亿万富豪给应届毕业生的10条忠告 常用的数学函数说明 Windows 8 Release Preview下载地址 [转]xna 3.1 to xna 4.0 xna开发资源收集 解决:Cannot find ContentTypeReader HeightmapCollision.HeightMapInfoReader office 2010 激活信息查看 [转]DEM数据和影像数据下载汇总 打工是最愚蠢的投资——李嘉诚在深圳大梅沙演讲 常用书籍推荐与下载地址 office 2010系列产品重输密钥的方法 禁用Windows7脱机文件的方法
ODP.NET 开发 出现 ORA-12154: TNS:could not resolve the connect identifier specified 错误
DotNet编程 · 2013-06-14 · via 博客园 - DotNet编程

原因:
ODTwithODAC112030安装后,新装了一个oracle11G客户端,ODP.NET是通过 oracle11G客户端连接服务名访问的,
但在安装后的"C:\app\furenjun\product\11.2.0\client_1\Network\Admin"文件夹中没有对服务命名进行配置。
致Oracle.DataAccess.dll 不能解析oracle连接服务名。

解决方法:
将 原来装的 C:\oracle\product\10.2.0\db_1\network\ADMIN 目录下的 tnsnames.ora 文件 复制到
新装的 C:\app\furenjun\product\11.2.0\client_1\Network\Admin 文件夹下即可。

oracle的官方解释:

======================================================

http://www.oracle.com/technetwork/cn/topics/odt-faq-085407.html#ORA-12154:_TNS:could_not_resolve_the

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

Scenario: You just installed Oracle Developer Tools, and now you cannot connect to the database using a Oracle connect alias that has worked in the past. You get a ORA-12154 error when you attempt to connect.

Cause: When you install Oracle Developer Tools, it typically creates a new "Oracle Home" (a new Oracle subdirectory, for example C:\oracle\product\10.2.0\my_new_home ) Each Oracle home maintains it's own copy of your connect aliases in a file called TNSNAMES.ORA. When you try to connect from this new Oracle home, none of your old connect aliases will exist in the new copy of TNSNAMES.ORA, therefore you get this error. They need to be copied over to the new Oracle home.

Solution: Copy <OLD_ORACLE_HOME>\NETWORK\ADMIN\TNSNAMES.ORA to <NEW_ORACLE_HOME>\NETWORK\ADMIN\TNSNAMES.ORA .
In some configurations, copying SQLNET.ORA and LDAP.ORA files from the same directory above may also be required.

Additionally:

64-bit Windows users who after doing the above steps still get ORA-12154 should either: 1) Upgrade to the latest version of their Oracle client that contains the fix for bug 3807408, or 2) rename subdirectories in their application that contain parenthesis to remove those parenthesis, in particular: C:\Program Files (x86)\Microsoft SQL Server and C:\Program Files(x86)\Microsoft Visual Studio 8

======================================================
我电脑上的开发环境:

======================================================
VS.NET 2010
Oracle 10G
ODP.Net  (  ODTwithODAC112030.zip,下载地址:http://www.oracle.com/technetwork/database/windows/downloads/index-101290.html
ODAC 11.2 Release 5 (11.2.0.3.20) with Oracle Developer Tools for Visual Studio