Question

I am trying to configure a SSIS 2012 project on a couple of mirrored databases. I was hoping to be able to use the OLEDB provider, but that doesn't seem to support the Failover Partner attribute in the connectionstring. I have tried to add the keys "Failover Partner", "Failover_Partner" and "FailoverPartner", but none of them works - the connection never tries to connect to the failover parther even if that holds the principal database. All my tests have been performed with all three variants of the attribute key.

If I use the ADO.NET connection, there is a build-in setting called "Failover Partner" in the Connection Manager, and that works like a charm, and it can connect to the database with the principal being on either one of the servers... just like it should.

My question is: Is it correct that OLEDB does not work out of the box with mirrored databases, when using SSIS 2012 agains a SQL Server 2012 mirrored database?

How I test My test is really simple: i have a "Execute SQL Task" with an OLEDB connection manager with the following connectionstring: Data Source=srv1;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Integrated Security=SSPI;Auto Translate=False;Application Name=My Application; I have tried adding the different versions of Failover Partner as mentioned above:

Data Source=srv1.domain.local;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Integrated Security=SSPI;Auto Translate=False;Application Name=My Application;Failover Partner=srv2.domain.local;

If MyDatabase is principal on srv1, then it works. If the database is principal on srv2, then SSIS fails with the following error: Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "Cannot open database "MyDatabase" requested by the login. The login failed.".

and the following is logged on srv1 in the error log: Login failed for user 'DOMAIN\MyUser'. Reason: Failed to open the explicitly specified database 'MyDatabase'. [CLIENT: 10.0.0.3]

What am I doing wrong? Or do I need to change to ADO.NET which works 100% as expected?

Thanx, Sjang

Was it helpful?

Solution

There is a failover partner parameter if you use OleDB/SQLNCLI11.1 connection string:

Data Source=srv1;Initial Catalog=myDB;Provider=SQLNCLI11.1;Integrated Security=SSPI;Failover Partner=failover_partner_name;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top