ODBC 连接到 oracle 超时
我是新来的,所以我自我介绍一下,我的名字是 Ettore Giallaurito,我的工作是在意大利从事 IT 服务。
我的问题:
我尝试在 XP 下通过 odbc(系统 DNS)连接连接到 Oracle 数据库实例,但收到错误 ORA1254 TNS:无法解析指定的连接标识符。
我正在使用 oracle instant client 11.2 并且我已经正确配置了 tnsnames,因为我可以使用 TNS 方法与 DBVisualizer 连接。 老实说,在这种情况下我确实已连接,但我需要插入完整的连接字符串:
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = repsit01.sit.sor)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = REPSIT01))
)
因为如果我仅使用 SID,它不会让我进入,在我的情况下为 REPSIT01,如下所示。
我的 tns 条目如下:
REPSIT01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = REPSIT01))
)
任何帮助将不胜感激。
预先感谢埃托雷。
I'm new here so I introduce myself, my name is Ettore Giallaurito and my job is in the IT services in Italy.
My question:
I'm trying to connect to an Oracle DB instance through an odbc (System DNS) connections under XP but I get an error ORA1254 TNS:could not resolvethe connect identifier specified.
I'm using oracle instant client 11.2 and I've my tnsnames properly configured, since I can get connected with DBVisualizer using the TNS method.
To be honest I do get connected in this case, but I need to insert the full connect string:
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = repsit01.sit.sor)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = REPSIT01))
)
since it doesn't get me in if I use just the SID, in my case REPSIT01 as showed below.
My tns entry is as follow:
REPSIT01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = REPSIT01))
)
Any help would be much apprecciated.
Thanks in advance Ettore.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将环境变量 TNS_ADMIN 设置为 tnsnames.ora 文件所在的目录。
Try setting the environment variable TNS_ADMIN to the directory where your tnsnames.ora file resides.