Connection to MS SQL Datebase
Hi all,
I just installed a Jboss instance on LINUX and I want to test if I can connect to a MS SQL Database. Assumed the URL to the database is as Code:
jdbc:sqlserver://s003ap02-test;1433;databaseName=demo Or can I simply ping the IP-address of the Database server? |
Yes, a small JDBC program would be an effective test to see if you can talk to a remote MySQL database. At a minimum you'll need to make sure a MySQL JDBC driver is installed on your local PC:
http://dev.mysql.com/downloads/connector/j/5.1.html If your program can talk to MySQL, then JBoss (running, I assume, on the same host) should also be able to talk to MySQL. You should really be using JNDI (not JDBC) from your actual JBoss application. Here are details to set up a JBoss "Data source" for MySQL: http://onjava.com/pub/a/onjava/2004/...dbc.html#mysql 'Hope that helps .. PSM |
Hi,
Thanks for the info though I don't have MySQL but MS SQL. :-) I think the way is the same. But I want to know if there is an easy way to check if my Jboss Server on LINUX can access the MS SQL server on the other machine such by using ping ip-address? |
You might be able to telnet to the relevant port
if you're trying to troubleshoot networking or firewalling issues. telnet <server> <port> Cheers, Tink |
MSSQL? You have my condolences ;-)
Anyway - you need the MSSQL JDBC driver, and you should set up an MSSQL DS on JBoss. A standalone, JDBC "hello world" is an *EXCELLENT* way to test connectivity. If your JDBC app can connect to MSSQL, then JBoss should, as well (provided, of course, you've configured your JDBC driver and DS configuration file). Forthe "real" JBoss application, of course, you should definitely use JNDI (not JDBC). Anyway: http://jtds.sourceforge.net/ http://msdn.microsoft.com/en-us/data/aa937724.aspx This article might be of help (albeit *limited* help: its focus is on Windows clients, not JBoss/Linux): http://support.microsoft.com/kb/827422 ALSO: Make *SURE* your MSSQL database instance is set to "Mixed Mode". The default is "Windows Authentication" ... 'Hope that helps .. PSM |
All times are GMT -5. The time now is 04:22 AM. |