What does ApplicationIntent=ReadOnly mean in the connection string

This means that if you are using Availability Groups in SQL Server 2012, the engine knows that your connections are read only and can be routed to read-only replicas (if they exist). Some information here:

  • Configure Read-Only Access on an Availability Replica
  • Availability Group Listeners, Client Connectivity, and Application Failover

If you are not currently using Availability Groups, it may be a good idea to leave that in there for forward compatibility, but it really depends on whether or not you are intentionally only just reading. This should prevent writes but there are some caveats. These Connect items may be useful or may leave you scratching your head. I’ll confess I haven’t read them through.

  • ApplicationIntent=ReadOnly allows updates to a database
  • ApplicationIntent=ReadOnly does not send the connection to the secondary copy

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)