ropey has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks.

Got a bit of a problem, we are attempting to connect to a clustered MS SQL server using perl - it works fine when there is only one SQL server, however when in a clustered environment it does not work

Code to Non Clustered is - we use the Sybase Driver cos we use FREE TDS and both work well together.
my $dbh = DBI->connect("dbi:Sybase:$server", $username,$passw +ord);

The same code does not work from on a clustered DB as it has virtual IP's, has anyone any experience with this ?

Replies are listed 'Best First'.
Re: Connecting to a Clustered MS SQL Server
by McDarren (Abbot) on Dec 06, 2005 at 18:01 UTC
    There was a similar question posted just a few days ago. You might find some of the responses to this useful.

    In particular DBIx::Cluster looks like it may be what you want.

    Cheers,
    Darren :)

Re: Connecting to a Clustered MS SQL Server
by jfroebe (Parson) on Dec 06, 2005 at 18:50 UTC

    Hi,

    Actually, it should work just fine. When the failover from primary to secondary occurs, the connection is dropped. Your code will have to detect this drop (syb_err_handler), reconnect and perform the query again.

    One thing to note is that the cluster we are talking about here is a High Availability Cluster rather than a load balancing 'cluster'.

    Jason L. Froebe

    Team Sybase member

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1