Question

Trying to create a "read only" intent connection string against SQL Server 2012 high availability Group, following this article, I am getting:

System.ArgumentException: Keyword not supported: 'application intent'. at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)

This is on a Windows 7 Pro machine, going against high availability group based on SQL Server 2012 (which has been confirmed to work with "-ReadOnly" parameter).

There are two MS KB articles about hotfixes that introduce "Application Intent", but they are for Framework versions 3.5 and 4. I am not finding anything for 4.5, so I assume support is included. Both 4.5 and SQL Server Native Client should support it out-of-the-box.

We are using 4.5.

This is the connection string:

Data Source=HAListener;Initial Catalog=*********;User ID=************;Password=********; Application Intent=ReadOnly

Anybody encountered this error?

SOLVED There shouldn't be any space in Application Intent:

ApplicationIntent=ReadOnly
Was it helpful?

Solution

I guess I'll post the solution in case someone else encounters the same issue:

there is no space between Application and Intent. the correct parameter is:

ApplicationIntent=ReadOnly

(reference: MSDN)

OTHER TIPS

Depending on the SNAC protocol you are using there is a slight variation in the application intent connection string property.

When using SQL Native Access Client SQL OLE DB, the application intent connection string should be specified with a space: 'Application Intent'

When connecting using SQLClient or ODBC specify 'ApplicationIntent' with no space

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top