1

I am trying to setup jmeter for sql server. Getting following error

Response message: java.sql.SQLException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. 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.".)

java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Environment variable set to:

CLASSPATH
C:\Program Files\Microsoft JDBC Driver 6.2 for SQL Server\sqljdbc_6.2\enu\mssql-jdbc-6.2.2.jre8.jar

Copied file mssql-jdbc-6.2.2.jre8.jar to C:\JMeter\apache-jmeter-3.3\lib\

JMETER setting:

DatabaseURL:jdbc:sqlserver://localhost:1433;databaseName=TestDb;integratedSecurity=true; jdbcClassDriver: com.microsoft.sqlserver.jdbc.sqlserverdriver

4
  • I didn't downvoted, did you put the driver in the right case: com.microsoft.sqlserver.jdbc.SQLServerDriver? Commented Nov 9, 2017 at 9:47
  • Have you followed the instructions in the exception message? If not, please do that first. Commented Nov 9, 2017 at 9:54
  • @user7294900 Yes, I selected it from dropdownlist for class driver. MarkRotteveel, I have checked, sql server is connecting using ssms and i checked TCP/IP is enabled. Commented Nov 9, 2017 at 9:58
  • See stackoverflow.com/questions/18841744/… Commented Nov 9, 2017 at 10:41

2 Answers 2

-1

This setting resolved the issue: DatabaseURL:jdbc:sqlserver://localhost:1433;databaseName=TestDb;integratedSecurity=true;jdbcClassDriver: com.microsoft.sqlserver.jdbc.sqlserverdriver

rest was fine, when i have added integratedSecurity=true parameter, it worked perfectly fine.

Thanks

Sign up to request clarification or add additional context in comments.

Comments

-3

Make sure you have the appropriate validation query selected in JDBC Connection Configuration.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.