典型的Azure SQL数据库连接字符串如下:
Server=[server];
Database=[database];
User ID=[user];
Password=[password];
Trusted_Connection=False;
Encrypt=True;
Connection Timeout=30;
“Trusted_Connection” 和 “Encrypt” 属性是什么?
如果我将它们排除在外,则无法从我的 Azure VM 服务连接到数据库。典型的Azure SQL数据库连接字符串如下:
Server=[server];
Database=[database];
User ID=[user];
Password=[password];
Trusted_Connection=False;
Encrypt=True;
Connection Timeout=30;
“Trusted_Connection” 和 “Encrypt” 属性是什么?
如果我将它们排除在外,则无法从我的 Azure VM 服务连接到数据库。Encrypt
是指 Azure SQL 数据库要求明确加密通信。它将拒绝任何非加密连接。
Trusted_Connection
被设置为明确确认使用 SQL Server 身份验证,而不是集成的 Windows 身份验证(请参阅此 SO 问题中有关 "什么是可信连接")。
为了成功连接到 SQL Azure,必须设置这两个参数及其相应的值。