title: java.sql.SQLException: Cannot create PoolableConnectionFactory, Connection refused SQL Server
body: <p>I am trying to setup jmeter for sql server. Getting following error</p>
  
  <blockquote>
    <p>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.".)</p>
  </blockquote>
  
  <pre><code>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)
  </code></pre>
  
  <p>Environment variable set to:</p>
  
  <pre><code>CLASSPATH
  C:\Program Files\Microsoft JDBC Driver 6.2 for SQL Server\sqljdbc_6.2\enu\mssql-jdbc-6.2.2.jre8.jar
  </code></pre>
  
  <p>Copied file <code>mssql-jdbc-6.2.2.jre8.jar</code> to <code>C:\JMeter\apache-jmeter-3.3\lib\</code></p>
  
  <p>JMETER setting:</p>
  
  <p><code>DatabaseURL:jdbc:sqlserver://localhost:1433;databaseName=TestDb;integratedSecurity=true;
  jdbcClassDriver: com.microsoft.sqlserver.jdbc.sqlserverdriver</code></p>