我需要将Jmeter连接到本地MS SQL Server数据库。当我使用远程数据库时,一切正常,但是当涉及到本地数据集时,我一开始会陷入困境。
我尝试了以下设置以连接到数据库:
Database URL: jdbc:sqlserver://DESKTOP-IEK3G1S\SQLEXPRESS;DatabaseName=TestBase
JDBC Driver class : com.mircrosoft.sqlserver.jdbc.SQLServerDriver
这就是我得到的:
Response message: java.sql.SQLException:
Cannot create PoolableConnectionFactory (The connection to the host DESKTOP-IEK3G1S, named instance sqlexpress has failed.
Error: "java.net.SocketTimeoutException:
Receive timed out". Verify the server and instance names, check that no firewall is blocking UDP traffic to port 1434, and for SQL Server 2005 or later verify that the SQL Server Browser Service is running on the host.)```
答案 0 :(得分:1)
好吧,我不得不重新创建SQL Browser连接,并手动关闭防火墙选项中打开的所有内容,并且一切都开始工作。
答案 1 :(得分:0)
Enable TCP/IP在SQL Server配置中:
启用IP地址并设置用于连接的所需TCP端口:
SQL Server default TCP port is 1433,很可能应该在JDBC Connection Configuration设置中使用1433
Integrated Security = true
添加到JDBC URL(如果您打算使用当前凭据进行连接(您将需要在Java Library Path下使用sqljdbc_auth.dll
文件)< / li>
select 1