Purpose

Specifies whether the driver connects to read-write databases or requests read-only routing to connect to read-only database replicas. Read-only routing only applies to connections in Microsoft SQL Server 2012 where AlwaysOn Availability Groups have been deployed.

Valid Values

ReadOnly | ReadWrite

Behavior

If set to ReadOnly, the driver requests read-only routing and connects to the read-only database replicas specified by the server.

If set to ReadWrite, the driver connects to a read-write node in the AlwaysOn environment.

Notes

  • By setting applicationIntent to ReadOnly and querying read-only database replicas when possible, you shift load away from the read-write nodes of your database cluster to read-only nodes.

Default

ReadWrite

Data Type

String