3
votes

A typical Azure SQL Database connection string is as follows:

Server=[server];
Database=[database];
User ID=[user];
Password=[password];
Trusted_Connection=False;
Encrypt=True;
Connection Timeout=30;

What are the Trusted_Connection and Encrypt properties for?

If I exclude them, then I cannot connect to the database from my Azure VM service.

1

1 Answers

3
votes

Encrypt is indication that Azure SQL Database requires explicit encryption of the communication. It will refuse any unecrypted connections.

Trusted_Connection is set to explicitly confirm using of SQL Server authentication as opposed to integrated Windows Authentication (check this SO question on "What is Trusted Connection")

Both parameters are required to be set with respective values in order to successfully connect to SQL Azure.