This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuring database on local machine

 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am moving this to the JDBC forum.

Mark
 
Samuel Cox
Ranch Hand
Posts: 96
Scala Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic