Hi, You have posted the same question at http://stackoverflow.com/questions/16464936/h2-database-cluster-recovery
See my answer there. Regards, Thomas On Thu, May 9, 2013 at 5:05 PM, soumya sengupta <[email protected]>wrote: > I have got a SpringMVC application which runs on Apache Tomcat and uses H2 > database. The infrastructure contains two application servers (lets name > them A & B) running their own Tomcat Servers. I also have a H2 database > clustering in place. > > On one system (A) > > I ran the following command java org.h2.tools.Server -tcp -tcpPort 9101 > -tcpAllowOthers -baseDir server1 > > On the other (B) > > I ran java org.h2.tools.Server -tcp -tcpPort 9101 -tcpAllowOthers > -baseDir server2 > > I started the cluster in machine A > > java org.h2.tools.CreateCluster -urlSource > jdbc:h2:tcp://IpAddrOfA:9101/~/test -urlTarget > jdbc:h2:tcp://IpAddrOfB:9101/~/test -user sa -serverList > IpAddrOfA:9101,IpAddrOfB:9101 > > When any one of the server is down, it has been mentioned that, one has to > delete the database that failed, restart the server and rerun the > CreateCluster. > > I have the following questions ? > > 1. If both servers are down, how can I ascertain, which database to > delete so that I can restart that server and rerun the cluster ? > 2. CreateCluster contains a urlSource and urlTarget. Do I need to be > specific as to give them the same value as was previously given or I can > interchange them without any side effect ? > 3. Do I need to run the CreateCluster command from both the machines? > If so, do I need to interchange the urlSource and urlTarget ? > 4. Is there a way to know whether both, one or none of the servers are > running ? I want that both IpAddress will be returned if both of them are > up, one IpAddress if only one is up otherwise none is all are down. > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/h2-database?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
