0

I need to connect from a Linux (LAMP) machine to an SQL server with mirroring.

I tried using the following but with no luck:

$dbh = new PDO("dblib:version=7.0;charset=UTF-8;host=10.37.25.2;dbname=myDataBaseName","$username","$pw", array("Failover_Partner" => "10.37.25.3:1433"));

I can connect to each server but when I try the above with the master (10.37.25.2) off I get the following error:

Failed to get DB handle: SQLSTATE[01002] Adaptive Server connection failed (severity 9)

Any suggestions?

user1165759
  • 333
  • 3
  • 14
  • http://stackoverflow.com/questions/24895605/php-pdo-mssql-sqlstate01002-adaptive-server-connection-failed-severity-9 this may help – AJ Riley Aug 14 '16 at 18:43
  • Thanks but it's not. I can connect to each server independently but cannot activate the Failover_Partner option. I get the fail only when the master is down and it is supposed to switch to the mirroring server. – user1165759 Aug 15 '16 at 11:29

0 Answers0