Read-Only routing using MSOLEDBSQL

Connection string

This Microsoft OLE DB Driver for SQL Server connection string can be used for connections to SQL Server 2019, SQL Server 2017, SQL Server 2016, SQL Server 2014 and SQL Server 2012.

You can either use an availability group listener for Server OR the read-only instance name to enforce a specific read-only instance.

Provider=MSOLEDBSQL;Server=aKnownReadOnlyInstance;MultiSubnetFailover=Yes;
ApplicationIntent
=ReadOnly;
Database=MyDB;Integrated Security=SSPI;
Connect Timeout
=30;

An availability group must enable read-only routing for this to work.