Connecting to a read only replica with SSMS

If you are using always on availability groups and need to connect to a read only replica, you might get the following error message in SSMS:

Msg 978, Level 14, State 1, Line 1
The target database (‘Database’) 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.

This message is occurring because by default SSMS does not connect to an instance with intent read only.  This is simple to get around.  When connecting to SSMS click the “Options” buttons.

Click the “Additional Connection Parameters” tab.  Enter the text: ApplicationIntent=ReadOnly

You should be able to connect to a read only replica once you do this.