Multisubnet Failover – Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Connecting to a mirrored SQL Server instance using the MultiSubnetFailover connection option is not supported..

We are setting up an AG in AWS. Our setup includes a listener with 3 different subnets, therefore to speed up the client re-connection in case of failover, we have to enable the Multisubnet Failover in our connection string. To understand what it does, have a look here.

We are already changing the connection string in our on premises environment, currently using SQL Mirroring, to be ready for a migration to the AWS AG multisubet. The problem that looks more like a bug is that when adding the parameter -M (multisubnet failover) to sqlcmd connection string it fails with this error:

sqlcmd : Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Connecting to a mirrored SQL Server instance using the MultiSubnetFailover connection option is not supported..
At line:1 char:1

Now what we have realised is that just fails when we connect to a Mirrored database. If we don’t add the parameter -d or connect to non mirrored db (ie. -d master), the query performs fine. We are using SQL Native Client 11.0.

OK, we could connect to master and in the -Q just add “USE mirrored_db_name”, but it still doesn’t make much sense for me.

Have you ever seen that? Any other work around?

Thanks.
Rafael