• 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

multiple data base connections best practices

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I have a problem that in my application there are two data bases Oracle and SQL Server and i want to dynamically check that which data base is available and then connect to available data base.
best regards
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you mean, check to see if they're available? Do these databases get turned off occassionally?
You could attempt to connect to one, and if that connection fails, attempt to connect to the other. More likely, however, is that you want to store the connection information in some .properties file and have the user select which connection they want to use, yes?
 
faisal ishaque
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am little confused with your answer , actually our client use two DBMS (Oracle and SQL Server) due to their differenc interfaces, thats why whole data can be stored on both servers.
In this case if one DBMS does down then, then the customer must connect to anpther dbms dynamically.
Is this possible in minimum efforts or it requires more to do?
best regards
Faisal Ishaque
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Joel is saying is that you should identify which is the primary ( first choice for connecting to ) and which is the secondary ( second choice ) database to connect to.

Jamie
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic