• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Remote DB Connection

 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All,

Here is my situation. I am trying to use a JTDS Connector to connect my webapp on Server A to backup database on Server B using windows authentication. These Servers are both in the same domain and the user in Server A has been assigned to have administrative privliges to server B. If I manually set the JTDS Server name, domian and password to Server A's Login, everything works on both the remote and local database. If I leave these fields untouched, I can log in locally but not remotley, which is what I would expect to work. Given Server A's user has permisions on Server B. I cant have the user manually put in this information, as they shouldnt have it when they login externally to the application. I have tried retriving it using the localhost URL.getUserInfo(), System.getProperty("user.name") and even NTSystem. Why wont JTDS work? Should I try a different method of connecting? Is there a setting for JTDS that I could change which will handle the remote connection using the local user(which is part of the domain I am on).

Thanks,
 
Paul Clapham
Sheriff
Posts: 21113
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "Server A's user"?

Since you said the problem occurs in a web app, you should be looking at the user of the process which is running the web app. If I were to make a wild guess it would be that your web app container is running as a Windows service and you haven't configured that service to log on as the special user you set up.
 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this fixed a while ago but wanted to post the solution. So in the setup I am using One Domain user will match one Virtual Machine. so by Server A's user I mean the user that is associated (by us)with server A. Also, you where 100% correct. My container was running with local credentials, so I just changed them to the "Server A's" credentials and everything worked.

Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic