Announcement

Collapse
No announcement yet.

Trying to track a error with Database Connection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trying to track a error with Database Connection

    I am trying to connect to SQL Server 2008 that is running on a remote machine. Currently I am getting errors in the database writer and I am unable to connect to my database.

    I have tried the following:

    Using SQL Server/Sybase our URL is as follows:
    jdbc:jtds:sqlserver://192.168.0.1:1433/DB_NAME
    Username: sa
    Password: XXXXX
    Use Javascript: No

    When saving I get an error stating improper setup in the database writer. So then I have tried with USE Javascript: YES and then clicked the insert tab and get the error:
    Could not retrieve database metadata. Please ensure that your driver, URL, username, and password are correct.

    OK so after all the roadblocks I tried using Microsoft's driver. I added sqljdbc4.jar and the sqljdbc.jar to lib\database directory in mirth. Then added the information to the dbdrivers xml:

    <driver class="com.microsoft.sqlserver.jdbc.SQLServerDrive r" name="SQL Server 2008" template="jdbc:sqlserver://hostort;databaseName=dbName;" selectLimit="SELECT TOP 1 * FROM ?" />

    Then I restarted Mirth Service and tried again. Only this time select SQL Server 2008 from the dropdown. Then tried again using the following style of connection strings:
    jdbc:sqlserver://192.168.0.1;integratedSecurity=true;
    jdbc:sqlserver://192.168.0.1;integratedSecurity=false;
    jdbc:sqlserver://192.168.0.1:1433;databaseName=DB_Name;integratedSe curity=true;
    jdbc:sqlserver://192.168.0.1:1433;databaseName=DB_Name;integratedSe curity=false;
    jdbc:sqlserver://192.168.0.1:1433;databaseName=DB_Name;
    jdbc:sqlserver://192.168.0.1:1433;databaseName=DB_Name;user=sa;pass word=****;

    All this of course using Use Javascript and not using javascript options ticked. No avail. I can go to my sql managament studio and connect remotely to my database no problem. So what is mirth doing here that isn't working?

  • #2
    Are you sure that the user account you're using has the proper metadata privileges? Have you tried running the channel with a simple query and seeing if anything is received? Even if you don't have GRANT privileges you may still have SELECT privileges, so while the "Get Tables" dialog won't work, you can still write and perform queries.
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      Can anyone tell me the proper steps or point me directions on how to install the microsoft jdbc driver into mirth?

      driver from here:
      http://www.microsoft.com/en-us/downl...ng=en&id=11774

      I have seen multiple ways to do this as apparently it matter by version. My version is 2.2.1.5861.

      Thanks

      Comment


      • #4
        Originally posted by narupley View Post
        Are you sure that the user account you're using has the proper metadata privileges? Have you tried running the channel with a simple query and seeing if anything is received? Even if you don't have GRANT privileges you may still have SELECT privileges, so while the "Get Tables" dialog won't work, you can still write and perform queries.
        I was able to get a connection to my sql server when it is not encrypted. The second I re-encrypt the database I can no longer connect to my database through mirth. Connection through sql management studio though never falters rather encrypted or not.

        I am thinking it would be helpful to be able to get the microsoft jdbc driver working. Hence my earlier post as to how one would do this. Thanks for the help.

        Comment


        • #5
          Did you ever get encryption working? I'm having the same problem.

          Comment


          • #6
            Connect to Encrypted SQL Server Database

            I have tried unsuccessfully to connect to SQL Server when the database has been encrypted. It works fine when it's not encrypted. The Mirth version is 3.1.1.7461, running Java 1.7.0_25. I have tried both the Microsoft driver and included JDBC driver. Using the following Microsoft database URL with multiple variations:

            jdbc:sqlserver://ServerName:1433;instanceName=MSSQLSERVER;databaseN ame=MirthDB;integratedsecurity=true;ssl=require;

            or the following JTDS URL again with multiple variations:

            jdbc:jtds:sqlserver://ServerName:1433/MirthDB;ssl=request;

            I have tried versions of the Microsoft driver 4, 4.1 and 4.2, but nothing works. When I try to start the service it appears to start but never finishes, if you browse to the page on 8080 it says Page cannot be displayed. The last entry on the log is org.apache.ibatis.transaction.jdbc.JdbcTransaction : Openning JDBC Connection and it hangs until I manually end the process. I thought it could be a firewall issue so I moved Mirth to the SQL Server itself and have the same results.

            Can anyone help?
            Last edited by eszokolay; 02-26-2016, 05:16 AM.

            Comment

            Working...
            X