Yes, that's possible. The solution JavaFan mentions is a very nice way to handle the situation, but is not stricly necessary.
There are also the DBD::Multi, DBIx::HA, and DBD::Multiplex modules, each of which takes a slightly different application-level approach to easing the use of multiple database servers. | [reply] |
Mja, that's possible. Not the way I'd set up things. But I'm confused, your question isn't "In Java I can check the return value of connect, and send another connect string if it fails, but I cannot do that in Perl", is it? In your original question, you said your Perl application was connecting to the same server, and I said that if set up properly, it should indeed connect to the same address - with the cluster taking care of moving addresses around. | [reply] |
It is certainly possible to do this. I speculate that the problem that tohann may be having is that his script is dying on the first call to connect. This would either be because the RaiseError attribute is turned on, or because there is an or die after the connect call.
It would be nice to see some code.
| [reply] [d/l] [select] |