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

推荐订阅源

AI
AI
博客园 - 叶小钗
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
Vercel News
Vercel News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
阮一峰的网络日志
阮一峰的网络日志
D
Docker
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Register - Security
The Register - Security
J
Java Code Geeks
S
SegmentFault 最新的问题
月光博客
月光博客
G
Google Developers Blog
美团技术团队
Last Week in AI
Last Week in AI
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
T
The Blog of Author Tim Ferriss
腾讯CDC
Recent Announcements
Recent Announcements
Recorded Future
Recorded Future
The Cloudflare Blog
有赞技术团队
有赞技术团队
博客园_首页
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
B
Blog
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
F
Fortinet All Blogs
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
爱范儿
爱范儿
D
DataBreaches.Net
F
Full Disclosure
M
MIT News - Artificial intelligence
博客园 - 司徒正美
H
Help Net Security

博客园 - 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