To connect to SQL Server

  1. Run SQL server on a fixed port
  2. Enable SQL server and windows - mixed mode authentication.
SQL Server Port SQL Server Auth Setting

Possible Errors

Login Failed for user - ClientConnectionId

You cannot use windows authentication to connect to the SQL server from QStudio; rather, the SQL Server authentication will have to be used.

SqlServerException SSL PKIX path building failed

This is an issue in Java Certificate Store. As a quick workaround, if you enable TrustServerCertificate=True in the connection string, the connection from JDBC succeeds. When TrustServerCertificate is set to true, the transport layer will use SSL to encrypt the channel and bypass walking the certificate chain to validate trust. If TrustServerCertificate is set to true and encryption is turned on, the encryption level specified on the server will be used even if Encrypt is set to false. The connection will fail otherwise. However, for security considerations, it is not recommended to bypass the certificate validation. Hence, to address the issue, import the required certificates.