Just by looking at these three, you can narrow down the majority of the causes. 1. Are you retrieving too many records? When SQL is slow, the first thing to look at is how many records are being ...
Who are these scripts for? You need to troubleshoot performance problems with SQL Server, and you need to do it now. You don't have time to track down a bunch of DMVs, figure out Extended Events, ...
It's a DSN-less connection. The second and third connection strings use a DSN, which is an encapsulation of these items that are stored in the registry. The username and password can't be stored in ...