ORA-12154: TNS: could not resolve the connect identifier specified解决办法
来源:互联网 发布:风暴大陆战盾进阶数据 编辑:程序博客网 时间:2024/06/16 17:27
前两天登录Oracle的时候,Oracle提示错误“ORA-12154: TNS: could not resolve the connect identifier specified”,翻译成中文就是“error ora-12154:tns:无法解析指定的连接标识符”。
对于这个问题,根据字面意思来理解就是连接出现了问题,首先想到的就是Oracle的服务是否打开了。检查Oracle的各项服务,发现Oracle的服务确实没打开,但是打开Oracle服务之后,还是提示这个问题。由于是tns错误,然后想到的就是Oracle的tnsnames.ora配置文件。tnsnames.ora是配置连接数据库的连接字符串,是比较重要的一个文件。
在tnsnames.ora文件中可以配置不同的数据库,可以配置本机的也可以配置远程的,比如说根据不同用户,不同的协议,不同的ip地址,不同的服务名都可以配置,这就要看个人的需要了!Oracle的连接字符串如下:
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.112)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
这个配置文件中,protocol是用来配置所使用的网络协议,可以使TCP,当然也可以使UDP协议或其它的。host配置Oracle的ip地址,可以是服务器IP,也可以是本机IP。PORT就是Oracle的端口了。SERVICE_NAME是Oracle数据库的名字。
我的这个问题是因为我对同一个数据库定义了两个连接字符串,只是字符串名字不一样,其他方面都一样,当我删掉一个连接字符串之后就可以了!这不是说同一个数据库不能弄两个连接字符串名字,而是要求连接字符串的内容不同,比如说协议、主机等方面不同。对于同一个数据库的不同字符串连接,我的理解就是这个样子的!
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154:TNS could not resolve the connect identifier specified
- ORA-12154: TNS: could not resolve the connect identifier specified
- ORA-12154:TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ora--12154 :TNS :could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- ORA-12154: TNS:could not resolve the connect identifier specified
- 使用sqlplus连接数据库时报"ORA-12154:TNS:could not resolve the connect identifier specified"解决办法
- Linklabel控件的使用
- 篮球飞人
- ORA-27061: skgfospo: waiting for async I/Os failed
- 转载--程序优化
- 【symbian】开发之【网络编程--RHttpDownload】
- ORA-12154: TNS: could not resolve the connect identifier specified解决办法
- 学习GNU Make (1)(转)
- JAVA自动拆装箱详细说明(转)
- 删除快捷方式的箭头
- 学习GNU Make (2): 规则
- 显示网络配置
- 转载--编译应用程序
- 查看电脑硬件信息
- optimizer_index_caching和optimizer_index_cost_adj