Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
Configuring MS SQL as a Data Source
-
Hi all-
I'm attempting to use an MS SQL database as a data source in Mango M2M2. Normally to connect to SQL using a database browser I only need the servername/IP, userid and password. Mango has a couple of other properties that I'm not certain as to what needs to be entered or if additional setup is required to use SQL as a data source.
For the driver class name, I'm using the standard com.microsoft.jdbc.sqlserver.SQLServerDriver. For the connection string I have Server=10.165.3.192;Database=ExternalLog;User Id=dcstats;Password=xxxxxx;
When I start the data source, I get this error: 10:35:30: 'VISU': java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
What does the classnotfound exception mean? Am I missing something in the java setup? Thanks,
Jordan
-
Your classname should be com.microsoft.sqlserver.jdbc.SQLServerDriver. (Reverse jdbc and sqlserver.)
-
Thanks Matt! That allowed the software to get past the driver class loading. It now generates an error for the next line, connection string.
10:59:46: 'VISU': java.sql.SQLException: No suitable driver found for Server=10.165.3.192;Database=ExternalLog;User Id=dcstats;Password=xxxxxx;
I also tried the trusted connection string example, Server=10.165.3.192;Database=ExternalLog;Trusted_Connection=True; and it generated a similar error.
11:07:32: 'VISU': java.sql.SQLException: No suitable driver found for Server=10.165.3.192;Database=ExternalLog;Trusted_Connection=True;
I got the connection string from this [url=http://www.connectionstrings.com/sql-server-2008]SQL connection string example page.
Is there a different connection string I should be using? Thanks for your help,Jordan
-
That's not a JDBC connection string. Try here instead: http://msdn.microsoft.com/en-us/library/ms378956.aspx
-
The information in your link appears to have allowed me to connect with a slight change. I had to change integratedSecurity to false, when it was true I got the error com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
For others out there who may be attempting to connect to a MS SQL (in this case 2008), here are the settings that worked for me.
Driver class name: com.microsoft.sqlserver.jdbc.SQLServerDriver
Connection string: jdbc:sqlserver://10.165.3.192;database=ExternalLog;integratedSecurity=false;
Username: database login UID
Password: database login PWOf course, you'll have to customize the connection string to your database server name/IP and database name.
Thanks Matt!