Hi there,
I've created a SQL 2017 AlwaysOn multi-subnet AG. I've been really impress how easy it's been to set up and how well it works.
From a server on the same Active Directory I can test the listener and watch the primary and readable secondary move around as expected. But most of our clients (web servers) aren't on an Active Directory like our SQL servers, so I wanted to test the client connectivity from them but am seeing some very strange behaviour.
To test the non-AD servers, I added two a-record's on the DNS server that the non-AD servers use pointing to the same IPs asthe AD listener (to mimic what's in AD DNS). When testing a connection/query, if my connection string doesn't contain the ApplicationIntent=readonly option then everything works fine.
But if I include the ApplicationIntent=readonly option then the connection fails with the following error:-
Exception calling "Open" with "0" argument(s): "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)" At line:17 char:5+ $connection.Open()+ ~~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException+ FullyQualifiedErrorId : SqlException
unless the read only routing is going to the same server as the primary, then it connects fine!?
I can ping, nslookup and telnet on 1433 to all the servers in the AG. And just for clarity, this all works fine from a server on the same domain as SQL, it's just servers that aren't on the domain.
Can anyone please help me understand where I've gone wrong or what's different about connecting to the listener from a server that's not on the same domain?
many thanks!
:D