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

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
Google Online Security Blog
Google Online Security Blog
月光博客
月光博客
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
F
Full Disclosure
G
Google Developers Blog
罗磊的独立博客
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
A
About on SuperTechFans
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
The Register - Security
The Register - Security
U
Unit 42
D
Docker
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
博客园_首页
Google DeepMind News
Google DeepMind News

博客园 - 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 - DotNet编程 office 2010 激活信息查看 [转]DEM数据和影像数据下载汇总 打工是最愚蠢的投资——李嘉诚在深圳大梅沙演讲 常用书籍推荐与下载地址 office 2010系列产品重输密钥的方法 禁用Windows7脱机文件的方法 - DotNet编程
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