title: Connection to a MS SQL database from Google scripts
body: <p>I'm trying to connect to a MS SQL database (2012) using google script using the JDBC service <a href="https://developers.google.com/apps-script/guides/jdbc" rel="nofollow">https://developers.google.com/apps-script/guides/jdbc</a> </p>
  
  <p>I'm having issues connecting and keep getting the message 
  'Failed to establish a database connection. Check connection string, username and password. (line 4, file "Code")'</p>
  
  <p>I have setup the port and followed the instructions from the website above. Here is the statement below that I am using:</p>
  
  <pre><code>var conn = Jdbc.getConnection("jdbc:sqlserver://&lt;ip&gt;:&lt;port&gt;;databaseName=&lt;db name&gt;;user=&lt;user&gt;;password=&lt;password&gt;");
  </code></pre>
  
  <p>Does anyone see anything wrong. I keep reading about needing the JDBC driver installed on the MS SQL server, do I need to call it in the script somewhow?</p>