File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes problem regarding sql connectivity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem regarding sql connectivity" Watch "problem regarding sql connectivity" New topic
Author

problem regarding sql connectivity

amar nath jha
Ranch Hand

Joined: Mar 09, 2006
Posts: 42
- We have SQL Server DataBase Running.
- That Server has 2 Lines. One is from Bharati & Other is from VSNL(means two different Vendors).
- At a time only one Line is Working. both line has it'sown static IP Address.
- Two lines are their for emergency. means if one line goes down then other will start.
- so that my website that is used by airlines will not stop.

Problem:

- Database connectivity is done through JAVA using SQL Driver.
- Connection URL Required IPAddress:port number,
- For SQL Server , we have Fixed Port Number. but IPAddress for that Server will change based on the Lines. which line is

running is Current IP.
- Is it any way to find out the current IP assign to this Server through JAVA or SQL.

- Our Website is in JSP & Servlets.
- Need some solution from SQL side means , is there any SQL Query that will return the IPAddress of that machine.
Or is there any other way .We tried writing code But it is very slow.

Thanks
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I think what you are after is SQL Server failover. Is this what you want?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
amar nath jha
Ranch Hand

Joined: Mar 09, 2006
Posts: 42
Hi,

Is there any stored procedure or query which can give me IPAddress.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by amar nath jha:
Hi,

Is there any stored procedure or query which can give me IPAddress.


How do you run a Stored Procedure without knowing what to connect to?

Would it not make more sense to just use its out-the-box failover functionality? Or am I missunderstanding what you are trying to do?
[ September 12, 2007: Message edited by: Paul Sturrock ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem regarding sql connectivity