File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Configuring database on local machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Configuring database on local machine" Watch "Configuring database on local machine" New topic

Configuring database on local machine

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1599
Hi guys!
I am having two machines A and B. I am compiling my files on machine A and copy-pasting the servlet.class files on the machine B. Obviously
Machine A is client
Machine B is server.... running tomcat server.

I have a servlet that manipulates databases. Machine A(i.e. client itself) has MS SQL Server. How can I configure my server (Machine B) through ODBC to connect to my local SQL Server and run the servlet.
1. Is it necessary that SQL Server and Tomcat be running on same machine.
2. If no, then how can ODBC be configured to work things up.

Thanks in advance.
[ October 20, 2005: Message edited by: Akhil Trivedi ]

Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

I am moving this to the JDBC forum.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Samuel Cox
Ranch Hand

Joined: Nov 16, 2004
Posts: 96

It is not necessary to have Tomcat and SQLServer on the same machine.

If you just need access to SQLServer from a java servlet, why don't you use the MS SQLServer JDBC driver? You can download it here: In the <whereever you install dir>\Microsoft SQL Server 2000 Driver for JDBC\books\ directory, there is a resource that details connecting to the database through the driver. Basically, you just need to specify the ip address to hookup to the other computer.
[ October 20, 2005: Message edited by: Samuel Cox ]
Don't get me started about those stupid light bulbs.
subject: Configuring database on local machine
It's not a secret anymore!