How to force SQL Compare and SQL Data Compare to use an encrypted connection
Published 21 August 2019
By default SQL Compare and SQL Data Compare do not have an option that forces the use of an encrypted connection when connecting to databases.
The work around is to specify the force encryption properties into the SQL Compare or SQL Data Compare connection string.
- Start up SQL Compare or SQL Data Compare.
- Create a new project or edit an existing project.
- Go to Project Configuration -> Data Sources.
- Enter the server name, and enter the following after the server to force an encrypted connection:
For a Default Instance: <Server Name>;ENCRYPT=TRUE;TRUSTSERVERCERTIFICATE=TRUE
For a Named Instance: <Server Name>\<Instance Name>;ENCRYPT=TRUE;TRUSTSERVERCERTIFICATE=TRUE
If server is not running on the default SQL Port 1433:<Server Name>,<port number>;ENCRYPT=TRUE;TRUSTSERVERCERTIFICATE=TRUE or <Server Name>\<Instance Name>,<port number>;ENCRYPT=TRUE;TRUSTSERVERCERTIFICATE=TRUE