Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Smart SQL Connectivity Check Facility via PowerShell

$
0
0

Howdy folks,

Im after a simple but smart means to check connectivity to a SQL DB, albeit SQL Express, SQL Server or the WSUS WID DB.

I do not want to do a lazy port check on 1433 because that to me is not a valid. Just because the port is open doesnt mean the DB is ready to receive instructions.

Invoke-SQLCMD seems kinda limited, because it allows you to send instructions without really being able to validate whether the connection is going to succeed or not before it tries to execute it.

It just seems really surprising to me that there is no "Test-SQLConnectivity" cmdlet as part of the SQLPS suite of SQL tools.

I want smart and sophisticated, but ideal short and succinct.

Since it will probably need to support SQL authentication as well as Windows authentication (plus potentially prompting for credentials in both scenarios), I can only...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>