首页 > 其他 > 详细

052-132

时间:2017-12-13 16:16:49      阅读:207      评论:0      收藏:0      [点我收藏+]

The tnsnames.ora file has an entry for the service alias ORCL as follows:
ORCL =
( DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.156.24.216)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.oracle.com)
) )
The TNSPING command executes successfully when tested with ORCL, but you are not able to connect to the database instance with the following command:
SQL> CONNECT scott/tiger@orcl
What could be the reason for this?
A.The listener is not running on the database node.
B.The TNS_ADMIN environmental variable is set to a wrong value.
C.The orcl.oracle.com database service is not registered with the listener.
D.The DEFAULT_DOMAIN parameter is set to a wrong value in the sqlnet.ora file.

如果 listener 没有启动,则 tnsping 不会成功,所以 A 错
TNS_ADMIN 主要应用于一台主机上有多个版本的数据库,指定文件的路径,所以 B 错
当 SERVICE_NAME 填写不正确时,你可以 tnsping 通数据库实例,但是却无法连接到数据库实例,因为你填写错的SERVICE_NAME 并没有注册到 LISTENER 当中,C 正确
DEFAULT_DOMAIN 主要是设定客户端解析名字的域 ,D 错误

052-132

原文:http://www.cnblogs.com/Babylon/p/8032993.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!