Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a problem with OLE DB connection which should be established to an SQL Server database which is a secondary replica in AlwayOn Availabilty group (AAG) and woring on read-only mode.
When connecting to the database the following error occurs:
[
SQLState: "42000"
SQL Server error: 978
The target database ('xxx') is in an availability group and is currently accessible for connections when the application intent is set to read only. For more information about application intent, see SQL Server Books Online.
]
I use the following OLE DB connection strings:
Playing (adding and removing) with the following settings does not help as well:
I googled a number of resources including
but nothing helps. I'm stuck.
Did anyone tried working with a read-only replica in AAG?
Best regards,
Maxim
Hi, i had the same problem and have a solution:
First you need to upgrade the OLE DB drivers, install the SQL Native Client 11.0 (available from Microsoft: Download Microsoft® ODBC Driver 11 for SQL Server® - Windows from Official Microsoft Download Center)
This is because of that support for "readonly" was released with SQL Server 2012.
After that change the provider to: SQLNCLI11.1 and you need to use ;application intent=readonly; with a [space].
applicationintent is for ODBC.
application intent is for OLEDB.
Hi, i had the same problem and have a solution:
First you need to upgrade the OLE DB drivers, install the SQL Native Client 11.0 (available from Microsoft: Download Microsoft® ODBC Driver 11 for SQL Server® - Windows from Official Microsoft Download Center)
This is because of that support for "readonly" was released with SQL Server 2012.
After that change the provider to: SQLNCLI11.1 and you need to use ;application intent=readonly; with a [space].
applicationintent is for ODBC.
application intent is for OLEDB.
Hi Johannes,
Thanks, I found this at MSDN site already.
Best regards,
Maxim
thanks a lot i had almost the same problem