aspose file tools*
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Configuring database on local machine" Watch "Configuring database on local machine" New topic
Author

Configuring database on local machine

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1535
Hi guys!
Scenario:
I am having two machines A and B. I am compiling my servlet.java 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.

Now,
Query:
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
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

I am moving this to the JDBC forum.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
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: http://www.microsoft.com/sql/default.mspx. 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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuring database on local machine