3

We're trying to connect to SQL with Database Mirroring enabled. We have 2 servers: DB1 (Principal) and DB2 (Mirror).

We're using connection string:

Provider=SQLOLEDB;Data Source=DB1;Failover Partner=DB2;Database=databasename;Uid=username;Pwd=password;

When DB1 is in principal role, everything works OK. But, when DB1 goes down, and DB2 (Mirror) becomes principal, we receive an error:

Invalid connection string attribute

We tried to change Data Source from server name to IP, to IP:1433... without success. We also tried to change parameter "Failover Partner" to "FailoverPartner", also without success.

Is it possible to connect to DB mirror with SQLOLEDB provider at all?

jarlh
  • 42,561
  • 8
  • 45
  • 63
Baufix
  • 31
  • 5

1 Answers1

1

You need to use SQL native client or ado.net, not sqloledb as it does not support failover partner parameter.

Greg
  • 3,861
  • 3
  • 23
  • 58