title: Sonar with SQL Server 2008
body: <p>I am trying to setup Sonar 3.6 and/or 3.6.2 with SQL Server 2008. For testing in preparation of conversion from MySql to SQL Server. I am getting no errors when running:</p>
  
  <pre><code>sonar.sh console
  </code></pre>
  
  <p>Console Output:</p>
  
  <pre><code>Running sonar...
  wrapper  | --&gt; Wrapper Started as Console
  wrapper  | Launching a JVM...
  jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
  jvm 1    |
  jvm 1    | 2013-07-31 11:41:12.374:INFO:oejs.Server:jetty-7.6.11.v20130520
  jvm 1    | JRuby limited openssl loaded. http://jruby.org/openssl
  jvm 1    | gem install jruby-openssl for full support.
  jvm 1    | 2013-07-31 11:41:43.963:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/alm/sonar-3.6.2/war/sonar-server/},file:/alm/sonar-3.6.2/war/sonar-server
  jvm 1    | 2013-07-31 11:41:44.034:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:29000
  </code></pre>
  
  <p>I am running my database on a remote server.  This should not be a problem though.</p>
  
  <p>I am able to access the server with the same credentials with DBVisualizer, so I would imagine it should go through with sonar.</p>
  
  <p>The driver I am using is the one bundled with sonar.</p>
  
  <p>The error that I am getting is web based when I try and access the server. </p>
  
  <pre><code>We're sorry, but something went wrong.
  
  Please try back in a few minutes and contact support if the problem persists.
  
  &lt;%= link_to "Go back to the homepage", home_path %&gt;
  </code></pre>
  
  <p>When I use the h2 embedded database I have no problem accessing it, so I deduce that this is most likely a problem with my database setup.</p>
  
  <pre><code>---------------------------------------------------------
  # WEB SETTINGS - STANDALONE MODE ONLY
  # These settings are ignored when the war file is deployed to a Java EE server.
  #---------------------------------------------------------
  # Listen host/port and context path (for example / or /sonar). Default values are  0.0.0.0:9000/.
  sonar.web.host:                           localhost
  sonar.web.port:                           9500
  sonar.web.context:                        /sonar
  
  # Log HTTP requests. Deactivated by default.
  #sonar.web.jettyRequestLogs: ../../logs/jetty-yyyy_mm_dd.request.log
  #sonar.web.jetty.threads.min:              5
  #sonar.web.jetty.threads.max:              50
  
  #-----------------------------------------------------------------------
  # DATABASE
  #
  # IMPORTANT : the embedded database H2 is used by default.
  # It is recommended for tests only. Please use an external database
  # for production environment (MySQL, Oracle, Postgresql, SQLServer)
  #
  #-----------------------------------------------------------------------
  
  #----- Credentials
  # Permissions to create tables and indexes must be granted to JDBC user.
  # The schema must be created first.
  sonar.jdbc.username:                       sonar
  sonar.jdbc.password:                       sonar
  
  #----- Embedded database H2
  # Note : it does not accept connections from remote hosts, so the
  # sonar server and the maven plugin must be executed on the same host.
  
  # Comment the following line to deactivate the default embedded database.
  #sonar.jdbc.url:                            jdbc:h2:tcp://localhost:19092/sonar
  #sonar.jdbc.driverClassName:                org.h2.Driver
  
  # directory containing H2 database files. By default it's the /data directory in the sonar installation.
  #sonar.embeddedDatabase.dataDir:/alm/sonar/apache-tomcat-7.0.41/data
  # H2 embedded database server listening port, defaults to 9092
  #sonar.embeddedDatabase.port:               19092
  ...
  ... 
  #----- Microsoft SQLServer
  # The Jtds open source driver is available in extensions/jdbc-driver/mssql. More details on http://jtds.sourceforge.net
  sonar.jdbc.url                             
  jdbc:jtds:sqlserver://(REMOTE IP ADDRESS);instance=MSSQLSERVER;databaseName=SONAR;selectMethod=cursor;
  
  # Optional properties
  sonar.jdbc.driverClassName:                net.sourceforge.jtds.jdbc.Driver
  </code></pre>
  
  <p>The sonar username that I have has all permissions for the SONAR database.</p>
  
  <p>I am probably missing something small any help is appreciated.</p>