web stats
Trying to track a error with Database Connection - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2013, 08:17 AM
allencodedaha allencodedaha is offline
What's HL7?
 
Join Date: Jan 2013
Posts: 5
allencodedaha is on a distinguished road
Exclamation 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?
Reply With Quote
  #2  
Old 01-31-2013, 09:39 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

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.
Reply With Quote
  #3  
Old 01-31-2013, 11:35 AM
allencodedaha allencodedaha is offline
What's HL7?
 
Join Date: Jan 2013
Posts: 5
allencodedaha is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 01-31-2013, 02:18 PM
allencodedaha allencodedaha is offline
What's HL7?
 
Join Date: Jan 2013
Posts: 5
allencodedaha is on a distinguished road
Default

Quote:
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.
Reply With Quote
  #5  
Old 01-27-2016, 06:45 AM
eszokolay eszokolay is offline
Mirth Newb
 
Join Date: Jan 2016
Posts: 8
eszokolay is on a distinguished road
Default

Did you ever get encryption working? I'm having the same problem.
Reply With Quote
  #6  
Old 02-26-2016, 05:13 AM
eszokolay eszokolay is offline
Mirth Newb
 
Join Date: Jan 2016
Posts: 8
eszokolay is on a distinguished road
Default 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 at 05:16 AM.
Reply With Quote
Reply

Tags
database writer, error, sql server 2008

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:51 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation