web stats
Mirth Community - View Single Post - Has anyone had any luck connecting to SQLServer in Windows Azure?
View Single Post
Old 04-16-2015, 01:09 PM
EricD EricD is offline
Mirth Newb
Join Date: Oct 2009
Posts: 14
EricD is on a distinguished road

So I've figured this out, and am posting here for everyone's benefit.

First, download Microsoft's SQLServer JDBC driver. I downloaded the tar.gz archive, since I'm running Mirth in linux. I don't know where the exe installer places the jar file.

Second, copy the jar file to the custom-lib folder in your mirth install directory. If you're on *nix, make sure you set the owner and permissions properly - including the execute permission.

Third, navigate to the conf folder in your mirth install directory, and edit dbdrivers.xml to add the new driver. It'll look something like this:
        <driver class="sun.jdbc.odbc.JdbcOdbcDriver" name="Sun JDBC-ODBC Bridge" template="jdbc:odbc:DSN" selectLimit="" />
        <driver class="com.mysql.jdbc.Driver" name="MySQL" template="jdbc:mysql://host:port/dbname" selectLimit="SELECT * FROM ? LIMIT 1" />
        <driver class="oracle.jdbc.driver.OracleDriver" name="Oracle" template="jdbc:oracle:thin:@host:port:dbname" selectLimit="SELECT * FROM ? WHERE ROWNUM &lt; 2" />
        <driver class="org.postgresql.Driver" name="PostgreSQL" template="jdbc:postgresql://host:port/dbname" selectLimit="SELECT * FROM ? LIMIT 1" />
        <driver class="net.sourceforge.jtds.jdbc.Driver" name="SQL Server/Sybase" template="jdbc:jtds:sqlserver://host:port/dbname" selectLimit="SELECT TOP 1 * FROM ?" />
        <driver class="org.sqlite.JDBC" name="SQLite" template="jdbc:sqlite:dbfile.db" selectLimit="SELECT * FROM ? LIMIT 1" />
        <driver class="com.microsoft.sqlserver.jdbc.SQLServerDriver" name="SQL Azure" template="jdbc:sqlserver://host:port/dbname" selectLimit="SELECT TOP 1 * FROM ?" />
Next, restart the Mirth Connect service.

Finally, grab the connection string from Windows Azure for the DB you want to connect to, and set up your destination accordingly.
Reply With Quote