Are you able to specify read-only routing in invoke-SQLcmd? $dataTable = Invoke-Sqlcmd -Query $Query -Database $SourceDatabaseName -ServerInstance $SourceServerName ;maybe add something like -READONLY = TRUE? or -APPlicationintent = 'readonly'I can't seem to find anything on it.
↧