LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-23-2009, 02:13 AM   #1
thomas2004ch
Member
 
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
Code:
jdbc:sqlserver://s003ap02-test;1433;databaseName=demo
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, 02:22 AM   #2
paulsm4
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:

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
 
Old 08-23-2009, 02:47 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
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?
 
Old 08-23-2009, 01:04 PM   #4
Tinkster
Moderator
 
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>



Cheers,
Tink
 
Old 08-23-2009, 01:15 PM   #5
paulsm4
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).

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

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


Reply


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 01:10 AM
LXer: Sql - stored procedures, views, and dynamic sql generation LXer Syndicated Linux News 0 08-17-2006 06:33 AM
java.lang.InstantiationException: java.sql.Connection poeta_boy Programming 2 07-06-2005 08:26 PM
Which SQL is suitable for EMbedded SQL on C? hk_michael Programming 4 01-10-2005 05:07 PM
PHP / SQL establish connection / config _Chow_ Programming 5 08-11-2004 12:39 PM


All times are GMT -5. The time now is 02:55 PM.

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