【问题标题】:Jetbrains 0xDBe: Connecting to SQL Server using Windows Authentication?Jetbrains 0xDBe:使用 Windows 身份验证连接到 SQL Server?
【发布时间】:2015-02-17 19:44:54
【问题描述】:

Jetbrains 0xDBe 是否支持使用 Windows 身份验证登录 SQL Server?

我正在使用运行 OS X Mavericks 的 Mac 并尝试通过 VPN 连接到我们的公司临时数据库。那里有很多问题......

现在我的网址是这样的:

jdbc:sqlserver://10.11.222.333:12345

我尝试将integratedSecurity 设置为true,还尝试在 URL 中指定域:

jdbc:sqlserver://10.11.222.333:12345;domain=MyDomain

无论如何,当我测试连接时,它只是超时并出现此错误:

Connection to Staging failed
java.sql.SQLException: The TCP/IP connection to the host 10.11.222.333, port 12345 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
    at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:241)
    at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2243)
    at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:491)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1309)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
    in RemoteDriverImpl.connect(RemoteDriverImpl.java:27)
    in RemoteUtil.access$100(RemoteUtil.java:36)
    in RemoteUtil$RemoteInvocationHandler.invoke(RemoteUtil.java:227)
    at com.sun.proxy.$Proxy84.connect(Unknown Source)
    in LocalDataSource.getConnection(LocalDataSource.java:240)

有什么建议吗?

【问题讨论】:

    标签: macos sql-server-2012 windows-authentication osx-mavericks datagrip


    【解决方案1】:

    我遇到了同样的问题,但最终通过将域添加到“管理数据源”窗口中的 jTds 驱动程序高级设置找到了解决方法。

    然后使用以下连接字符串:

    jdbc:jtds:sqlserver://<SERVER>:<PORT>;integratedSecurity=true;authenticationScheme=JavaKerberos
    

    或用于连接到命名实例:

    jdbc:jtds:sqlserver://<SERVER>;instance=<NAMED_INSTANCE>;integratedSecurity=true;authenticationScheme=JavaKerberos
    

    【讨论】:

    • 感谢您的回答,迈克尔!一个问题......在jTds高级设置中,我必须输入键/值对。我假设您在此处输入域作为值 - 您使用的密钥是什么? domain? host?
    • 没问题乔希。 'Domain' 的键已经在 0xDbe 中 jTds 的高级设置列表中(至少对我来说是这样)。它大约是列表的 1/2。如果不存在,则键/值对为: Key = Domain
    • @JoshEarl,当您下载驱动程序时,会显示域(和其他)的密钥。在那之前,高级设置都是空的。
    猜你喜欢
    • 2013-09-07
    • 2011-04-10
    • 1970-01-01
    • 2014-07-15
    • 2015-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多