title: Mule connecting to SQL Server 2012
body: <p>I cannot figure out to connect to a local instance of SQL Server 2012, either LocalDB or SQLExpress. I have Microsoft's sqljdbc4.jar driver in the path.  I'm using Mule 3.3.1 CE; I don't have EE available to me yet.</p>
  
  <p>I tried using LocalDB with no success.  I found some posts that indicate that LocalDB might not be compatible with MS's driver and recommend a switch to SQLExpress.  However, still no luck with that.</p>
  
  <p>I am able to connect to my SQLExpress instance using SQLCMD (e.g. "sqlcmd -S DEFTA-1\SQLEXPRESS") and with SSMS using the credentials in my flow.</p>
  
  <p>My configuration of the data source and connector is as follows:</p>
  
  <pre><code>&lt;spring:beans&gt;
      &lt;spring:bean id="SQLServer_DataSource" name="Bean" class="org.enhydra.jdbc.standard.StandardDataSource"&gt;
          &lt;spring:property name="driverName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/&gt;
          &lt;spring:property name="url" value="jdbc:sqlserver://DEFTA-1\SQLEXPRESS:1433;user=test_user;password=test_pwd;"/&gt;
      &lt;/spring:bean&gt;
  &lt;/spring:beans&gt;
  
  &lt;jdbc:connector name="Database" dataSource-ref="SQLServer_DataSource" 
      validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"&gt;
      &lt;jdbc:query key="InsertRecord" value="insert into eai.dbdusage (id,name) values (1,'hello world')"/&gt;
  &lt;/jdbc:connector&gt;
  </code></pre>
  
  <p>I've tried changing the server specification use a double backslash in the server name, to leave off the port number, to use &amp;#92; instead of the backslash...none of it works.  I also tried something like "jdbc:sqlserver://localhost:1433;instanceName=DEFTA-1\SQLEXPRESS..." and "jdbc:sqlserver://localhost:1433;instanceName=SQLEXPRESS..."</p>
  
  <p>The exception is:</p>
  
  <p>Cannot get connection for URL jdbc:sqlserver://DEFTA-1\SQLEXPRESS:1433;user=test_user;password=test_pwd; : The TCP/IP connection to the host DEFTA-1, 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>
  
  <p>Is there something I need to do to enable a connection on the SQL Server side, or some change I need to make to my configuration?</p>