How To Connect Microsoft SQL Server Over SSL encrypted connection?

How To Encrypt SQL Server Connection?

SSL encryption is enabled on all Microsoft SQL Server database servers. We recommend you to use SSL encrypted connections to connect to database servers (especially if you are connecting with database server from remote locations using SQL Server Management Studio Tool). Make sure to use the hostname provided under your database’s properties in the control panel, or in the “Services Information” area of the control panel.

Connect SQL Server over SSL with ASP.NET/ASP Applications:

SQL Server connection string for Classic ASP (ADO Library):

Provider=SQLOLEDB;Data source=HOSTNAME;Initial catalog=databaseName;User Id=userName;Password=password;encrypt=true

SQL Server connection string for ASP.NET (ADO.NET Library):

Server=HOSTNAME;Database=databaseName;Uid=userName;Password=password;encrypt=true

Connect SQL Server over SSL with MS SQL Server Management Studio:

Follow below steps to connect SQL Server Management Studio over SSL encrypted channel.

  • Open SQL Server Management Studio tool
  • Type SQL Server Name
  • Select Authentication Method to SQL Server Authentication
  • Type your database user name and your database user password
  • Click on Options button to set up advanced settings/ connection properties
  • Under Connection setting click check box to enable “Encrypt Connection”
  • Click on Connect button to connect SQL Server over SSL encrypted session.