Connecting to SQL Server Using PowerShell

In this blog, I would like to show you how we can connect to a SQL Server Instance using PowerShell cmdlets. Let us consider a situation where you are in a remote machine and you don’t have SQL Server Management Studio(SSMS) client tool to access the SQL Server and you would like to query your…


A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 – The Local Security Authority cannot be contacted)

Symptoms: Connections to the SQL Server fails after certain windows update and getting the below error: Error: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 – The Local Security Authority cannot be contacted) —> System.ComponentModel.Win32Exception (0x80004005): The Local Security Authority cannot…


Intermittent JDBC Connectivity issue – The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: SQL Server returned an incomplete response. The connection has been closed

Symptoms: When connections are repeatedly made to SQL Server, one can observe about ~ 1% of connections having inability to connect.  The user witnesses the following error message, Error: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: “SQL Server returned an incomplete response. The…