We have multiple .NET applications that used connecting to SQL Server 2016 through the IP address.
Now, we have set up a domain name connected to 2 IP addresses. The initial connection is very slow, anything between 25 and 40 seconds.
Here is the connection string:
Provider=SQLOLEDB;Server=lpc:chiangmaiserver.ch,51231;Database=ContactDatabase;User ID=****;Password=p@****;Connect Timeout=60;
The strange thing is that sometimes, the connection gets fast for a few minutes, then goes back to slow again.
The same domain used in SSMS does not have the issue.
If we revert to IP address the problem disappears.
I tried all the solutions proposed in previous posts, none of them is working.