• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem regarding sql connectivity

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is there any stored procedure or query which can give me IPAddress.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic