Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem regarding sql connectivity

 
amar nath jha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- 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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think what you are after is SQL Server failover. Is this what you want?
 
amar nath jha
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there any stored procedure or query which can give me IPAddress.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic