Microsoft SQL Server allows encryption of transmitted data via SSL (Secure Socket Layer).
While that increases security, there is also a loss of performance, when encryption is active.
If the whole data traffic is encrypted via SSL, an additional roundtrip is needed on connection setup and all data must be encrypted by the sender and decrypted by the receiver.
Create SSL certificate
First open the dialog for certificate creation:
Control Panel > Administrative Tools > IIS Manager > Server Certificates > Create Self-Signed Certificate.
Name the certificate and export it after clicking OK.
Close the IIS Manager afterwards.
This step is only necessary, if there isn't already an SSL certificate available, otherwise it can be skipped.
Microsoft Management Console
Run the Microsoft Management Console:
Start > Run > mmc.
Open File > Add/Remove Snap-in > Certificates > Add > Computer account.
Select the computer, which shall be managed by the Snap-in and click Finish > OK.
Expand Certificates, right click on the Personal folder and open All Tasks > Import.
Follow the assistant's instructions and import either the previously created certificate or the pre-existing one.
Close Microsoft Management Console and restart the SQL Server-Service.
Make sure the Service-Account has access to certificates. It is possible it must be run as a local account.
SQL Server Configuration Manager
Run the SQL Server Configuration Manager:
Expand the SQL Server-Network configuration, right click the option for protocols and select properties.
Select the option Yes for the field Force encryption in the Flags tab and click OK.
If the option ForceEncryption is enabled, the whole client/server communication is encrypted and clients, which don't support encryption don't get access.
If the option ForceEncryption is disabled, encryption can be requested by the client, but it is not required.
Select the correct certificate and click
OK to close the dialog window.
Restart the SQL Server-Service.
SSL-encryption is now active on the Microsoft SQL Server.
SSL connections, which are encrypted using a self-signed certificate, do not offer great security. They are vulnerable to "Man-in-the-Middle"-attacks.
In a production environment or on servers connected to the internet, you should not rely on SSL using self signed certificates.