Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-23-2009, 03:13 AM   #1
Registered: Aug 2009
Posts: 537

Rep: Reputation: 32
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
How can I do that? SHould install MS SQL tool?

Or can I simply ping the IP-address of the Database server?
Old 08-23-2009, 03:22 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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:

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:

'Hope that helps .. PSM
Old 08-23-2009, 03:47 AM   #3
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32

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?
Old 08-23-2009, 02:04 PM   #4
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You might be able to telnet to the relevant port
if you're trying to troubleshoot networking or
firewalling issues.

telnet <server> <port>

Old 08-23-2009, 02:15 PM   #5
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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).


This article might be of help (albeit *limited* help: its focus is on Windows clients, not JBoss/Linux):

Make *SURE* your MSSQL database instance is set to "Mixed Mode". The default is "Windows Authentication" ...

'Hope that helps .. PSM

Last edited by paulsm4; 08-23-2009 at 02:18 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL noob question: can SQL effectively handle a 2D matrix? JoeyAdams Programming 2 03-17-2008 02:10 AM
LXer: Sql - stored procedures, views, and dynamic sql generation LXer Syndicated Linux News 0 08-17-2006 07:33 AM
java.lang.InstantiationException: java.sql.Connection poeta_boy Programming 2 07-06-2005 09:26 PM
Which SQL is suitable for EMbedded SQL on C? hk_michael Programming 4 01-10-2005 06:07 PM
PHP / SQL establish connection / config _Chow_ Programming 5 08-11-2004 01:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration