用于连接到 MsSQL 命名实例的 JNDI 示例
我们正在使用 Pentaho Data Integration(开源 ETL 工具)并尝试使用 JNDI 连接来连接到 MS SQL 2005 数据库。如果我们在服务器上使用默认实例,它工作得很好,但是我们遇到的问题是尝试让它连接到命名实例。
如果您能提供一个例子或一个可以查看的地方,我们将不胜感激。
谢谢。
We're using Pentaho Data Integration(Open source ETL tool) and are trying to use a JNDI connection to connect to a MS SQL 2005 database. If we use a default instance on the server it worked fine, however issue that we are having is trying to get it to connect to a named instance.
If you could provide an example or somewhere to look we'd be grateful.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 Microsoft 建议您在不同的端口上运行命名实例,因此当您包含端口号时,他们决定完全忽略命名实例。
因此,您可以删除端口号并附加命名实例,例如
hostname\instance
,或者再次删除端口号并使用属性instanceName=myinstance
。不确定这如何转换为 JNDI,但我们已经在 Spoon 中成功使用了 SQL Server JDBC 驱动程序和集成的 Windows 安全性。
Because Microsoft recommends that you run named instances on different ports, they decided to completely ignore the named instance when you include the port number.
Therefore you can either drop the port number and append the named instance, e.g.
hostname\instance
or again drop the port number and use the propertyinstanceName=myinstance
.Not sure how this translates to JNDI but we have been successful using this in Spoon with the SQL Server JDBC driver and integrated windows security.